public JsonResult SingUp(PersonModel personParameters, User userParameters) { try { RequestResult <object> response = new RequestResult <object>(); PersonServices PersonServ = new PersonServices(); var result = PersonServ.SingUp(personParameters, userParameters); if (result.Status == Status.Success) { response.Status = result.Status; response.Message = EGULF.App_LocalResources.MessageUI.MsgSuccess; } else if (result.Status == Status.Warning) { response.Status = result.Status; if (result.Message == "MsgUserExisting") { response.Message = EGULF.App_LocalResources.SingUp.MsgUserExisting; } else if (result.Message == "MsgEmailExisting") { response.Message = EGULF.App_LocalResources.SingUp.MsgEmailExisting; } } else { throw new Exception(result.Message); } return(Json(response)); } catch (Exception ex) { return(Json(new RequestResult <object>() { Status = Status.Error, Message = ex.Message })); } }