public ActionResult CreateLogin(int idUser, string strEmail) { var strRes = ""; UserLogin Login = new UserLogin(); Boolean blnRes = Login.CreateUser(idUser, UserLogin.LoginUserType.employee, strEmail, strEmail); if (blnRes) { DomainModel.BusinessLayer.Employee emp = new DomainModel.BusinessLayer.Employee(); var empl = emp.GetEmployeeById(idUser, UserDetails.Current.SchoolId); if (empl != null) { strRes = "1"; } else { strRes = "2"; } } return(Content(strRes)); }