상속: IP.Core.IPUserService.US_Object
 internal void display_for_update(US_GD_NHAN_VIEN_PHU_CAP v_us)
 {
     m_e_form_mode = DataEntryFormMode.UpdateDataState;
     m_us = v_us;
     us_to_form();
     m_sle_nhan_vien.Enabled = false;
     this.ShowDialog();
 }
        private void load_data_2_grid()
        {
            CHRMCommon.make_stt(m_grv);
            //DS_V_GD_NHAN_VIEN_PHU_CAP_V2 v_ds = new DS_V_GD_NHAN_VIEN_PHU_CAP_V2();
            //US_V_GD_NHAN_VIEN_PHU_CAP_V2 v_us = new US_V_GD_NHAN_VIEN_PHU_CAP_V2();
            US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP();

            m_grc.DataSource = v_us.LayDanhSach();
        }
 private bool check_loai_pc_dang_su_dung(decimal ip_id_loai_pc)
 {
     US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP();
     DS_GD_NHAN_VIEN_PHU_CAP v_ds = new DS_GD_NHAN_VIEN_PHU_CAP();
     v_us.FillDataset(v_ds, "where id_phu_cap =" + ip_id_loai_pc);
     if (v_ds.Tables[0].Rows.Count == 0)
         return false;
     return true;
 }
 private void m_cmd_sua_Click(object sender, EventArgs e)
 {
     try
     {
         var v_dr = m_grv.GetDataRow(m_grv.FocusedRowHandle);
         US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP(decimal.Parse(v_dr["ID"].ToString()));
         F393_nhan_vien_phu_cap_de v_f = new F393_nhan_vien_phu_cap_de();
         v_f.display_for_update(v_us);
         load_data_2_grid();
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }
 private void m_cmd_update_Click(object sender, EventArgs e)
 {
     try
     {
         F395_nhan_vien_phu_cap_de v_f = new F395_nhan_vien_phu_cap_de();
         int v_index_dr = m_grv.FocusedRowHandle;
         if (v_index_dr >= 0 )
         {
             var v_dr = m_grv.GetDataRow(v_index_dr);
             US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP(CIPConvert.ToDecimal(v_dr["ID"]));
             v_f.display_for_update(v_us);
             load_data_2_grid();
         }
         else
         {
             string v_str_error = "Bạn chưa chọn dòng dữ liệu để sửa!";
             XtraMessageBox.Show(v_str_error, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }
 private void m_cmd_xoa_Click(object sender, EventArgs e)
 {
     try
     {
         F395_nhan_vien_phu_cap_de v_f = new F395_nhan_vien_phu_cap_de();
         int v_index_dr = m_grv.FocusedRowHandle;
         if (v_index_dr >= 0)
         {
             string v_str_confirm = "Bạn có chắc chắn muốn xóa phụ cấp này";
             DialogResult v_dialog = XtraMessageBox.Show(v_str_confirm, "Xác nhận", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
             if (v_dialog == DialogResult.Yes)
             {
                 US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP(CIPConvert.ToDecimal(m_grv.GetDataRow(v_index_dr)["ID"]));
                 //v_us.datNGAY_SUA = DateTime.Now;
                 //v_us.strNGUOI_SUA = IP.Core.IPSystemAdmin.CAppContext_201.getCurrentUserName();
                 //v_us.strDA_XOA = "Y";
                 v_us.Delete();
                 XtraMessageBox.Show("Đã xóa thành công phụ cấp!");
                 load_data_2_grid();
             }
         }
         else
         {
             string v_str_error = "Bạn chưa chọn dòng dữ liệu để xóa!";
             XtraMessageBox.Show(v_str_error, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception v_e)
     {
         IP.Core.IPCommon.CSystemLog_301.ExceptionHandle(v_e);
     }
 }
 private void m_cmd_xoa_Click(object sender, EventArgs e)
 {
     try
     {
         string v_str_confirm = "Bạn có chắc chắn muốn xóa phụ cấp trách nhiệm này?";
         DialogResult v_dialog = XtraMessageBox.Show(v_str_confirm, "Xác nhận", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (v_dialog == DialogResult.Yes)
         {
             US_GD_NHAN_VIEN_PHU_CAP v_us = new US_GD_NHAN_VIEN_PHU_CAP(CIPConvert.ToDecimal(m_grv.GetDataRow(m_grv.FocusedRowHandle)["ID"].ToString()));
             v_us.datNGAY_SUA = CHRMCommon.get_first_day_of_month(DateTime.Now.Date);
             v_us.strDA_XOA = "Y";
             v_us.Update();
             XtraMessageBox.Show("Đã xóa thành công phụ cấp!");
             load_data_2_grid();
         }
     }
     catch (Exception v_e)
     {
         IP.Core.IPCommon.CSystemLog_301.ExceptionHandle(v_e);
     }
 }