public ReturnJson Login([FromBody] User pLogin) { try { AuthenticationBO authentBO = new AuthenticationBO(); returnJson = authentBO.Login(pLogin, _context); } catch (Exception ex) { returnJson.statusProcess = Enumerator.StatusProcess.Error_Application; returnJson.message = "Erro ao cadastrar/registrar cliente. Erro: " + ex.Message; } return(returnJson); }
public AuthenticationBO RegisterSellffUserInfo(AuthenticationBO objAuthenticationBO) { try { objAuthenticationBO.InviteUniqueId = RandomString(Convert.ToInt32(ConfigurationManager.AppSettings["RandomStringLength"])); var sqlParams = new SqlParameter[7]; sqlParams[0] = new SqlParameter("@Email", SqlDbType.VarChar) { Value = objAuthenticationBO.Email }; sqlParams[1] = new SqlParameter("@Password", SqlDbType.VarChar) { Value = objAuthenticationBO.Password }; sqlParams[2] = new SqlParameter("@DisplayName", SqlDbType.VarChar) { Value = objAuthenticationBO.DisplayName }; sqlParams[3] = new SqlParameter("@Age", SqlDbType.VarChar) { Value = objAuthenticationBO.Age }; sqlParams[4] = new SqlParameter("@City", SqlDbType.VarChar) { Value = objAuthenticationBO.City }; sqlParams[5] = new SqlParameter("@InviteUniqueId", SqlDbType.VarChar) { Value = objAuthenticationBO.InviteUniqueId }; sqlParams[6] = new SqlParameter("@InviteGuid", SqlDbType.VarChar) { Value = objAuthenticationBO.InviteGuid }; string ResultId = Convert.ToString(SqlHelper.SqlHelper.ExecuteScalar(SqlHelper.SqlHelper.Connect(), CommandType.StoredProcedure, "SaveUserDetails", sqlParams)); if (ResultId != "") { objAuthenticationBO.InviteUniqueId = ResultId; } } catch (Exception ex) { log4netlogger.Error(ex); } return(objAuthenticationBO); }
public AuthenticationBO RegisterSellffUserInfo(AuthenticationBO objAuthenticationBO) { AuthenticationBO objResponseBO = objSellffDefaultDAO.RegisterSellffUserInfo(objAuthenticationBO); if (objAuthenticationBO.InviteGuid == "") { EmailTemplatesBO objEmailTemplatesBO = objSellffDefaultDAO.GetEmailTemplate(ConfigurationManager.AppSettings["RegEmail"].ToString()); try { SendEmail(objResponseBO.Email, objResponseBO.DisplayName, objResponseBO.InviteUniqueId, ConfigurationManager.AppSettings["ActivateAppDomain"].ToString(), objEmailTemplatesBO, ""); } catch (Exception ex) { } } return(objResponseBO); }
public ReturnJson Register([FromBody] User pRegister, [FromServices] TokenConfiguration pTokenConfigurations, [FromServices] SigningConfigurations pSigningConfigurations) { try { AuthenticationBO authentBO = new AuthenticationBO(); returnJson = authentBO.Register(pRegister, pTokenConfigurations, pSigningConfigurations, _context); } catch (Exception ex) { returnJson.statusProcess = Enumerator.StatusProcess.Error_Application; returnJson.message = "Erro ao cadastrar/registrar cliente. Erro: " + ex.Message; } return(returnJson); }
public IHttpActionResult RegisterSellffUserInfo([FromBody] AuthenticationBO objAuthenticationBO) { return(ResponseMessage(Request.CreateResponse(HttpStatusCode.OK, objSellffDefaultService.RegisterSellffUserInfo(objAuthenticationBO)))); }