コード例 #1
0
ファイル: voe.aspx.cs プロジェクト: hectorhaas/PreCheck
        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();
        }
コード例 #2
0
ファイル: DA_VOE.cs プロジェクト: hectorhaas/PreCheck
 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;
 }
コード例 #3
0
ファイル: DA_VOE.cs プロジェクト: hectorhaas/PreCheck
 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());
 }
コード例 #4
0
ファイル: BL_VOE.cs プロジェクト: hectorhaas/PreCheck
 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;
     }
 }
コード例 #5
0
ファイル: BL_VOE.cs プロジェクト: hectorhaas/PreCheck
 public void updateLogs(BM_Logs logs)
 {
     DA_VOE dav = new DA_VOE();
     dav.updateLogs(logs);
 }