Ejemplo n.º 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (IsCorrectData())
     {
         using (clsUndertime undertime = new clsUndertime())
         {
             undertime.Username         = cmbRequestor.SelectedValue.ToString();
             undertime.DateFiled        = dtpFileDate.Value;
             undertime.DateApplied      = clsDateTime.CombineDateTime(dtpDateApplied.Value, dtpTimeApplied.Value);
             undertime.Reason           = txtReason.Text;
             undertime.ApproverUsername = cmbApprover.SelectedValue.ToString();
             undertime.ApproverDate     = dtpDateProcess.Value;
             undertime.ApproverRemarks  = txtRemarks.Text;
             undertime.Status           = cmbStatus.SelectedValue.ToString();
             undertime.InsertAdmin();
         }
         _frmUndertimeList.BindUndertimeList();
         this.Close();
     }
 }
Ejemplo n.º 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (IsCorrectData())
     {
         using (clsUndertime undertime = new clsUndertime())
         {
             undertime.UndertimeCode    = txtUndertimeCode.Text;
             undertime.Username         = cmbRequestor.SelectedValue.ToString();
             undertime.DateFiled        = dtpFileDate.Value;
             undertime.DateApplied      = clsDateTime.CombineDateTime(dtpDateApplied.Value, dtpTimeApplied.Value);
             undertime.Reason           = txtReason.Text;
             undertime.ApproverUsername = cmbApprover.SelectedValue.ToString();
             undertime.ApproverDate     = dtpDateProcess.Value;
             undertime.ApproverRemarks  = txtRemarks.Text;
             undertime.Status           = cmbStatus.SelectedValue.ToString();
             undertime.InsertAdmin();
         }
         _frmUndertimeList.BindUndertimeList();
         this.Close();
         MessageBox.Show("Undertime has been filed successfully", "Undertime File", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }