C# 클래스 CinderellaMGS.SQL_Queries

파일 보기 프로젝트 열기: ThomasMoreCollege/CinderellaMGS 1 사용 예제들

공개 메소드들

메소드 설명
AddGodmotherShift ( string shift, string ID ) : void

Adds a godmother to a shift.

DeleteGodMother ( string godmotherID ) : void

Deletes a Godmother from the system. Actually this method just sets the delete flag since we don't actually want to delete the godmother from the database.

MatchMakerProcess ( ) : void

MatchMaker Process begins here! This Process is what currently will match cinderellas and fairygodmothers and also change ther statuses to the appropriate setting. It is only called in the server form

NewCinderella ( string id, string fname, string lname, string date, string time, string referral ) : string

Inserts into the Cinderella Table the new Cinderella to be added

NewGodMother ( string fname, string lname ) : string

Adds a new Godmother to the database. Since the godmother id's are automatically assigned this method will return their ID so that you can use that in the rest of the program logic like adding the godmother to shifts.

SQL_Queries ( ) : System
endShift ( ) : void

Resets all godmothers back to a status of pending.

getCinderellaStatus ( string statustocheck, string orderby ) : DataSet

Retrieves all cinderellas with the current specified status.

getCinderellas ( bool isShopping, bool isDoneShopping, bool isCheckedOut, string orderby ) : DataSet

getCurrentlyShopping ( ) : DataSet

Retrieves a dataset of those who are currently shopping.

getDate ( ) : string

Retrieves the current date and time from the database server.

getGlobalizedSettings ( string appProperty ) : string

Method will retrieve settings from the database in the ConfigSettings table.

getGodmotherStatus ( string statustocheck, string orderby, bool filterToday ) : DataSet

Retreives all godmothers of the status specified.

getGodmotherStatusByShift ( string statustocheck, string orderby, string shiftID ) : DataSet

Returns godmothers working a specific shift with a specific status.

getMaxCinderellaID ( ) : string

getNotes ( bool isShopping, bool isDoneShopping, bool isCheckedOut, string orderby ) : DataSet

getShiftStartEnd ( bool shiftStart ) : bool

Method is used to determine if a shift can be started or ended. If a shift is started it can be ended but not started again. EXAMPLE USAGE: if (sqlQuery.getShiftStartEnd(true)) \\shiftend { randomizeStartToolStripMenuItem1.Enabled = true; } else { randomizeStartToolStripMenuItem1.Enabled = false; } if (sqlQuery.getShiftStartEnd(false))//aka shiftEnd { endShiftToolStripMenuItem.Enabled = true; } else { endShiftToolStripMenuItem.Enabled = false; } if (sqlQuery.getShiftStartEnd(true) && sqlQuery.getShiftStartEnd(false)) { //This is an initial launch of the program and both fields are blank randomizeStartToolStripMenuItem1.Enabled = true; endShiftToolStripMenuItem.Enabled = false; }

getStats ( ) : string

Retrieves all of the current stats for the system.

insertPair ( string cinderellaID, string godmotherID ) : void

setCinderellaDetails ( string ID, string dressSize, string shoeSize, int altered, string notes, string time, string Fname, string Lname ) : void

setGodmotherDetails ( string ID, string Fname, string Lname ) : void

setPairing ( string godmotherID, string cinderellaID ) : void

Pairs a godmother and Cinderella.

setShiftStartEnd ( bool shiftStart, bool clear ) : void

Updates the time of either a shift start or shift end in the ConfigSettings table.

setStatus ( string ID, string status, bool cinderella, bool importRunning ) : void

Sets the status of a cinderella or godmother.

sqlSelect ( string keyword ) : DataSet

This method houses all of the basic "Select" statements.

sqlStatment ( string mysql ) : int

Will execute a non-query sql statment.

메소드 상세

AddGodmotherShift() 공개 메소드

Adds a godmother to a shift.
public AddGodmotherShift ( string shift, string ID ) : void
shift string Shift ID
ID string Godmother ID
리턴 void

DeleteGodMother() 공개 메소드

Deletes a Godmother from the system. Actually this method just sets the delete flag since we don't actually want to delete the godmother from the database.
public DeleteGodMother ( string godmotherID ) : void
godmotherID string Godmother ID to delete
리턴 void

MatchMakerProcess() 공개 메소드

MatchMaker Process begins here! This Process is what currently will match cinderellas and fairygodmothers and also change ther statuses to the appropriate setting. It is only called in the server form
public MatchMakerProcess ( ) : void
리턴 void

NewCinderella() 공개 메소드

Inserts into the Cinderella Table the new Cinderella to be added
public NewCinderella ( string id, string fname, string lname, string date, string time, string referral ) : string
id string Cinderellas given iD
fname string Cinderellas First Name
lname string Cinderellas Last Name
date string Cinderellas Appt Date
time string Cinderellas Appt Time
referral string The person who referred the Cinderella to the Program
리턴 string

NewGodMother() 공개 메소드

Adds a new Godmother to the database. Since the godmother id's are automatically assigned this method will return their ID so that you can use that in the rest of the program logic like adding the godmother to shifts.
public NewGodMother ( string fname, string lname ) : string
fname string Godmothers First Name
lname string Godmothers Last Name
리턴 string

SQL_Queries() 공개 메소드

public SQL_Queries ( ) : System
리턴 System

endShift() 공개 메소드

