Exemplo n.º 1
0
        private void LoadcmbCapTren()
        {
            var cmb = cmbCapTren;

            cmb.Tag = 0;
            clsDM_ChucVu cls = new clsDM_ChucVu();
            DataTable    dt  = cls.SelectAll();

            dt.DefaultView.RowFilter = "TonTai = 1";
            dt.DefaultView.Sort      = "ID_ChucVu ASC";
            dt = dt.DefaultView.ToTable();
            cmb.Properties.DataSource    = dt;
            cmb.Properties.DisplayMember = "Ten_ChucVu";
            cmb.Properties.ValueMember   = "ID_ChucVu";
            cmb.Tag = 1;
        }
Exemplo n.º 2
0
        private void LoadcmbCapDuoi()
        {
            var cmb = cmbCapDuoi;

            cmb.Tag = 0;
            clsDM_ChucVu cls = new clsDM_ChucVu();
            //DataTable dt = cls.SelectAllNVCapDuoi(Convert.ToInt32(cmbCapTren.EditValue));
            DataTable dt = cls.SelectAll();

            dt.DefaultView.RowFilter = "ID_ChucVu <> " + cmbCapTren.EditValue + " AND TonTai = 1";
            dt.DefaultView.Sort      = "ID_ChucVu ASC";
            dt = dt.DefaultView.ToTable();
            cmb.Properties.DataSource    = dt;
            cmb.Properties.DisplayMember = "Ten_ChucVu";
            cmb.Properties.ValueMember   = "ID_ChucVu";
            cmb.Tag = 1;
        }