public void GetDonVi() { var dt = ExecSQL.ExecProcedureData <DonVi>("pro_get_donvi", new { option = 2 }); cbo_donvi.Properties.DataSource = dt; cbo_donvi.Properties.DisplayMember = "madonvi"; cbo_donvi.Properties.ValueMember = "madonvi"; }
public void GetDanhMuc() { var x = grvViewDanhMuc.FocusedRowHandle; var y = grvViewDanhMuc.TopRowIndex; var listTentruyen = ExecSQL.ExecProcedureData <TenTruyen>("pro_get_tentruyen", new { option = 1 }); grcDanhMuc.DataSource = listTentruyen; lbl_matua.DataBindings.Clear(); lbl_matruyen.DataBindings.Clear(); cbo_tua.DataBindings.Clear(); lbl_matua.DataBindings.Add("text", listTentruyen, "matua"); lbl_matruyen.DataBindings.Add("text", listTentruyen, "matruyen"); cbo_tua.DataBindings.Add("editvalue", listTentruyen, "matua"); grvViewDanhMuc.FocusedRowHandle = x; grvViewDanhMuc.TopRowIndex = y; }