Exemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            btnSubmit.Enabled = false;
            btnLock.Enabled = true;

            txtPrivateNotes.Enabled = false;
            txtPublicNotes.Enabled = false;
            txtSignOff.Enabled = false;

            //do the things
            BL_VOE blv = new BL_VOE();
            string voeID = Request.QueryString.Get("id");
            BM_Logs bml = new BM_Logs();
            bml.voeID = voeID;
            bml.signoff = txtSignOff.Text;
            bml.privateNotes = txtPrivateNotes.Text;
            bml.publicNotes = txtPublicNotes.Text;
            //get seconds
            DateTime pastdate = Convert.ToDateTime(hdnDate.Value.ToString());
            bml.seconds = Convert.ToInt32(((DateTime.Now - pastdate).TotalSeconds));
            //Update
            blv.updateLogs(bml);

            txtPrivateNotes.Text = "";
            txtPublicNotes.Text = "";

            CareForLogs();
        }
Exemplo n.º 2
0
 public BM_Logs getLogs(string voeID)
 {
     string query = "Select * hectorhaas.precheckVOE WHERE voeID = " + voeID;
     DataTable dt = DataAccess.getAnyDataTable(query);
     BM_Logs bml = new BM_Logs();
     bml.id = dt.Rows[0]["id"].ToString();
     bml.privateNotes = dt.Rows[0]["privateNotes"].ToString();
     bml.publicNotes = dt.Rows[0]["publicNotes"].ToString();
     bml.voeID = dt.Rows[0]["voeID"].ToString();
     return bml;
 }
Exemplo n.º 3
0
 public void updateLogs(BM_Logs logs)
 {
     string query = "Select id, publicNotes, privateNotes, voeID FROM hectorhaas.precheckLogs WHERE voeID = "+logs.voeID;
     DataTable dt = DataAccess.getAnyDataTable(query);
     logs.privateNotes = logs.privateNotes +"<br /><br />" + dt.Rows[0]["privateNotes"].ToString();
     logs.publicNotes = logs.publicNotes + "<br /><br />" + dt.Rows[0]["publicNotes"].ToString();
     query = "UPDATE hectorhaas.precheckLogs SET publicNotes = '" + logs.publicNotes.Trim().Replace("'","''")+ "', privateNotes='" + logs.privateNotes.Trim().Replace("'", "''") + "', signoff = '"+logs.signoff.Trim().Replace("'","''")+"' WHERE voeID = " + logs.voeID;
     DataAccess.justExecuteQuery(query);
     //add time attempts
     DA_Attempts daa = new DA_Attempts();
     daa.insertAttempt(logs.seconds.ToString());
 }
Exemplo n.º 4
0
 public BM_Logs CareForLogs(string voeID)
 {
     DA_VOE dav = new DA_VOE();
     DataTable dt = dav.CareForLogs(voeID);
     BM_Logs bml = new BM_Logs();
     if (dt.Rows.Count>0)
     {
         bml.id = dt.Rows[0]["id"].ToString();
         bml.publicNotes = dt.Rows[0]["publicNotes"].ToString();
         bml.privateNotes = dt.Rows[0]["privateNotes"].ToString();
         bml.signoff = dt.Rows[0]["signoff"].ToString();
         bml.voeID = dt.Rows[0]["voeID"].ToString();
         return bml;
     }
     else
     {
         return null;
     }
 }
Exemplo n.º 5
0
 public void updateLogs(BM_Logs logs)
 {
     DA_VOE dav = new DA_VOE();
     dav.updateLogs(logs);
 }