Inheritance: IP.Core.IPUserService.US_Object
 internal void DisplayForUpdate(US.US_DM_LOAI_NGAY_CONG v_us)
 {
     this.Text = "F105 - Sửa loại ngày công";
     m_e_form_mode = DataEntryFormMode.UpdateDataState;
     m_us = v_us;
     us_to_form(m_us);
     this.CenterToScreen();
     this.ShowDialog();
 }
 private void us_to_form(US_DM_LOAI_NGAY_CONG m_us)
 {
     m_txt_ma_ngay_cong.Text = m_us.strMA_NGAY_CONG;
     m_txt_ten_ngay_cong.Text = m_us.strTEN_NGAY_CONG;
     m_txt_ti_le_lns.EditValue = m_us.dcTI_LE_LNS;
     m_txt_ti_le_lcd.EditValue = m_us.dcTI_LE_LCD;
 }
 private void m_cmd_delete_Click(object sender, EventArgs e)
 {
     try
     {
         if(m_grv_dm_loai_ngay_cong.FocusedRowHandle < 0)
         {
             XtraMessageBox.Show("Bạn cần chọn loại ngày công để xóa trước!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         var v_dlg = XtraMessageBox.Show("CÂN NHẮC: Bạn có chắc chắn muốn xóa dữ liệu?\nDữ liệu loại ngày công dùng để chấm công và tính lương có thể được dùng trong các tháng trước!", "THÔNG BÁO", MessageBoxButtons.YesNo, MessageBoxIcon.Stop);
         if(v_dlg == System.Windows.Forms.DialogResult.Yes)
         {
             DataRow v_dr = m_grv_dm_loai_ngay_cong.GetDataRow(m_grv_dm_loai_ngay_cong.FocusedRowHandle);
             decimal v_id = CIPConvert.ToDecimal(v_dr[DM_LOAI_NGAY_CONG.ID]);
             US_DM_LOAI_NGAY_CONG v_us_to_delete = new US_DM_LOAI_NGAY_CONG();
             v_us_to_delete.DeleteByID(v_id);
             XtraMessageBox.Show("Xóa dữ liệu thành công!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Information);
             load_data_2_grid();
         }
     }
     catch(Exception v_e)
     {
         XtraMessageBox.Show("Dữ liệu đã được sử dụng để chấm công, không được xóa!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         //CSystemLog_301.ExceptionHandle(v_e);
     }
 }
 private void form_to_us(US_DM_LOAI_NGAY_CONG m_us)
 {
     m_us.strMA_NGAY_CONG = m_txt_ma_ngay_cong.Text;
     m_us.strTEN_NGAY_CONG = m_txt_ten_ngay_cong.Text;
     m_us.dcTI_LE_LNS = CIPConvert.ToDecimal(m_txt_ti_le_lns.EditValue);
     m_us.dcTI_LE_LCD = CIPConvert.ToDecimal(m_txt_ti_le_lcd.EditValue);
 }
        private void m_cmd_update_Click(object sender, EventArgs e)
        {
            try
            {
                DataRow v_dr = m_grv_dm_loai_ngay_cong.GetDataRow(m_grv_dm_loai_ngay_cong.FocusedRowHandle);
                decimal v_id = CIPConvert.ToDecimal(v_dr[DM_LOAI_NGAY_CONG.ID]);

                US_DM_LOAI_NGAY_CONG v_us = new US_DM_LOAI_NGAY_CONG(v_id);
                F105_dm_loai_ngay_cong_de v_frm = new F105_dm_loai_ngay_cong_de();
                v_frm.DisplayForUpdate(v_us);
                load_data_2_grid();
            }
            catch(Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }