CinderellaMGS.SQL_Queries.setStatus C# (CSharp) Method

setStatus() public method

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.
return void
        public void setStatus(string ID, string status, bool cinderella, bool importRunning)
        {
            string query = "";

            if (cinderella)
            {//Set status of cinderella
                query = "INSERT INTO [CinderellaTimestamp]([cinderellaID], [timestamp], [status]) VALUES(";
            }
            else
            {//Set status of godmother
                query = "INSERT INTO [FairyGodmotherTimestamp]([fairyGodmotherID], [timestamp], [status]) VALUES(";
            }

            //Lets finish our statement!
            query += ID + ", GetDate(),'" + status + "')";

            //Execute our lovely query!
            database.ExecuteQuery(query);

            //check if this is an import if its an import wait untill it is finished to run this
            //NH: Matchmaker will only be run from a single form now
            /*if (importRunning == false)
            {
                //Run MatchMaker!
                MatchMakerProcess();
            }*/
        }