private void load_data_to_grid() { try { SplashScreenManager.ShowForm(typeof(F_wait_form)); US_GD_HS_BO_SUNG_AN_TOAN_HANG_KHONG v_us = new US_GD_HS_BO_SUNG_AN_TOAN_HANG_KHONG(); DataSet v_ds = new DataSet(); v_ds.Tables.Add(); v_us.load_du_lieu_hs_athk_bsl_le_tet(v_ds, lay_thang(), lay_nam()); m_grc.DataSource = null; m_grc.DataSource = v_ds.Tables[0]; } catch (Exception v_e) { CSystemLog_301.ExceptionHandle(v_e); } finally { SplashScreenManager.CloseForm(); } }
private void insert_hs_hs_bs_hs_anhk(decimal ip_dc_thang, decimal ip_dc_nam) { US_DM_NHAN_VIEN v_us_dung_chung = new US_DM_NHAN_VIEN(); DataSet v_ds = new DataSet(); v_ds.Tables.Add(new DataTable()); v_us_dung_chung.FillDatasetNhanVienCanInsertHeSo(v_ds, ip_dc_thang, ip_dc_nam); //v_us_dung_chung.FillDatasetWithQuery(v_ds, "SELECT DISTINCT * FROM V_RPT_LUONG WHERE THANG = " + m_txt_thang.Text.Trim() + " AND NAM = " + m_txt_nam.Text.Trim()); //m_grc.DataSource = v_ds.Tables[0]; for(int i = 0; i < v_ds.Tables[0].Rows.Count; i++) { decimal v_id_nv = CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i]["ID_NHAN_VIEN"].ToString()); US_GD_HS_BO_SUNG_AN_TOAN_HANG_KHONG v_us = new US_GD_HS_BO_SUNG_AN_TOAN_HANG_KHONG(); v_us.insert_data_by_proc(v_id_nv, ip_dc_thang, ip_dc_nam); } DevExpress.XtraEditors.XtraMessageBox.Show("Thành công!!!", "THÔNG BÁO"); load_data_2_grid(); }
private void load_data_2_dataset_bang_tien_thuong_hs_bs(DataSet ip_ds) { decimal ip_check_giam_tru = 0; //0. chua check, 1. neu da check if (m_chk_giam_tru.Checked == true) { ip_check_giam_tru = 1; } else { ip_check_giam_tru = 0; } ip_ds.Tables.Add(); m_us_hs_bs_athk = new US_GD_HS_BO_SUNG_AN_TOAN_HANG_KHONG(); m_us_hs_bs_athk.load_du_lieu_bang_luong_theo_hs_bs( ip_ds , CIPConvert.ToDecimal(m_txt_chon_nam.EditValue) , CIPConvert.ToDecimal(m_txt_so_tien.EditValue) , ip_check_giam_tru); }