private void load_data_2_grid()
 {
     US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();//Khai báo US
     DataSet v_ds = new DataSet();
     DataTable v_dt = new DataTable();
     v_ds.Tables.Add(v_dt);
     v_us.FillLopMonChoNhanVien(v_ds, CIPConvert.ToDecimal(457));
     m_grv.DataSource = v_ds.Tables[0];
     m_grv.DataBind();
 }
        private void load_data_to_grid()
        {
            US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
            DataSet v_ds = new DataSet();
            DataTable v_dt = new DataTable();
            v_ds.Tables.Add(v_dt);
            v_us.FillDatasetChuongTrinhKhung(v_ds, CIPConvert.ToDecimal(457));
            m_grv.DataSource = v_ds.Tables[0];
            m_grv.DataBind();

            //if (m_grv == 0)
            //{
            //    MessageBox.Show("Nhân viên này chưa có nghiệp vụ!");
            //}
        }
        public static void load_data_to_combobox_with_query(ComboBox ip_cbo, string ip_str_value_field, string ip_str_display_field, eTAT_CA ip_e_tat_ca, string ip_query)
        {
            US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
            DataSet v_ds = new DataSet();
            DataTable v_dt = new DataTable();
            v_ds.Tables.Add(v_dt);
            v_us.FillDatasetWithQuery(v_ds, ip_query);

            ip_cbo.DisplayMember = ip_str_display_field;
            ip_cbo.ValueMember = ip_str_value_field;
            ip_cbo.DataSource = v_ds.Tables[0];

            if (ip_e_tat_ca == eTAT_CA.YES)
            {
                DataRow v_dr = v_ds.Tables[0].NewRow();
                v_dr[0] = -1;
                v_dr[1] = "------ Tất cả ------";
                v_ds.Tables[0].Rows.InsertAt(v_dr, 0);
                ip_cbo.SelectedIndex = 0;
            }
            else
            {
                ip_cbo.SelectedIndex = 0;
            }
        }
 public static void load_data_to_auto_complete_source(string ip_str_table_name, string ip_str_column_name, TextBox ip_txt)
 {
     US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
     DataSet v_ds = new DataSet();
     DataTable v_dt = new DataTable();
     v_ds.Tables.Add(v_dt);
     v_us.FillDatasetWithProc(v_ds, ip_str_table_name, ip_str_column_name);
     for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
     {
         DataRow v_dr = v_ds.Tables[0].Rows[i];
         ip_txt.AutoCompleteCustomSource.Add(v_dr[ip_str_column_name].ToString());
     }
 }
 private void get_nhan_vien()
 {
     US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
     DataSet v_ds = new DataSet();
     DataTable v_dt = new DataTable();
     v_ds.Tables.Add(v_dt);
     v_us.FillDatasetWithQuery(v_ds, "Select ID, MA_MON_HOC, TEN_MON_HOC from DM_MON_HOC");
     m_search_lookup_edit.Properties.DataSource = v_ds.Tables[0];
     m_search_lookup_edit.Properties.BestFitMode = BestFitMode.BestFitResizePopup;
 }