Resets all godmothers back to a status of pending.
public endShift ( ) : void
리턴 void

getCinderellaStatus() 공개 메소드

Retrieves all cinderellas with the current specified status.
public getCinderellaStatus ( string statustocheck, string orderby ) : DataSet
statustocheck string Status that you are checking for (ie. shopping, pending, etc)
orderby string How the data should be ordered (ie. lname)
리턴 System.Data.DataSet

getCinderellas() 공개 메소드

public getCinderellas ( bool isShopping, bool isDoneShopping, bool isCheckedOut, string orderby ) : DataSet
isShopping bool
isDoneShopping bool
isCheckedOut bool
orderby string
리턴 System.Data.DataSet

getCurrentlyShopping() 공개 메소드

Retrieves a dataset of those who are currently shopping.
public getCurrentlyShopping ( ) : DataSet
리턴 System.Data.DataSet

getDate() 공개 메소드

Retrieves the current date and time from the database server.
public getDate ( ) : string
리턴 string

getGlobalizedSettings() 공개 메소드

Method will retrieve settings from the database in the ConfigSettings table.
public getGlobalizedSettings ( string appProperty ) : string
appProperty string the appProperty key of the setting you are retreiving from the database
리턴 string

getGodmotherStatus() 공개 메소드

Retreives all godmothers of the status specified.
public getGodmotherStatus ( string statustocheck, string orderby, bool filterToday ) : DataSet
statustocheck string Status that you are checking for (ie. shopping, pending, etc)
orderby string How the data should be ordered (ie. lname)
filterToday bool True-Only those for the current day :: False-for everyone with the specific status.
리턴 System.Data.DataSet

getGodmotherStatusByShift() 공개 메소드

Returns godmothers working a specific shift with a specific status.
public getGodmotherStatusByShift ( string statustocheck, string orderby, string shiftID ) : DataSet
statustocheck string Status that you are checking for (ie. shopping, pending, etc)
orderby string How the data should be ordered (ie. lname)
shiftID string Id of the shift you are checking
리턴 System.Data.DataSet

getMaxCinderellaID() 공개 메소드

public getMaxCinderellaID ( ) : string
리턴 string

getNotes() 공개 메소드

public getNotes ( bool isShopping, bool isDoneShopping, bool isCheckedOut, string orderby ) : DataSet
isShopping bool
isDoneShopping bool
isCheckedOut bool
orderby string
리턴 System.Data.DataSet

getShiftStartEnd() 공개 메소드

Method is used to determine if a shift can be started or ended. If a shift is started it can be ended but not started again. EXAMPLE USAGE: if (sqlQuery.getShiftStartEnd(true)) \\shiftend { randomizeStartToolStripMenuItem1.Enabled = true; } else { randomizeStartToolStripMenuItem1.Enabled = false; } if (sqlQuery.getShiftStartEnd(false))//aka shiftEnd { endShiftToolStripMenuItem.Enabled = true; } else { endShiftToolStripMenuItem.Enabled = false; } if (sqlQuery.getShiftStartEnd(true) && sqlQuery.getShiftStartEnd(false)) { //This is an initial launch of the program and both fields are blank randomizeStartToolStripMenuItem1.Enabled = true; endShiftToolStripMenuItem.Enabled = false; }
public getShiftStartEnd ( bool shiftStart ) : bool
shiftStart bool True-shift start : False-shift end
리턴 bool

getStats() 공개 메소드

Retrieves all of the current stats for the system.
public getStats ( ) : string
리턴 string

insertPair() 공개 메소드

public insertPair ( string cinderellaID, string godmotherID ) : void
cinderellaID string
godmotherID string
리턴 void

setCinderellaDetails() 공개 메소드

public setCinderellaDetails ( string ID, string dressSize, string shoeSize, int altered, string notes, string time, string Fname, string Lname ) : void
ID string
dressSize string
shoeSize string
altered int
notes string
time string
Fname string
Lname string
리턴 void

setGodmotherDetails() 공개 메소드

public setGodmotherDetails ( string ID, string Fname, string Lname ) : void
ID string
Fname string
Lname string
리턴 void

setPairing() 공개 메소드

Pairs a godmother and Cinderella.
public setPairing ( string godmotherID, string cinderellaID ) : void
godmotherID string ID of the Godmother
cinderellaID string ID of the Cinderella
리턴 void

setShiftStartEnd() 공개 메소드

Updates the time of either a shift start or shift end in the ConfigSettings table.
public setShiftStartEnd ( bool shiftStart, bool clear ) : void
shiftStart bool True-set the shift start time :: False-Set the shift end time.
clear bool True-Clear the value :: False-Set the value with the current datetime
리턴 void

setStatus() 공개 메소드

Sets the status of a cinderella or godmother.
public setStatus ( string ID, string status, bool cinderella, bool importRunning ) : void
ID string Id of the Cinderella or Godmother
status string Status that you would like to set.
cinderella bool true-set the status of a cinderella :: false-set the status of a godmother
importRunning bool true-if the import is currently running.
리턴 void

sqlSelect() 공개 메소드

This method houses all of the basic "Select" statements.
public sqlSelect ( string keyword ) : DataSet
keyword string Keyword identifying the select statment in the switch.
리턴 System.Data.DataSet

sqlStatment() 공개 메소드

Will execute a non-query sql statment.
public sqlStatment ( string mysql ) : int
mysql string SQL statement to be executed.
리턴 int