Beispiel #1
0
 void UserGrid_OnAddItem(UserInfo t, Rectangle position, Control gridcontainer)
 {
     Button btn = new Button();
     btn.Left = position.Left;
     btn.Top = position.Top; ;
     btn.Size = position.Size;
     btn.Text = t.TrueName;
     btn.Tag = t;
     btn.Click += new EventHandler(UserBtnclick);
     gridcontainer.Controls.Add(btn);
 }
Beispiel #2
0
 public void Save(UserInfo user)
 {
     UserInfo u = GetByUserName(user.UserName);
     if (u == null)
     {
         Reposi.Add(user);
     }
     else
     {
         Reposi.Update(user);
     }
 }