Beispiel #1
0
 private void bGWorkerLogFinished_DoWork(object sender, DoWorkEventArgs e)
 {
     RequestsDB requestDB = new RequestsDB();
     CleanProcedure mReq = (CleanProcedure)e.Argument;
     e.Result = requestDB.FinishClean(mReq);
     if ((int)e.Result > 0)
     {
         SendEmail(mReq.mReqID);
     }
 }
Beispiel #2
0
        public int FinishClean(CleanProcedure reqCleanProcedures)
        {
            String       now = DateTime.Now.ToString();
            OleDbCommand cmd = new OleDbCommand();

            cmd.CommandText = "UPDATE " + REQUESTTABLE + " SET [FinishedOn] = @date, [Decon] = @decon, [Dishwasher] = @dishwasher, " +
                              "[WaterPik] = @waterpik, [Ultrasonic] = @ultrasonic, [Crest10] = @crest10, [Crest20] = @crest20, [CrestLong] = @crestlong WHERE [RequestID] = @reqID";
            cmd.Parameters.AddWithValue("@date", now);
            cmd.Parameters.AddWithValue("@decon", reqCleanProcedures.mDecon);
            cmd.Parameters.AddWithValue("@dishwasher", reqCleanProcedures.mDishWasher);
            cmd.Parameters.AddWithValue("@waterpik", reqCleanProcedures.mWaterPik);
            cmd.Parameters.AddWithValue("@ultrasonic", reqCleanProcedures.mUltrasonic);
            cmd.Parameters.AddWithValue("@crest10", reqCleanProcedures.mCrest10);
            cmd.Parameters.AddWithValue("@crest20", reqCleanProcedures.mCrest20);
            cmd.Parameters.AddWithValue("@crestlong", reqCleanProcedures.mCrestLong);
            cmd.Parameters.AddWithValue("@reqID", reqCleanProcedures.mReqID);
            return(requestDB.Update(cmd));
        }
Beispiel #3
0
 public FinishForm(int req)
 {
     InitializeComponent();
     reqId = req;
     cleanProcedure = new CleanProcedure();
 }