private void load_cbo_loai_de_xuat() { BCTKUS.US_CM_DM_TU_DIEN v_us = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds = new BCTKDS.DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "where id_loai_tu_dien =" + 17); m_cbo_loai_de_xuat.DataSource = v_ds.CM_DM_TU_DIEN; m_cbo_loai_de_xuat.ValueMember = CM_DM_TU_DIEN.ID; m_cbo_loai_de_xuat.DisplayMember = CM_DM_TU_DIEN.TEN_NGAN; DataRow v_dr = v_ds.CM_DM_TU_DIEN.NewRow(); v_dr[CM_DM_TU_DIEN.ID] = -1; v_dr[CM_DM_TU_DIEN.ID_LOAI_TU_DIEN] = 17; v_dr[CM_DM_TU_DIEN.MA_TU_DIEN] = ""; v_dr[CM_DM_TU_DIEN.TEN_NGAN] = "----------------------------Tất cả-----------------------------"; v_dr[CM_DM_TU_DIEN.TEN] = ""; v_dr[CM_DM_TU_DIEN.GHI_CHU] = ""; v_ds.CM_DM_TU_DIEN.Rows.InsertAt(v_dr, 0); m_cbo_trung_tam.SelectedIndex = 0; }
private void load_cbo_trang_thai() { m_trang_thai = false; BCTKUS.US_CM_DM_TU_DIEN v_us = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds = new BCTKDS.DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "where id_loai_tu_dien = " + 12); m_cbo_trang_thai.DataSource = v_ds.CM_DM_TU_DIEN; m_cbo_trang_thai.ValueMember = CM_DM_TU_DIEN.ID; m_cbo_trang_thai.DisplayMember = CM_DM_TU_DIEN.TEN; DataRow v_dr = v_ds.CM_DM_TU_DIEN.NewRow(); v_dr[CM_DM_TU_DIEN.ID] = -1; v_dr[CM_DM_TU_DIEN.ID_LOAI_TU_DIEN] = 12; v_dr[CM_DM_TU_DIEN.TEN] = "Tất cả"; v_dr[CM_DM_TU_DIEN.TEN_NGAN] = "Tất cả"; v_dr[CM_DM_TU_DIEN.MA_TU_DIEN] = "TRANG_THAI_THU"; v_dr[CM_DM_TU_DIEN.GHI_CHU] = " "; v_ds.CM_DM_TU_DIEN.Rows.InsertAt(v_dr, 0); m_cbo_trang_thai.SelectedIndex = 0; m_trang_thai = true; }
private void load_data_to_cbo_trang_thai() { BCTKUS.US_CM_DM_TU_DIEN v_us_trang_thai_van_thu = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds_trang_thai_van_thu = new BCTKDS.DS_CM_DM_TU_DIEN(); v_us_trang_thai_van_thu.FillDataset(v_ds_trang_thai_van_thu, "where id_loai_tu_dien=22"); //id loai tu dien trang thai van thu DataRow v_dr = v_ds_trang_thai_van_thu.CM_DM_TU_DIEN.NewRow(); v_dr[CM_DM_TU_DIEN.ID] = -1; v_dr[CM_DM_TU_DIEN.GHI_CHU] = ""; v_dr[CM_DM_TU_DIEN.ID_LOAI_TU_DIEN] = 22; v_dr[CM_DM_TU_DIEN.MA_TU_DIEN] = "TatCa"; v_dr[CM_DM_TU_DIEN.TEN] = "0 - Tất cả"; v_dr[CM_DM_TU_DIEN.TEN_NGAN] = "0 - Tất cả"; v_ds_trang_thai_van_thu.Tables[0].Rows.InsertAt(v_dr, 0); v_ds_trang_thai_van_thu.AcceptChanges(); m_cbo_trang_thai.DisplayMember = CM_DM_TU_DIEN.TEN_NGAN; m_cbo_trang_thai.ValueMember = CM_DM_TU_DIEN.ID; m_cbo_trang_thai.DataSource = v_ds_trang_thai_van_thu.CM_DM_TU_DIEN; }
private void load_cbo_loai_dinh_muc() { BCTKUS.US_CM_DM_TU_DIEN v_us = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds = new BCTKDS.DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "where id_loai_tu_dien =" + 17); m_cbo_loai_dm.DataSource = v_ds.CM_DM_TU_DIEN; m_cbo_loai_dm.ValueMember = CM_DM_TU_DIEN.ID; m_cbo_loai_dm.DisplayMember = CM_DM_TU_DIEN.TEN_NGAN; //DataRow v_dr = v_ds.CM_DM_TU_DIEN.NewRow(); //v_dr[CM_DM_TU_DIEN.ID] = -1; //v_dr[CM_DM_TU_DIEN.ID_LOAI_TU_DIEN] = 17; //v_dr[CM_DM_TU_DIEN.MA_TU_DIEN] = " "; //v_dr[CM_DM_TU_DIEN.TEN] = "Tất cả"; //v_dr[CM_DM_TU_DIEN.TEN_NGAN] = "Tất cả"; //v_ds.CM_DM_TU_DIEN.Rows.InsertAt(v_dr, 0); //m_cbo_loai_dm.SelectedIndex = 0; flag_loai_dm = true; }
private void load_data_2_cbo() { m_status_cbo = false; BCTKDS.DS_CM_DM_TU_DIEN v_ds_cm_dm_tu_dien = new BCTKDS.DS_CM_DM_TU_DIEN(); BCTKUS.US_CM_DM_TU_DIEN v_us_cm_dm_tu_dien = new BCTKUS.US_CM_DM_TU_DIEN(); v_us_cm_dm_tu_dien.FillDatasetByLoaiTuDienLoaiDinhMuc(v_ds_cm_dm_tu_dien); m_cbo_loai_dinh_muc.DataSource = v_ds_cm_dm_tu_dien.CM_DM_TU_DIEN; m_cbo_loai_dinh_muc.DisplayMember = CM_DM_TU_DIEN.TEN_NGAN; m_cbo_loai_dinh_muc.ValueMember = CM_DM_TU_DIEN.ID; m_status_cbo = true; }
private void load_txt_cbo_trang_thai() { BCTKUS.US_CM_DM_TU_DIEN v_us = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds = new BCTKDS.DS_CM_DM_TU_DIEN(); if (m_id_trang_thai != -1) { v_us.FillDataset(v_ds, "where id = " + m_id_trang_thai); m_cbo_trang_thai.Text = v_ds.Tables[0].Rows[0][4].ToString(); } else { m_cbo_trang_thai.Text = "Tất cả"; } }
public void Display_for_chi_tiet(decimal v_id_phap_nhan, decimal v_id_trang_thai, DateTime v_dt_tu_ngay, DateTime v_dt_den_ngay, decimal v_tong_bill, decimal v_tong_chi_phi) { m_obj_trans = get_trans_object(m_fg); format_controls(); m_dt_tu_ngay = v_dt_tu_ngay; m_dt_den_ngay = v_dt_den_ngay; m_id_trang_thai = v_id_trang_thai; load_txt_cbo_trang_thai(); BCTKUS.US_CM_DM_TU_DIEN v_us_td = new BCTKUS.US_CM_DM_TU_DIEN(); BCTKDS.DS_CM_DM_TU_DIEN v_ds_td = new BCTKDS.DS_CM_DM_TU_DIEN(); US_V_TONG_TIEN_BILL_THEO_PHONG_BAN v_us_tong_hop = new US_V_TONG_TIEN_BILL_THEO_PHONG_BAN(); DS_V_TONG_TIEN_BILL_THEO_PHONG_BAN v_ds_tong_hop = new DS_V_TONG_TIEN_BILL_THEO_PHONG_BAN(); v_us_td.FillDataset(v_ds_td, "where ID =" + v_id_phap_nhan); m_lbl_phap_nhan.Text ="PN: " + v_ds_td.Tables[0].Rows[0][4].ToString().ToUpper(); m_lbl_tu_ngay.Text = v_dt_tu_ngay.Date.ToShortDateString(); m_lbl_den_ngay.Text = v_dt_den_ngay.Date.ToShortDateString(); m_lbl_tong_bill.Text = CIPConvert.ToStr(v_tong_bill, "#,###"); m_lbl_tong_chi_phi.Text = CIPConvert.ToStr(v_tong_chi_phi, "#,###") + " (VNĐ)"; v_us_tong_hop.FillDataset_chi_phi_theo_phong_ban(v_ds_tong_hop, v_id_phap_nhan, v_id_trang_thai, v_dt_tu_ngay, v_dt_den_ngay); m_fg.Redraw = false; CGridUtils.Dataset2C1Grid(v_ds_tong_hop, m_fg, m_obj_trans); CGridUtils.MakeSoTT(0, m_fg); m_fg.Redraw = true; this.ShowDialog(); }