예제 #1
0
        private void LoadBindCBFilter()
        {
            try
            {
                dtChucVu   = oChucVu.GetList();
                dtChucDanh = oChucDanh.GetList();

                dtDonVi = oDonVi.GetActiveDonVi();
                DataRow dr = dtDonVi.NewRow();
                dr["ten_don_vi"] = "";
                dr["id"]         = -1;
                dtDonVi.Rows.InsertAt(dr, 0);

                comB_DonVi.DataSource    = dtDonVi;
                comB_DonVi.DisplayMember = "ten_don_vi";
                comB_DonVi.ValueMember   = "id";
                comB_DonVi.SelectedValue = -1;

                comB_ChucDanh.DataSource    = dtChucDanh;
                comB_ChucDanh.DisplayMember = "ten_chuc_danh";
                comB_ChucDanh.ValueMember   = "id";
                comB_ChucDanh.SelectedValue = -1;

                comB_ChucVu.DataSource    = dtChucVu;
                comB_ChucVu.DisplayMember = "ten_chuc_vu";
                comB_ChucVu.ValueMember   = "id";
                comB_ChucVu.SelectedValue = -1;
            }
            catch (Exception)
            {
            }
        }
예제 #2
0
 private void GetDataSourceForCombo()
 {
     try
     {
         dt_ChucVu   = oChucVu.GetList();
         dt_DonVi    = oDonVi.GetDonViList();
         dt_ChucDanh = oChucDanh.GetList();
     }
     catch (Exception)
     {
     }
 }