public void AddUser(String name, String pass) { using (UkooDataContext context = new UkooDataContext(UkooDataContext.DBConnectionString)) { User_details du = new User_details(); du.user_name = name; du.user_pass = pass; context.Users.InsertOnSubmit(du); context.SubmitChanges(); } }
public string getNumber() { IList <User_details> usrs = this.GetAllUsers(); List <Users> allmsgs = new List <Users>(); User_details last = usrs.Last(); foreach (User_details m in usrs) { if (m.Equals(last)) { return(m.user_name); //return last logged in user } } return("false"); }