private void delete_gd_da_co_trong_thang_cua_nhan_vien(US_DUNG_CHUNG v_us_dc, DataRow v_data_row, decimal ip_dc_id_nv) { decimal v_id_gd_hs_chat_luong = 0; DataSet v_ds = new DataSet(); v_ds.Tables.Add(new DataTable()); v_us_dc.FillDatasetWithQuery(v_ds, "SELECT * FROM GD_HE_SO_CHAT_LUONG WHERE ID_NHAN_VIEN =" + ip_dc_id_nv + " AND THANG = " + CIPConvert.ToDecimal(m_txt_chon_thang.Text.Trim()) + " AND NAM = " + CIPConvert.ToDecimal(m_txt_chon_nam.Text.Trim())); if (v_ds.Tables[0].Rows.Count > 0) { v_id_gd_hs_chat_luong = CIPConvert.ToDecimal(v_ds.Tables[0].Rows[0]["ID"].ToString()); US_GD_HE_SO_CHAT_LUONG v_us_gd_hs_cl = new US_GD_HE_SO_CHAT_LUONG(v_id_gd_hs_chat_luong); v_us_gd_hs_cl.BeginTransaction(); v_us_gd_hs_cl.Delete(); v_us_gd_hs_cl.CommitTransaction(); } else { return; } }
private void load_data_2_gridd(decimal ip_dc_thang, decimal ip_dc_nam) { CHRMCommon.make_stt(m_grv_quan_ly_thu_nhap_khac); US_DUNG_CHUNG v_us = new US_DUNG_CHUNG(); DataSet v_ds = new DataSet(); v_ds.Tables.Add(new DataTable()); v_us.FillDatasetWithQuery(v_ds, "SELECT * FROM V_GD_THU_NHAP_KHAC WHERE THANG = " + ip_dc_thang + " AND NAM = " + ip_dc_nam); m_grc_quan_ly_thu_nhap_khac.DataSource = v_ds.Tables[0]; }
private DataSet load_data_2_ds_dm_loai_ngay_cong(DataSet v_ds_dm_loai_ngay_cong) { US_DUNG_CHUNG v_us = new US_DUNG_CHUNG(); DataSet v_ds_ = new DataSet(); v_ds_dm_loai_ngay_cong.Tables.Add(new DataTable()); v_us.FillDatasetWithQuery(v_ds_dm_loai_ngay_cong, "select ID AS ID_LOAI_NGAY_CONG, MA_NGAY_CONG, TEN_NGAY_CONG FROM DM_LOAI_NGAY_CONG"); return v_ds_dm_loai_ngay_cong; }
private void get_id_nhan_vien_tu_data_row(US_DUNG_CHUNG v_us_dc, DataRow v_data_row, ref decimal v_id_nv) { DataSet v_ds = new DataSet(); v_ds.Tables.Add(new DataTable()); v_us_dc.FillDatasetWithQuery(v_ds, "SELECT * FROM DM_NHAN_VIEN WHERE MA_NV ='" + v_data_row[1].ToString() + "'"); v_id_nv = CIPConvert.ToDecimal(v_ds.Tables[0].Rows[0]["ID"].ToString()); }