private void btnQuery_Click(object sender, EventArgs e) { Usr usr = new Usr(); usr.UId__PK = txtUID.Text.Trim(); usr.UName = txtUName.Text.Trim(); usr.St = StringUtil.Obj2Str(cboxSt.SelectedValue); List <Usr> list = manager.LoadUsrs(usr); dtgvUsrs.DataSource = list; }
public UsrAuthForm() { InitializeComponent(); dtgvAuth.AutoGenerateColumns = false; if (null == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <IUsrAuthManager>(MainForm.usr); } if (null == usrManager) { usrManager = InterfaceProxyGenerator.CreateInterfaceProxy <IUsrManager>(MainForm.usr); } section = (NameValueCollection)ConfigurationManager.GetSection("FunctionGroup/Func"); List <Usr> usrs = usrManager.LoadUsrs(); cboxUsr.DataSource = usrs; cboxUsr.DisplayMember = "UId__PK"; cboxUsr.ValueMember = "UId__PK"; BindData(); }