public ActionResult Activate(Models.Member.ActivateRequestModel param) { Models.Member.ActivateResultModel result = new Models.Member.ActivateResultModel(); try { MemberBL bl = new MemberBL(); bl.Activate(param); result.Status = true; result.Message = "Activated!"; } catch (OrgException oex) { result.Status = false; result.Message = oex.Message; } catch (Exception ex) { result.Status = false; result.Message = AppConfigs.InternalErrorMessage; if (AppConfigs.DebugInternalMessage) { result.InternalMessage = ex.Message; } } return(View(result)); }
/// <summary> /// Activate member /// </summary> /// <param name="param">Activate Request Model</param> /// <remarks></remarks> public ActivateResultModel Activate(ActivateRequestModel param) { ActivateResultModel result = new ActivateResultModel(); try { MemberBL bl = new MemberBL(); var member = bl.Activate(param); var token = IdentityHelper.GenerateToken(member); bl.RegisterToken(token); result.AccessToken = token.Token; result.Status = true; result.Message = "Activated!"; } catch (OrgException oex) { result.Status = false; result.Message = oex.Message; } catch (Exception ex) { result.Status = false; result.Message = AppConfigs.InternalErrorMessage; if (AppConfigs.DebugInternalMessage) { result.InternalMessage = ex.Message; } } return(result); }