public ActionResult SignUp(string email, string password, string firstname, string lastname, string address, string city, string state, string zip, string country, string contactphone, string mobile, bool joinmaillist ) { UserInfo ui = new UserInfo(); ui.userId = 0; ui.email = email; ui.pin = password; ui.firstName = firstname; ui.lastName = lastname; ui.address = address; ui.city = city; ui.state = state; ui.zip = zip; ui.country = country; ui.homePhone = contactphone; ui.cellPhone = mobile; ui.mailList = joinmaillist? "1" : ""; ui.addDate = ui.updateDate = DateTime.Now; ui.userType = 0; ui.middleName = ui.walkyPhone = ""; OmeiUserBiz biz = new OmeiUserBiz(); biz.AddUser(ui); if (biz.ErrorCode != 0) ViewData["ErrorMessage"] = biz.ErrorMessage; else ViewData["ErrorMessage"] = ""; ViewData["test"] = string.Format("data:{0},{1},{2},{3},{4}",email, password, firstname, lastname, address); return View(); }
public bool AddUser(UserInfo userInfo) { ErrorCode = -1; if (!CheckUniqueEmail(userInfo.email)) { ErrorMessage = "Email already exist."; return false; } userInfo.userId = 0; userInfo.userType = 0; userInfo.addDate = userInfo.updateDate = DateTime.Now; OmeiTravelEntities db = new OmeiTravelEntities(); db.AddToUserInfoSet(userInfo); db.SaveChanges(); ErrorCode = 0; return true; }
public bool UpdateUserInfo(UserInfo userinfo) { return false; }