protected void m_cmd_de_nghi_xu_ly_Click(object sender, EventArgs e)
 {
     try
     {
         clear_message();
         Thread.Sleep(2000);
         foreach (GridViewRow row in m_grv_danh_sach_nha.Rows)
         {
             bool v_ch;
             CheckBox v_checkbox = (CheckBox)row.FindControl("chkItem");
             if (v_checkbox != null)
             {
                 // Nếu checkbox của dòng này được checked thì ta thực hiện 1 số công việc sau
                 if (v_checkbox.Checked)
                 {
                     // Chỗ này là công việc cần thực hiện khi checkbox đc checkded
                     decimal v_id = CIPConvert.ToDecimal(m_grv_danh_sach_nha.DataKeys[row.RowIndex].Value);
                     m_us_dm_dat = new US_DM_DAT(v_id);
                     m_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DE_NGHI_XU_LY;
                     m_us_dm_dat.Update();
                 }
             }
         }
         // Hiển thị các ID được checked ra màn hình
         Response.Write(m_str_id_checked);
         load_data_to_grid();
         set_trang_thai_cmd();
         m_lbl_message.Text = "Đã cập nhật thành công";
         m_ddl_bo_tinh.Focus();
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }
    private List<US_DM_DAT> get_top_dat(string ip_str_ten_ts, decimal ip_dc_id_dv_sd)
    {
        US_DM_DAT v_us_dm_dat = new US_DM_DAT();
        DS_DM_DAT v_ds_dm_dat = new DS_DM_DAT();
        v_ds_dm_dat.EnforceConstraints = false;
        v_us_dm_dat.search_dat_by_dia_chi(v_ds_dm_dat, ip_str_ten_ts, ip_dc_id_dv_sd);
        List<US_DM_DAT> v_list = new List<US_DM_DAT>();
        for (int i = 0; i < v_ds_dm_dat.DM_DAT.Rows.Count; i++ )
        {
            US_DM_DAT v_us_temp = new US_DM_DAT();
            v_us_temp.dcID = int.Parse(v_ds_dm_dat.DM_DAT.Rows[i][DM_DAT.ID].ToString());
            v_us_temp.strDIA_CHI = v_ds_dm_dat.DM_DAT.Rows[i][DM_DAT.DIA_CHI].ToString();
            v_list.Add(v_us_temp);
        }

        return v_list;
    }
    private void them_moi_tang_giam()
    {
        US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
        m_us_gd_tang_giam_tai_san = new US_GD_TANG_GIAM_TAI_SAN();
        m_us_gd_tang_giam_tai_san.datNGAY_DUYET = CIPConvert.ToDatetime(m_txt_ngay_duyet.Text);
        m_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN = CIPConvert.ToDatetime(m_txt_ngay_tang_giam.Text);
        m_us_gd_tang_giam_tai_san.dcID_LY_DO_TANG_GIAM = CIPConvert.ToDecimal(m_cbo_ly_do_thay_doi.SelectedValue);
        m_us_gd_tang_giam_tai_san.strTANG_GIA_TRI_TAI_SAN_YN = m_rbl_loai.SelectedValue;

        m_us_gd_tang_giam_tai_san.dcID_TAI_SAN = v_us_dm_dat.dcID;
        m_us_gd_tang_giam_tai_san.dcID_LOAI_TAI_SAN = v_us_dm_dat.dcID_LOAI_TAI_SAN;
        m_us_gd_tang_giam_tai_san.strMA_PHIEU = m_txt_ma_phieu.Text;
        m_us_gd_tang_giam_tai_san.dcDIEN_TICH = v_us_dm_dat.dcDT_KHUON_VIEN;
        m_us_gd_tang_giam_tai_san.dcGIA_TRI_NGUYEN_GIA_TANG_GIAM = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN;

        m_us_gd_tang_giam_tai_san.dcID_NGUOI_LAP = Person.get_user_id();
        m_us_gd_tang_giam_tai_san.dcID_NGUOI_DUYET = Person.get_user_id();

        m_us_gd_tang_giam_tai_san.Insert();

        // Phần cập nhật thông tin cho DM
        if (m_rbl_loai.SelectedValue == "N")
        {
            v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DA_THANH_LY;
            v_us_dm_dat.Update();
        }

        m_lbl_message.Text = "Cập nhật thành công";
    }
    private void them_moi_tang_giam()
    {
        US_GD_TANG_GIAM_TAI_SAN v_us_gd_tang_giam_tai_san = new US_GD_TANG_GIAM_TAI_SAN();

        if (!v_us_gd_tang_giam_tai_san.check_valid_ma_phieu(m_txt_ma_phieu.Text))
        {
            m_lbl_mess_tg.Text = "Mã phiểu tăng giảm này đã tồn tại";
            return;
        }
        m_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_hdf_id.Value));
        v_us_gd_tang_giam_tai_san.datNGAY_DUYET = m_dat_ngay_duyet.SelectedDate;
        v_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN = m_dat_ngay_tang_giam.SelectedDate;
        v_us_gd_tang_giam_tai_san.dcID_LY_DO_TANG_GIAM = CIPConvert.ToDecimal(m_cbo_ly_do_thay_doi.SelectedValue);
        v_us_gd_tang_giam_tai_san.strTANG_GIA_TRI_TAI_SAN_YN = m_rbl_loai.SelectedValue;

        v_us_gd_tang_giam_tai_san.dcID_TAI_SAN = m_us_dm_dat.dcID;
        v_us_gd_tang_giam_tai_san.dcID_LOAI_TAI_SAN = m_us_dm_dat.dcID_LOAI_TAI_SAN;
        v_us_gd_tang_giam_tai_san.strMA_PHIEU = m_txt_ma_phieu.Text;
        v_us_gd_tang_giam_tai_san.dcDIEN_TICH = m_us_dm_dat.dcDT_KHUON_VIEN;
        v_us_gd_tang_giam_tai_san.dcGIA_TRI_NGUYEN_GIA_TANG_GIAM = m_us_dm_dat.dcGT_THEO_SO_KE_TOAN;

        v_us_gd_tang_giam_tai_san.dcID_NGUOI_LAP = Person.get_user_id();
        v_us_gd_tang_giam_tai_san.dcID_NGUOI_DUYET = Person.get_user_id();

        v_us_gd_tang_giam_tai_san.Insert();

        // Phần cập nhật thông tin cho DM
        load_data_2_form();
        m_lbl_mess.Text = "Đã cập nhật thông tin tăng giảm thành công";
        m_txt_ma_phieu.Text = "";
        hidden_panel_tang_giam();
    }
    private bool check_validate_data_is_ok()
    {
        if (m_ddl_don_vi_chu_quan.SelectedValue == "")
        {
            m_lbl_mess.Text = "Bạn chưa chọn đơn vị chủ quản!";
            m_txt_dia_chi.Focus();
            return false;
        }
        if (m_e_form_mode == DataEntryFormMode.InsertDataState)
        {
            if (!m_us_dm_dat.check_ma_tai_san_is_valid(m_txt_ma_tai_san.Text))
            {
                m_lbl_mess.Text = "Lỗi: Không thể cập nhật do ban nhập Mã tài sản đã tồn tại!";
                m_txt_ma_tai_san.Focus();
                return false;
            }
        }
        if (m_e_form_mode == DataEntryFormMode.UpdateDataState)
        {
            m_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_hdf_id.Value));
            if (m_us_dm_dat.strMA_TAI_SAN != m_txt_ma_tai_san.Text)
            {
                if (!m_us_dm_dat.check_ma_tai_san_is_valid(m_txt_ma_tai_san.Text))
                {
                    m_lbl_mess.Text = "Lỗi: Không thể cập nhật do mã tài sản này đã tồn tại!";
                    m_txt_ma_tai_san.Focus();
                    return false;
                }
            }
        }

        if (!CValidateTextBox.IsValid(m_txt_nguyen_gia, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_dien_tich_khuon_vien, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_tru_so_lam_viec, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_lam_nha_o, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_co_so_hdsn, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_cho_thue, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_bo_trong, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_bi_lan_chiem, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_khac, DataType.NumberType, allowNull.YES)) { return false; }
        if (!CValidateTextBox.IsValid(m_txt_nam_xd, DataType.NumberType, allowNull.YES))
        {
            m_lbl_mess.Text = "Lỗi: Số năm đã sử dụng không đúng định dạng số";
            m_txt_nam_xd.Focus();
            return false;
        }

        if (CIPConvert.ToDecimal(m_txt_dien_tich_khuon_vien.Text) < CIPConvert.ToDecimal(m_txt_tru_so_lam_viec.Text) )
        {
            m_lbl_mess.Text = "Lỗi: Diện tích khuôn viên nhỏ hơn diện tích trụ sở làm việc.";
            m_txt_dien_tich_khuon_vien.Focus();
            return false;
        }

        if (CIPConvert.ToDecimal(m_txt_dien_tich_khuon_vien.Text) < CIPConvert.ToDecimal(m_txt_lam_nha_o.Text))
        {
            m_lbl_mess.Text = "Lỗi: Diện tích khuôn viên nhỏ hơn diện tích làm nhà ở.";
            m_txt_dien_tich_khuon_vien.Focus();
            return false;
        }

        if (CIPConvert.ToDecimal(m_txt_dien_tich_khuon_vien.Text) < CIPConvert.ToDecimal(m_txt_co_so_hdsn.Text))
        {
            m_lbl_mess.Text = "Lỗi: Diện tích khuôn viên nhỏ hơn diện tích cơ sở hoạt động sự nghiệp.";
            m_txt_dien_tich_khuon_vien.Focus();
            return false;
        }

        if (CIPConvert.ToDecimal(m_txt_dien_tich_khuon_vien.Text) < CIPConvert.ToDecimal(m_txt_khac.Text))
        {
            m_lbl_mess.Text = "Lỗi: Diện tích khuôn viên nhỏ hơn diện tích sử dụng mục đích khác.";
            m_txt_dien_tich_khuon_vien.Focus();
            return false;
        }

        if (CIPConvert.ToDecimal(m_txt_dien_tich_khuon_vien.Text) < CIPConvert.ToDecimal(m_txt_bo_trong.Text))
        {
            m_lbl_mess.Text = "Lỗi: Diện tích khuôn viên nhỏ hơn diện tích bỏ trống.";
            m_txt_dien_tich_khuon_vien.Focus();
            return false;
        }
        return true;
    }
    private void update_thong_tin_tai_san(US_DM_DAT ip_us_dm_dat)
    {
        US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
        string v_str_ma_don_vi = new Random().Next(1000).ToString();
        v_us_dm_don_vi.strMA_DON_VI = v_str_ma_don_vi;
        v_us_dm_don_vi.dcID_DON_VI_CAP_TREN = ID_DON_VI.DON_VI_CHU_QUAN_KHAC;
        v_us_dm_don_vi.dcID_LOAI_DON_VI = ID_LOAI_DON_VI.DV_SU_DUNG;
        v_us_dm_don_vi.dcLEVEL_MODE = 3;
        v_us_dm_don_vi.strTEN_DON_VI = m_txt_don_vi_nhan_dieu_chuyen.Text.Trim();
        v_us_dm_don_vi.strLOAI_HINH_DON_VI = TEN_LOAI_HINH_DON_VI.DON_VI_SU_NGHIEP_CTCTC;

        v_us_dm_don_vi.Insert();

        decimal v_id_don_vi_moi = v_us_dm_don_vi.dcID;
        v_us_dm_don_vi.strMA_DON_VI = "DVK" + v_id_don_vi_moi.ToString();
        v_us_dm_don_vi.Update();

        US_HT_QUAN_HE_SU_DUNG_DU_LIEU v_us_ht_qhsddl = new US_HT_QUAN_HE_SU_DUNG_DU_LIEU();
        v_us_ht_qhsddl.dcID_DON_VI = v_us_dm_don_vi.dcID;
        v_us_ht_qhsddl.dcID_USER_GROUP = 2;
        v_us_ht_qhsddl.Insert();

        v_us_ht_qhsddl = new US_HT_QUAN_HE_SU_DUNG_DU_LIEU();
        v_us_ht_qhsddl.dcID_DON_VI = v_us_dm_don_vi.dcID;
        v_us_ht_qhsddl.dcID_USER_GROUP = 5;
        v_us_ht_qhsddl.Insert();
        if (m_rbl_loai.SelectedValue == "Y")
        {
            ip_us_dm_dat.dcID_DON_VI_SU_DUNG = v_us_dm_don_vi.dcID;
            ip_us_dm_dat.dcID_DON_VI_CHU_QUAN = ID_DON_VI.DON_VI_CHU_QUAN_KHAC;
            ip_us_dm_dat.Update();
        }
        else
        {
            ip_us_dm_dat.dcID_DON_VI_SU_DUNG = v_us_dm_don_vi.dcID;
            ip_us_dm_dat.dcID_DON_VI_CHU_QUAN = ID_DON_VI.DON_VI_CHU_QUAN_KHAC;
            ip_us_dm_dat.dcDT_KHUON_VIEN = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
            ip_us_dm_dat.strMA_TAI_SAN = ip_us_dm_dat.strMA_TAI_SAN + "-DC";
            ip_us_dm_dat.Insert();
            ip_us_dm_dat.strMA_TAI_SAN = ip_us_dm_dat.strMA_TAI_SAN + "-" + ip_us_dm_dat.dcID;
            ip_us_dm_dat.Update();
        }
    }
    private void them_moi_ghi_tang()
    {
        US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
        m_us_gd_tang_giam_tai_san = new US_GD_TANG_GIAM_TAI_SAN();
        m_us_gd_tang_giam_tai_san.datNGAY_DUYET = m_dat_duyet_dieu_chuyen.SelectedDate;
        m_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN = m_dat_nhan_dieu_chuyen.SelectedDate;
        m_us_gd_tang_giam_tai_san.dcID_LY_DO_TANG_GIAM = ID_LY_DO_TANG_GIAM_TAI_SAN.TRANG_CAP_MUA_MOI;
        m_us_gd_tang_giam_tai_san.strTANG_GIA_TRI_TAI_SAN_YN = "Y";

        m_us_gd_tang_giam_tai_san.dcID_LOAI_TAI_SAN = v_us_dm_dat.dcID_LOAI_TAI_SAN;
        m_us_gd_tang_giam_tai_san.strMA_PHIEU = m_txt_ma_phieu_tang.Text;
        m_us_gd_tang_giam_tai_san.dcDIEN_TICH = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
        if (m_rbl_loai_dieu_chuyen.SelectedValue == "N")
        {
            v_us_dm_dat.strMA_TAI_SAN = v_us_dm_dat.strMA_TAI_SAN + "-DC";
            v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DANG_SU_DUNG;
            v_us_dm_dat.dcDT_KHUON_VIEN = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
            v_us_dm_dat.dcID_DON_VI_SU_DUNG = CIPConvert.ToDecimal(m_cbo_don_vi_su_dung_moi.SelectedValue);
            v_us_dm_dat.Insert();
            v_us_dm_dat.strMA_TAI_SAN = v_us_dm_dat.strMA_TAI_SAN + "-" + v_us_dm_dat.dcID;
            v_us_dm_dat.Update();
            m_us_gd_tang_giam_tai_san.dcDIEN_TICH = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
        }
        m_us_gd_tang_giam_tai_san.dcID_TAI_SAN = v_us_dm_dat.dcID;
        m_us_gd_tang_giam_tai_san.dcGIA_TRI_NGUYEN_GIA_TANG_GIAM = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN;

        m_us_gd_tang_giam_tai_san.dcID_NGUOI_LAP = Person.get_user_id();
        m_us_gd_tang_giam_tai_san.dcID_NGUOI_DUYET = Person.get_user_id();

        m_us_gd_tang_giam_tai_san.Insert();

        m_lbl_message.Text = "Cập nhật thành công";
    }
 //private void load_data_to_ly_do()
 //{
 //    WinFormControls.eLOAI_TANG_GIAM_TAI_SAN v_e_loai = WinFormControls.eLOAI_TANG_GIAM_TAI_SAN.GIAM_TAI_SAN;
 //    string v_str_trang_thai = m_cbo_trang_thai_dat_up.SelectedValue;
 //    switch (v_str_trang_thai)
 //    {
 //        case TRANG_THAI_DAT.DE_NGHI_XU_LY:
 //            v_e_loai = WinFormControls.eLOAI_TANG_GIAM_TAI_SAN.GIAM_TAI_SAN;
 //            break;
 //        case TRANG_THAI_DAT.DA_DIEU_CHUYEN:
 //            v_e_loai = WinFormControls.eLOAI_TANG_GIAM_TAI_SAN.TANG_TAI_SAN;
 //            break;
 //    }
 //    WinFormControls.load_data_to_cbo_ly_do_tang_giam(
 //        WinFormControls.eLOAI_TU_DIEN.LY_DO_TANG_GIAM_TS
 //        , v_e_loai
 //        , m_cbo_ly_do_thay_doi);
 //}
 private void load_data_from_us()
 {
     clear_form_data();
     if (m_cbo_dia_chi.Items.Count == 0) return;
     decimal v_dc_id_dat = CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue);
     if (v_dc_id_dat < 1) return;
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(v_dc_id_dat));
     m_lbl_ma_tai_san.Text = v_us_dm_dat.strMA_TAI_SAN;
     m_lbl_dt_khuon_vien.Text = v_us_dm_dat.dcDT_KHUON_VIEN.ToString("#,##0");
     m_lbl_gt_theo_so_ke_toan.Text = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN.ToString("#,##0");
     m_lbl_so_nam_su_dung.Text = v_us_dm_dat.dcSO_NAM_DA_SU_DUNG.ToString("#,##0");
 }
    private void form_2_us_nha()
    {
        if (!m_hdf_id.Value.Equals(C_STR_NEW_ID_NHA))
        {
            m_us_dm_nha.dcID = CIPConvert.ToDecimal(m_hdf_id.Value);
        }
        m_us_dm_nha.strTEN_TAI_SAN = m_txt_ten_tai_san.Text.Trim();
        m_us_dm_nha.strMA_TAI_SAN = m_txt_ma_tai_san.Text.Trim();
        m_us_dm_nha.dcID_LOAI_TAI_SAN = ID_LOAI_TAI_SAN.NHA;
        if (m_txt_cap_hang.Text.Length == 0)
        {
            m_us_dm_nha.SetCAP_HANGNull();
        }
        else
        {
            m_us_dm_nha.dcCAP_HANG = CIPConvert.ToDecimal(m_txt_cap_hang.Text.Trim());
        }
        if (m_txt_nam_xd.Text.Length == 0)
        {
            m_us_dm_nha.SetNAM_XAY_DUNGNull();
        }
        else
        {
            m_us_dm_nha.dcNAM_XAY_DUNG = CIPConvert.ToDecimal(m_txt_nam_xd.Text.Trim());
        }
        if (m_txt_ngay_su_dung.Text.Length == 0)
        {
            m_us_dm_nha.SetNGAY_THANG_NAM_SU_DUNGNull();
        }
        else
        {
            m_us_dm_nha.dcNGAY_THANG_NAM_SU_DUNG = CIPConvert.ToDecimal(m_txt_ngay_su_dung.Text.Trim());
        }
        if (m_txt_nguyen_gia.Text.Length == 0)
        {
            m_us_dm_nha.SetNGUON_NSNull();
        }
        else
        {
            m_us_dm_nha.dcNGUON_NS = CIPConvert.ToDecimal(m_txt_nguyen_gia.Text.Trim());
        }
        if (m_txt_nguyen_gia_nguon_khac.Text.Length == 0)
        {
            m_us_dm_nha.SetNGUON_KHACNull();
        }
        else
        {
            m_us_dm_nha.dcNGUON_KHAC = CIPConvert.ToDecimal(m_txt_nguyen_gia_nguon_khac.Text.Trim());
        }
        if (m_txt_gia_tri_con_lai.Text.Length == 0)
        {
            m_us_dm_nha.SetGIA_TRI_CON_LAINull();
        }
        else
        {
            m_us_dm_nha.dcGIA_TRI_CON_LAI = CIPConvert.ToDecimal(m_txt_gia_tri_con_lai.Text.Trim());
        }
        if (m_txt_so_tang.Text.Length == 0)
        {
            m_us_dm_nha.SetSO_TANGNull();
        }
        else
        {
            m_us_dm_nha.dcSO_TANG = CIPConvert.ToDecimal(m_txt_so_tang.Text.Trim());
        }
        if (m_txt_dien_tich_xay_dung.Text.Length == 0)
        {
            m_us_dm_nha.SetDT_XAY_DUNGNull();
        }
        else
        {
            m_us_dm_nha.dcDT_XAY_DUNG = CIPConvert.ToDecimal(m_txt_dien_tich_xay_dung.Text.Trim());
        }
        if (m_txt_tong_dien_tich_xay_dung.Text.Length == 0)
        {
            m_us_dm_nha.SetTONG_DT_SAN_XDNull();
        }
        else
        {
            m_us_dm_nha.dcTONG_DT_SAN_XD = CIPConvert.ToDecimal(m_txt_tong_dien_tich_xay_dung.Text.Trim());
        }
        if (m_txt_tru_so_lam_viec.Text.Length == 0)
        {
            m_us_dm_nha.SetTRU_SO_LAM_VIECNull();
        }
        else
        {
            m_us_dm_nha.dcTRU_SO_LAM_VIEC = CIPConvert.ToDecimal(m_txt_tru_so_lam_viec.Text.Trim());
        }

        if (m_txt_co_so_hdsn.Text.Length == 0)
        {
            m_us_dm_nha.SetCO_SO_HDSNNull();
        }
        else
        {
            m_us_dm_nha.dcCO_SO_HDSN = CIPConvert.ToDecimal(m_txt_co_so_hdsn.Text.Trim());
        }

        if (m_txt_lam_nha_o.Text.Length == 0)
        {
            m_us_dm_nha.SetLAM_NHA_ONull();
        }
        else
        {
            m_us_dm_nha.dcLAM_NHA_O = CIPConvert.ToDecimal(m_txt_lam_nha_o.Text.Trim());
        }
        if (m_txt_cho_thue.Text.Length == 0)
        {
            m_us_dm_nha.SetCHO_THUENull();
        }
        else
        {
            m_us_dm_nha.dcCHO_THUE = CIPConvert.ToDecimal(m_txt_cho_thue.Text.Trim());
        }

        if (m_txt_bo_trong.Text.Length == 0)
        {
            m_us_dm_nha.SetBO_TRONGNull();
        }
        else
        {
            m_us_dm_nha.dcBO_TRONG = CIPConvert.ToDecimal(m_txt_bo_trong.Text.Trim());
        }

        if (m_txt_bi_lan_chiem.Text.Length == 0)
        {
            m_us_dm_nha.SetBI_LAN_CHIEMNull();
        }
        else
        {
            m_us_dm_nha.dcBI_LAN_CHIEM = CIPConvert.ToDecimal(m_txt_bi_lan_chiem.Text.Trim());
        }
        if (m_txt_khac.Text.Length == 0)
        {
            m_us_dm_nha.SetKHACNull();
        }
        else
        {
            m_us_dm_nha.dcKHAC = CIPConvert.ToDecimal(m_txt_khac.Text.Trim());
        }
        m_us_dm_nha.dcID_NGUOI_LAP = CIPConvert.ToDecimal(Person.get_user_id());
        m_us_dm_nha.dcID_TRANG_THAI = CIPConvert.ToDecimal(m_ddl_trang_thai_nha.SelectedValue);
        m_us_dm_nha.dcID_DAT = CIPConvert.ToDecimal(m_ddl_thuoc_khu_dat.SelectedValue);

        US_DM_DAT v_us_dm_dat = new US_DM_DAT(m_us_dm_nha.dcID_DAT);
        m_us_dm_nha.dcID_DON_VI_SU_DUNG = v_us_dm_dat.dcID_DON_VI_SU_DUNG;
        m_us_dm_nha.dcID_DON_VI_CHU_QUAN = v_us_dm_dat.dcID_DON_VI_CHU_QUAN;
        m_us_dm_nha.dcID_DON_VI_DAU_TU = CIPConvert.ToDecimal(m_ddl_don_vi_dau_tu.SelectedValue);
        m_us_dm_nha.dcID_TINH_TRANG = CIPConvert.ToDecimal(m_ddl_tinh_trang_nha.SelectedValue);
        m_us_dm_nha.datNGAY_CAP_NHAT_CUOI = DateTime.Now;

        m_us_dm_nha.dcID_NGUOI_DUYET = Person.get_user_id();
        m_us_dm_nha.dcID_NGUOI_LAP = Person.get_user_id();
    }
