public US_DM_BILL(decimal i_dbID) { pm_objDS = new DS_DM_BILL(); pm_strTableName = c_TableName; IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName); v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang); SqlCommand v_cmdSQL; v_cmdSQL = v_objMkCmd.getSelectCmd(); this.FillDatasetByCommand(pm_objDS, v_cmdSQL); pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]); }
private bool check_validate_is_having_so_bill(string ip_str_so_bill) { bool v_b_result = true; US_DM_BILL v_us_dm_bill = new US_DM_BILL(); DS_DM_BILL v_ds_dm_bill = new DS_DM_BILL(); v_us_dm_bill.FillDataset(v_ds_dm_bill, "where so_bill = '" + ip_str_so_bill + "'"); if (v_ds_dm_bill.DM_BILL.Count > 0) v_b_result = false; return v_b_result; }
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(); } }
private int dem_so_dong_bang_lay_boi_ma_so_bill(string ip_str_ma_so) { int v_int_count = 0; DS_DM_BILL v_ds_dm_bill = new DS_DM_BILL(); US_DM_BILL v_us_dm_bill = new US_DM_BILL(); m_us_dm_dang_ky_gui.load_dm_by_so_bill(v_ds_dm_bill, nullToString(ip_str_ma_so)); DataTable v_dt = v_ds_dm_bill.Tables[0]; v_int_count = v_dt.Rows.Count; return v_int_count; }
public void load_dm_by_so_bill(DS_DM_BILL op_ds, string ip_str_so_bill) { CStoredProc v_proc = new CStoredProc("pr_load_dm_by_ma_so_bill"); v_proc.addNVarcharInputParam("@ma_so", ip_str_so_bill); v_proc.fillDataSetByCommand(this, op_ds); }
public US_DM_BILL() { pm_objDS = new DS_DM_BILL(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
public void get_dm_bill(DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay, DS_DM_BILL op_ds) { CStoredProc v_store_proc = new CStoredProc("pr_DM_BILL_get_bill_from_date_to_date"); v_store_proc.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay); v_store_proc.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay); v_store_proc.fillDataSetByCommand(this, op_ds); }
public void FillDataset(DS_DM_BILL ip_v_ds_dm_bill, decimal ip_v_id_trung_tam, string ip_v_so_bill, string ip_v_nguoi_gui, string ip_v_nguoi_nhan, string ip_v_noi_nhan) { CStoredProc v_store_proc = new CStoredProc("pr_DM_BILL_Search"); v_store_proc.addDecimalInputParam("@ID_TRUNG_TAM",ip_v_id_trung_tam); v_store_proc.addNVarcharInputParam("@SO_BILL", ip_v_so_bill); v_store_proc.addNVarcharInputParam("@NGUOI_NHAN",ip_v_nguoi_nhan); v_store_proc.addNVarcharInputParam("@NOI_NHAN",ip_v_noi_nhan); v_store_proc.addNVarcharInputParam("@NGUOI_GUI",ip_v_nguoi_gui); v_store_proc.fillDataSetByCommand(this, ip_v_ds_dm_bill); }
public bool check_is_having_so_bill(string ip_so_bill) { DS_DM_BILL v_ds_dm_bill = new DS_DM_BILL(); CStoredProc v_cstore = new CStoredProc("pr_check_is_having_so_bill"); v_cstore.addNVarcharInputParam("@SO_BILL", ip_so_bill); v_cstore.fillDataSetByCommand(this, v_ds_dm_bill); if (v_ds_dm_bill.DM_BILL.Rows.Count == 0) return false; return true; }
private DataTable database_2_datatable(DateTime ip_dau_thang, DateTime ip_cuoi_thang) { DS_DM_BILL v_ds_dm_bill = new DS_DM_BILL(); US_DM_BILL v_us_dm_bill = new US_DM_BILL(); //v_us_dm_bill.FillDataset(v_ds_dm_bill, "where NGAY_GUI >='"+ip_dau_thang +"' and NGAY_GUI <= '"+ip_cuoi_thang+"'"); v_us_dm_bill.get_dm_bill(ip_dau_thang, ip_cuoi_thang, v_ds_dm_bill); DataTable v_dt = v_ds_dm_bill.DM_BILL; return v_dt; }