public void AddNewUser(String username, string userPassword, string userEmail) { bussines = new UserBusinessLayers(); UserDataAccess.Models.User newUser = new UserDataAccess.Models.User(); newUser.UserName = username; newUser.UserPassword = userPassword; newUser.UserEmail = userEmail; string signUpResult = bussines.UserSignUp(newUser); js = new JavaScriptSerializer(); //check expectin string expectionResult = bussines.myError(); if (expectionResult != null) { Context.Response.Write(js.Serialize(expectionResult)); } else { Context.Response.Write(js.Serialize(signUpResult)); } }
public void ReturnUser(string username, string password) { bussines = new UserBusinessLayers(); js = new JavaScriptSerializer(); Context.Response.Write(js.Serialize(bussines.userLogin(username, password).ToArray())); }