示例#10
0
 public bool check_ma_tai_san_is_valid(string ip_str_ma_tai_san)
 {
     US_DM_DAT v_us_dm_dat = new US_DM_DAT();
     DS_DM_DAT v_ds_dm_dat = new DS_DM_DAT();
     v_us_dm_dat.FillDataset(v_ds_dm_dat, "where " + DM_DAT.MA_TAI_SAN + " = '" + ip_str_ma_tai_san + "'");
     if (v_ds_dm_dat.DM_DAT.Count == 0) return true;
     return false;
 }
        // done
        private void load_data_to_cbo_dia_chi()
        {
            if (m_cbo_don_vi_su_dung.SelectedValue == null)
            {
                m_cbo_dia_chi.DataSource = null;
                return;
            }

            DS_DM_DAT v_ds_dm_dat = new DS_DM_DAT();
            US_DM_DAT v_us_dm_dat = new US_DM_DAT();

            v_us_dm_dat.FillDataset(v_ds_dm_dat, "where " + DM_DAT.ID_DON_VI_SU_DUNG + " = " + CIPConvert.ToDecimal(m_cbo_don_vi_su_dung.SelectedValue));
            m_cbo_dia_chi.DisplayMember = DM_DAT.DIA_CHI;
            m_cbo_dia_chi.ValueMember = DM_DAT.ID;
            m_cbo_dia_chi.SelectedValueChanged -= new EventHandler(m_cbo_bo_tinh_SelectedValueChanged);
            m_cbo_dia_chi.DataSource = v_ds_dm_dat.DM_DAT;
            m_cbo_don_vi_su_dung.SelectedValueChanged += new EventHandler(m_cbo_bo_tinh_SelectedValueChanged);
        }
 private void load_data_to_thong_tin_nha_dat()
 {
     try
     {
         string v_id_dat = CIPConvert.ToStr(m_cbo_dia_chi.SelectedValue);
         DS_DM_DAT v_ds_dm_dat = new DS_DM_DAT();
         US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(v_id_dat));
         m_lbl_dia_chi.Text = v_us_dm_dat.strDIA_CHI;
         m_lbl_dien_tich_khuon_vien_dat.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_KHUON_VIEN, "#,##0.00") + "   ";
         m_lbl_lam_tru_so_lam_viec.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_TRU_SO_LAM_VIEC, "#,##0.00");
         m_lbl_lam_nha_o.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_TRU_SO_LAM_VIEC, "#,##0.00");
         m_lbl_lam_co_so_hd_su_nghiep.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_CO_SO_HOAT_DONG_SU_NGHIEP, "#,##0.00");
         m_lbl_lam_nha_o.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_LAM_NHA_O, "#,##0.00");
         m_lbl_cho_thue.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_CHO_THUE, "#,##0.00");
         m_lbl_bo_trong.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_BO_TRONG, "#,##0.00");
         m_lbl_bi_lan_chiem.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_BI_LAN_CHIEM, "#,##0.00");
         m_lbl_su_dung_vao_muc_dich_khac.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_SU_DUNG_MUC_DICH_KHAC, "#,##0.00");
         m_lbl_gia_tri_theo_so_ke_toan.Text = CIPConvert.ToStr(v_us_dm_dat.dcGT_THEO_SO_KE_TOAN, "#,##0.00");
     }
     catch (System.Exception ex)
     {
         CSystemLog_301.ExceptionHandle(ex);
     }
 }
 private void us_2_form_for_update()
 {
     m_cbo_bo_tinh_up.Enabled = false;
     m_cbo_don_vi_chu_quan_up.Enabled = false;
     m_cbo_don_vi_su_dung_up.Enabled = false;
     m_cbo_dia_chi.Enabled = false;
     m_cbo_ly_do_thay_doi.Enabled = false;
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_us_gd_tang_giam_tai_san.dcID_TAI_SAN));
     m_lbl_ma_tai_san.Text = v_us_dm_dat.strMA_TAI_SAN;
     m_lbl_dt_khuon_vien.Text = v_us_dm_dat.dcDT_KHUON_VIEN.ToString("#,##0");
     m_lbl_gt_theo_so_ke_toan.Text = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN.ToString("#,##0");
     m_lbl_so_nam_su_dung.Text = v_us_dm_dat.dcSO_NAM_DA_SU_DUNG.ToString("#,##0");
     m_txt_ma_phieu.Text = m_us_gd_tang_giam_tai_san.strMA_PHIEU;
     m_dat_ngay_duyet.SelectedDate = m_us_gd_tang_giam_tai_san.datNGAY_DUYET;
     m_dat_ngay_tang_giam.SelectedDate = m_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN;
     m_hdf_id.Value = m_us_gd_tang_giam_tai_san.dcID.ToString();
     m_txt_ma_phieu.Focus();
 }
 private void cap_nhat_thong_tin_tai_san()
 {
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
     v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DANG_SU_DUNG;
     v_us_dm_dat.dcID_DON_VI_SU_DUNG = CIPConvert.ToDecimal(m_cbo_don_vi_su_dung_moi.SelectedValue);
     v_us_dm_dat.Update();
     string v_str_dv_cu = m_cbo_don_vi_su_dung_up.SelectedItem.Text;
     string v_str_dv_moi = m_cbo_don_vi_su_dung_moi.SelectedItem.Text;
     m_lbl_message.Text = "Đã điều chuyển tài sản " + v_us_dm_dat.strDIA_CHI
         + " từ đơn vị " + v_str_dv_cu + " đến đơn vị " + v_str_dv_moi;
 }
    private void them_moi_khau_hao()
    {
        US_GD_KHAU_HAO v_us_gd_khau_hao = new US_GD_KHAU_HAO();
        US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));

        decimal v_dc_gia_tri_khau_hao = CIPConvert.ToDecimal(m_txt_gia_tri_khau_hao.Text);

        // Lấy thông tin mới cho giao dịch khấu hao
        v_us_gd_khau_hao.dcID_TAI_SAN = CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue);
        v_us_gd_khau_hao.dcID_LOAI_TAI_SAN = v_us_dm_dat.dcID_LOAI_TAI_SAN;
        v_us_gd_khau_hao.dcID_DON_VI = v_us_dm_dat.dcID_DON_VI_SU_DUNG;
        v_us_gd_khau_hao.dcGIA_TRI_KHAU_HAO = v_dc_gia_tri_khau_hao;
        v_us_gd_khau_hao.strMA_PHIEU = m_txt_ma_phieu.Text;
        v_us_gd_khau_hao.datNGAY_DUYET = CIPConvert.ToDatetime(m_txt_ngay_duyet.Text);
        v_us_gd_khau_hao.datNGAY_LAP = CIPConvert.ToDatetime(m_txt_ngay_lap.Text);
        v_us_gd_khau_hao.dcID_NGUOI_LAP = Person.get_user_id();
        v_us_gd_khau_hao.dcID_NGUOI_DUYET = Person.get_user_id();

        // Cập nhật cho nhà
        v_us_dm_dat.dcGT_THEO_SO_KE_TOAN = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN - v_dc_gia_tri_khau_hao;

        // Thực hiện cập nhật
        v_us_gd_khau_hao.Insert();
        v_us_dm_dat.Update();
        m_lbl_mess.Text = "Cập nhật thành công";
    }
 private void cap_nhat_thong_tin_tai_san_dieu_chuyen_mot_phan()
 {
     US_DM_DAT v_us_dm_dat_dc = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
     string v_str_dv_cu = m_cbo_don_vi_su_dung_up.SelectedItem.Text;
     string v_str_dv_moi = m_cbo_don_vi_su_dung_moi.SelectedItem.Text;
     m_lbl_message.Text = "Đã điều chuyển tài sản " + v_us_dm_dat.strDIA_CHI
         + " từ đơn vị " + v_str_dv_cu + " đến đơn vị " + v_str_dv_moi;
 }
 private void xoa_khau_hao(decimal ip_dc_id_kh, decimal ip_dc_id_dat, decimal ip_dc_gia_tri_kh)
 {
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(ip_dc_id_dat);
     US_GD_KHAU_HAO v_us_gd_khau_hao = new US_GD_KHAU_HAO();
     v_us_gd_khau_hao.DeleteByID(ip_dc_id_kh);
     v_us_dm_dat.dcGT_THEO_SO_KE_TOAN += ip_dc_gia_tri_kh;
     v_us_dm_dat.Update();
     m_lbl_mess.Text = "Đã xóa thành công bản ghi";
 }
    private void them_moi_ghi_giam()
    {
        US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
        if (m_rbl_loai_dieu_chuyen.SelectedValue == "N")
        {
            v_us_dm_dat.dcDT_KHUON_VIEN = v_us_dm_dat.dcDT_KHUON_VIEN - CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
            v_us_dm_dat.Update();
            m_us_gd_tang_giam_tai_san.dcDIEN_TICH = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
        }
        else
        {
            v_us_dm_dat.strMA_TAI_SAN = v_us_dm_dat.strMA_TAI_SAN + "-Cũ";
            v_us_dm_dat.dcID_TRANG_THAI = ID_KHAC.DIEU_CHUYEN_NOI_BO;
            v_us_dm_dat.Insert();
        }

        m_us_gd_tang_giam_tai_san = new US_GD_TANG_GIAM_TAI_SAN();
        m_us_gd_tang_giam_tai_san.datNGAY_DUYET = m_dat_ngay_duyet.SelectedDate;
        m_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN = m_dat_ngay_tang_giam.SelectedDate;
        m_us_gd_tang_giam_tai_san.dcID_LY_DO_TANG_GIAM = ID_LY_DO_TANG_GIAM_TAI_SAN.DIEU_CHUYEN;
        m_us_gd_tang_giam_tai_san.strTANG_GIA_TRI_TAI_SAN_YN = "N";

        m_us_gd_tang_giam_tai_san.dcID_TAI_SAN = v_us_dm_dat.dcID;
        m_us_gd_tang_giam_tai_san.dcID_LOAI_TAI_SAN = v_us_dm_dat.dcID_LOAI_TAI_SAN;
        m_us_gd_tang_giam_tai_san.strMA_PHIEU = m_txt_ma_phieu_giam.Text;
        m_us_gd_tang_giam_tai_san.dcDIEN_TICH = v_us_dm_dat.dcDT_KHUON_VIEN;

        m_us_gd_tang_giam_tai_san.dcGIA_TRI_NGUYEN_GIA_TANG_GIAM = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN;

        m_us_gd_tang_giam_tai_san.dcID_NGUOI_LAP = Person.get_user_id();
        m_us_gd_tang_giam_tai_san.dcID_NGUOI_DUYET = Person.get_user_id();

        m_us_gd_tang_giam_tai_san.Insert();

        m_lbl_message.Text = "Cập nhật thành công";
        m_txt_tu_khoa.Text = m_us_gd_tang_giam_tai_san.strMA_PHIEU;
    }
 protected void m_grv_danh_sach_nha_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         clear_message();
         if (!e.CommandName.Equals(String.Empty) && !e.CommandName.Equals("Page"))
         {
             int rowIndex = Convert.ToInt32(e.CommandArgument);
             decimal v_dc_id_dat = CIPConvert.ToDecimal(m_grv_danh_sach_nha.DataKeys[rowIndex].Value);
             m_lbl_mess.Text = "";
             switch (e.CommandName)
             {
                 case "EditComp":
                     m_us_dm_dat = new US_DM_DAT(v_dc_id_dat);
                     m_e_form_mode = DataEntryFormMode.UpdateDataState;
                     load_data_2_form();
                     us_dm_dat_2_form();
                     break;
                 case "DeleteComp":
                     m_us_dm_dat.DeleteByID(v_dc_id_dat);
                     load_data_2_form();
                     m_lbl_mess.Text = "Đã xóa bản ghi thành công";
                     break;
             }
         }
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(this, v_e);
     }
 }
 public static void load_data_to_cbo_dia_chi(
     decimal ip_dc_bo_tinh
     , decimal ip_dc_id_don_vi_chu_quan
     , decimal ip_dc_id_don_vi_su_dung
     , decimal ip_dc_id_trang_thai_dat
     , eTAT_CA ip_e_tat_ca
     , DropDownList op_obj_cbo_dia_chi_dat)
 {
     DS_DM_DAT v_ds_dm_dat = new DS_DM_DAT();
     US_DM_DAT v_us_dm_dat = new US_DM_DAT();
     string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
     v_us_dm_dat.FillDatasetByID_DonVi(
         ip_dc_bo_tinh
         , ip_dc_id_don_vi_chu_quan
         , ip_dc_id_don_vi_su_dung
         , ip_dc_id_trang_thai_dat
         , v_str_user_name
         , v_ds_dm_dat);
     op_obj_cbo_dia_chi_dat.DataSource = v_ds_dm_dat.DM_DAT;
     op_obj_cbo_dia_chi_dat.DataTextField = DM_DAT.DIA_CHI;
     op_obj_cbo_dia_chi_dat.DataValueField = DM_DAT.ID;
     op_obj_cbo_dia_chi_dat.DataBind();
     if (ip_e_tat_ca == eTAT_CA.YES)
     {
         op_obj_cbo_dia_chi_dat.Items.Insert(0, new ListItem(CONST_QLDB.TAT_CA, CONST_QLDB.ID_TAT_CA.ToString()));
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             m_grv_danh_sach_nha.Columns[0].Visible = Person.Allow2DeleteData();
             load_data_2_form();
             if (Request.QueryString[CONST_QLDB.MA_THAM_SO_URL.ID_DAT] != null)
             {
                 decimal v_dc_id_dat = CIPConvert.ToDecimal(Request.QueryString[CONST_QLDB.MA_THAM_SO_URL.ID_DAT]);
                 m_us_dm_dat = new US_DM_DAT(v_dc_id_dat);
                 us_dm_dat_2_form();
             }
         }
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(this, v_e);
     }
 }
 private void load_data_to_thong_tin_nha_dat()
 {
     decimal v_dc_id_dat = CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue);
     if (v_dc_id_dat == -1)
     {
         m_pnl_thong_tin_nha_dat.Visible = false;
         return;
     }
     m_pnl_thong_tin_nha_dat.Visible = true;
     US_DM_DAT v_us_dm_dat = new US_DM_DAT(v_dc_id_dat);
     m_lbl_dia_chi.Text = v_us_dm_dat.strDIA_CHI;
     m_lbl_dien_tich_khuon_vien_dat.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_KHUON_VIEN, "#,##0.00");
     m_lbl_lam_tru_so_lam_viec.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_TRU_SO_LAM_VIEC, "#,##0.00");
     m_lbl_lam_tru_so_lam_viec.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_TRU_SO_LAM_VIEC, "#,##0.00");
     m_lbl_lam_co_so_hd_du_nghiep.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_CO_SO_HOAT_DONG_SU_NGHIEP, "#,##0.00");
     m_lbl_lam_nha_o.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_LAM_NHA_O, "#,##0.00");
     m_lbl_cho_thue.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_CHO_THUE, "#,##0.00");
     m_lbl_bo_trong.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_BO_TRONG, "#,##0.00");
     m_lbl_bi_lan_chiem.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_BI_LAN_CHIEM, "#,##0.00");
     m_lbl_su_dung_vao_muc_dich_khac.Text = CIPConvert.ToStr(v_us_dm_dat.dcDT_SU_DUNG_MUC_DICH_KHAC, "#,##0.00");
     m_lbl_gia_tri_theo_so_ke_toan.Text = CIPConvert.ToStr(v_us_dm_dat.dcGT_THEO_SO_KE_TOAN, "#,##0.00");
 }
    private void them_moi_tang_giam()
    {
        US_DM_DAT v_us_dm_dat = new US_DM_DAT(CIPConvert.ToDecimal(m_cbo_dia_chi.SelectedValue));
        m_us_gd_tang_giam_tai_san = new US_GD_TANG_GIAM_TAI_SAN();
        m_us_gd_tang_giam_tai_san.datNGAY_DUYET = m_dat_ngay_duyet.SelectedDate;
        m_us_gd_tang_giam_tai_san.datNGAY_TANG_GIAM_TAI_SAN = m_dat_ngay_tang_giam.SelectedDate;
        m_us_gd_tang_giam_tai_san.dcID_LY_DO_TANG_GIAM = CIPConvert.ToDecimal(m_cbo_ly_do_thay_doi.SelectedValue);
        m_us_gd_tang_giam_tai_san.strTANG_GIA_TRI_TAI_SAN_YN = m_rbl_loai.SelectedValue;

        m_us_gd_tang_giam_tai_san.dcID_TAI_SAN = v_us_dm_dat.dcID;
        m_us_gd_tang_giam_tai_san.dcID_LOAI_TAI_SAN = v_us_dm_dat.dcID_LOAI_TAI_SAN;
        m_us_gd_tang_giam_tai_san.strMA_PHIEU = m_txt_ma_phieu.Text;
        m_us_gd_tang_giam_tai_san.dcDIEN_TICH = v_us_dm_dat.dcDT_KHUON_VIEN;
        if (m_rbl_loai_dieu_chuyen.SelectedValue == "N")
        {
            decimal v_dc_dt_dieu_chuyen = CIPConvert.ToDecimal(m_txt_dien_tich_dieu_chuyen.Text);
            if (v_dc_dt_dieu_chuyen > v_us_dm_dat.dcDT_KHUON_VIEN)
            {
                m_lbl_message.Text = "Diện tích điều chuyển phải nhỏ hơn diện tích khuôn viên tài sản";
            }
            m_us_gd_tang_giam_tai_san.dcDIEN_TICH = v_dc_dt_dieu_chuyen;
            v_us_dm_dat.dcDT_KHUON_VIEN = v_us_dm_dat.dcDT_KHUON_VIEN - v_dc_dt_dieu_chuyen;
            v_us_dm_dat.Update();
        }
        m_us_gd_tang_giam_tai_san.dcGIA_TRI_NGUYEN_GIA_TANG_GIAM = v_us_dm_dat.dcGT_THEO_SO_KE_TOAN;

        m_us_gd_tang_giam_tai_san.dcID_NGUOI_LAP = Person.get_user_id();
        m_us_gd_tang_giam_tai_san.dcID_NGUOI_DUYET = Person.get_user_id();

        m_us_gd_tang_giam_tai_san.Insert();

        // Phần cập nhật thông tin cho DM

        if (m_cbo_ly_do_thay_doi.SelectedValue == ID_LY_DO_TANG_GIAM_TAI_SAN.THANH_LY.ToString())
        {
            v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DA_THANH_LY;
            v_us_dm_dat.Update();
        }
        if (m_cbo_ly_do_thay_doi.SelectedValue == ID_LY_DO_TANG_GIAM_TAI_SAN.DIEU_CHUYEN.ToString())
        {
            update_thong_tin_tai_san(v_us_dm_dat);
            v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DA_DIEU_CHUYEN;
        }
        if (m_cbo_ly_do_thay_doi.SelectedValue == ID_LY_DO_TANG_GIAM_TAI_SAN.TRANG_CAP_MUA_MOI.ToString())
        {
            v_us_dm_dat.dcID_TRANG_THAI = ID_TRANG_THAI_DAT.DANG_SU_DUNG;
            v_us_dm_dat.Update();
        }

        m_lbl_message.Text = "Cập nhật thành công";
        m_txt_tu_khoa.Text = m_us_gd_tang_giam_tai_san.strMA_PHIEU;
    }