Exemple #1
0
 public static void AddUser(User user)
 {
     using (AptekaDataDataContext con = new AptekaDataDataContext())
     {
         con.Users.InsertOnSubmit(user);
         con.SubmitChanges();
     }
 }
Exemple #2
0
  public static void DeleteUser(User user)
 {
     using (AptekaDataDataContext con = new AptekaDataDataContext())
     {
         User us = (from u in con.Users where u.UsersId == user.UsersId select u).FirstOrDefault();
         con.Users.DeleteOnSubmit(us);
         con.SubmitChanges();
     }
 }
Exemple #3
0
 public static void EditUser(User user)
 {
     using (AptekaDataDataContext con = new AptekaDataDataContext())
     {
         User us = (from u in con.Users where u.UsersId == user.UsersId select u).FirstOrDefault();
         us.Nazwa_uzytkownika = user.Nazwa_uzytkownika;
         us.Haslo = user.Haslo;
         us.Prawo = user.Prawo;
         con.SubmitChanges();
     }
 }
Exemple #4
0
 partial void DeleteUser(User instance);
Exemple #5
0
 partial void UpdateUser(User instance);
Exemple #6
0
 partial void InsertUser(User instance);
Exemple #7
0
 public User_add_edit()
 {
     InitializeComponent();
     this.user = new User();
 }
Exemple #8
0
 public User_add_edit(User user,int mode)
 {
     InitializeComponent();
     this.user = user;
     this.mode = mode;
 }