Esempio n. 1
0
 public UserEditForm(string username)
 {
     InitializeComponent();
     globleUsername = username;
     Account acc = new Account();
     DataSet ds = acc.queryUserByUsername(username);
     text_username.DataBindings.Add(new Binding("Text", ds.Tables[0], "username"));
     text_realname.DataBindings.Add(new Binding("Text", ds.Tables[0], "realname"));
     //设置单选框
     if (ds.Tables[0].Rows[0][2].ToString() == "1")
     {
         globleUserRight = 1;
         InitCheckBox(globleUserRight);
     }
     else
     {
         globleUserRight = 0;
         InitCheckBox(globleUserRight);
     }
 }