private void add_danh_sach_du_lieu()
        {
            US_DM_BILL v_us_dm_bill = new US_DM_BILL();
            DS_DM_BILL v_ds_dm_bill = new DS_DM_BILL();
            try
            {
                m_lbl_loading.Visible = true;
                v_us_dm_bill.BeginTransaction();
                for (int v_int_row = m_fg_load_file.Rows.Fixed; v_int_row <= m_fg_load_file.Rows.Count - 1; v_int_row++)
                {
                    //IFormatProvider theCultureInfo = new System.Globalization.CultureInfo("en-GB", true);

                    //DateTime theDateTime = DateTime.ParseExact(abc, "mm-dd-yyyy", theCultureInfo);

                    v_us_dm_bill.strNOI_DUNG = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.NOI_DUNG]);
                    v_us_dm_bill.strNOI_NHAN = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.NOI_NHAN]);
                    v_us_dm_bill.strNGUOI_NHAN = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.NGUOI_NHAN]);
                    v_us_dm_bill.strTRONG_NUOC = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.TRONG_NUOC]);
                    v_us_dm_bill.strNUOC_NGOAI = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.NUOC_NGOAI]);
                    v_us_dm_bill.strSO_BILL = CIPConvert.ToStr(m_fg_load_file[v_int_row, (int)e_col_Number.SO_BILL]);
                    v_us_dm_bill.strNGUOI_GUI = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.NGUOI_GUI]);
                    v_us_dm_bill.datNGAY_GUI = Convert.ToDateTime(m_fg_load_file[v_int_row, (int)e_col_Number.NGAY_GUI].ToString());
                    v_us_dm_bill.strGHI_CHU = nullToString((string)m_fg_load_file[v_int_row, (int)e_col_Number.GHI_CHU]);
                    v_us_dm_bill.dcID_PHONG_BAN = CIPConvert.ToDecimal(m_cbo_phong_ban.SelectedValue.ToString());
                    v_us_dm_bill.SetSO_TIENNull();
                    v_us_dm_bill.dcID_TRANG_THAI = CONST_ID_TRANG_THAI_THU.ID_DA_NHAN_NOI_BO;
                    v_us_dm_bill.Insert();
                }
                v_us_dm_bill.CommitTransaction();
                m_lbl_load.Visible = false;
                ghi_log_he_thong();
                m_i_flag = 0;
                BaseMessages.MsgBox_Infor("Đã import dữ liệu nhận từ Bưu cục thành công");
            }
            catch (Exception v_e)
            {

                v_us_dm_bill.Rollback();
                CDBExceptionHandler v_exceptionHander = new CDBExceptionHandler(v_e,
                    new CDBClientDBExceptionInterpret());
                v_exceptionHander.showErrorMessage();
            }
        }
Пример #2
0
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if(components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        private void delete_v_dm_bill()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_bill)) return;
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_bill, m_grv_bill.Row)) return;
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)  return;
            US_DM_BILL v_us = new US_DM_BILL();
            dm_grid2us_object(v_us, m_grv_bill.Row);
            try {