Exemplo n.º 1
0
 private void Update_KhenThuong()
 {
     Class.QuaTrinhLamViec_KhenThuong kt = new Class.QuaTrinhLamViec_KhenThuong();
     kt.RewardID     = txtRewardID.Text;
     kt.Foundation   = txtFoundation.Text;
     kt.Reason       = txtReason.Text;
     kt.Form         = txtForm.Text;
     kt.DecideNumber = txtDecideNumber.Text;
     kt.Date         = dateDate.DateTime;
     kt.Person       = txtPerson.Text;
     kt.EmployeeCode = Class.App._manv;
     if (txtRewardID.Enabled == true)
     {
         if (kt.Insert())
         {
             Class.App.SaveSuccessfully();
         }
         else
         {
             Class.App.SaveNotSuccessfully();
         }
     }
     else
     {
         if (kt.Update())
         {
             Class.App.SaveSuccessfully();
         }
         else
         {
             Class.App.SaveNotSuccessfully();
         }
     }
     (this.Owner as frmQuaTrinhLamViec_KhenThuong).CT_PROCESS_REWARD_GetListByEmployee();
 }
Exemplo n.º 2
0
        private void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int SelectedRow = gridItemDetail.FocusedRowHandle;

            if (SelectedRow >= 0)
            {
                DataRow drow   = gridItemDetail.GetDataRow(SelectedRow);
                string  _value = drow["RewardID"].ToString();
                if (Class.App.ConfirmDeletion() == DialogResult.No)
                {
                    return;
                }

                Class.QuaTrinhLamViec_KhenThuong kt = new Class.QuaTrinhLamViec_KhenThuong();
                kt.RewardID = _value;
                if (kt.Delete())
                {
                    Class.App.DeleteSuccessfully();
                    CT_PROCESS_REWARD_GetListByEmployee();
                }
                else
                {
                    Class.App.DeleteNotSuccessfully();
                }
            }
        }
Exemplo n.º 3
0
        private void call_info(string Form_name, string code)
        {
            Class.QuaTrinhLamViec_KhenThuong kt = new Class.QuaTrinhLamViec_KhenThuong();
            kt.RewardID = code;
            DataTable dt = kt.CT_PROCESS_REWARD_Get();

            txtFoundation.Text   = dt.Rows[0]["Foundation"].ToString();
            txtReason.Text       = dt.Rows[0]["Reason"].ToString();
            txtForm.Text         = dt.Rows[0]["Form"].ToString();
            txtDecideNumber.Text = dt.Rows[0]["DecideNumber"].ToString();
            dateDate.DateTime    = (DateTime)dt.Rows[0]["Date"];
            txtPerson.Text       = dt.Rows[0]["Person"].ToString();
            txtRewardID.Text     = code;
        }
Exemplo n.º 4
0
 public void CT_PROCESS_REWARD_GetListByEmployee()
 {
     Class.QuaTrinhLamViec_KhenThuong kt = new Class.QuaTrinhLamViec_KhenThuong();
     gridItem.DataSource = kt.CT_PROCESS_REWARD_GetListByEmployee();
     gridItemDetail.OptionsView.ColumnAutoWidth = false;
 }