示例#1
0
 public void updateUser(user_info_table user)
 {
     user_info_table tmp = db.user_info_table.Where(u => u.user_id == user.user_id).First();
     tmp.tel = user.tel;
     tmp.user_gender = user.user_gender;
     tmp.birthday = user.birthday;
     tmp.user_name = user.user_name;
     tmp.id_num = user.id_num;
     db.SubmitChanges();
 }
示例#2
0
 public user_info_table login(user_info_table user)
 {
     List<user_info_table> list = db.user_info_table.Where(u => u.account_name.Equals(user.account_name) && u.pwd.Equals(user.pwd) && u.user_type == user.user_type).ToList();
     if (list.Count() == 0)
         return null;
     else
     {
         return list[0];
     }
 }
示例#3
0
 public bool register(user_info_table user)
 {
     db.user_info_table.InsertOnSubmit(user);
     db.SubmitChanges();
     return true;
 }