public ActionResult AddDesignation(Organization oGanization) { try { oGanization.LeagueId = MemberCache.GetLeagueIdOfMember(); bool execute = RDN.Library.Classes.League.Organization.AddNewDesignation(oGanization); } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return Redirect(Url.Content("~/league/organization/Designation?u=" + SiteMessagesEnum.sac)); }
public ActionResult AddOrganize(Organization oRGanization) { try { oRGanization.LeagueId = MemberCache.GetLeagueIdOfMember(); oRGanization.OrganizedBy = RDN.Library.Classes.Account.User.GetMemberId().ToString(); bool execute = RDN.Library.Classes.League.Organization.NewOrganize(oRGanization); } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return Redirect(Url.Content("~/league/organization/chart/" + oRGanization.OrganizationId + "/" + oRGanization.LeagueId + "?u=" + SiteMessagesEnum.sac)); //league/organization/chart/{id}/{leagueId} }
[RequireHttps] //apply to all actions in controller #endif public JsonResult GetRank(int designationId) { Organization model = null; try { var leagueId = MemberCache.GetLeagueIdOfMember(); //bool check = RDN.Library.Classes.League.Organization.IsBossExist(designationId, leagueId); var designationData = RDN.Library.Classes.League.Organization.GetData(designationId, leagueId); model = new Organization { DesignationId = designationData.DesignationId, DesigLavel = designationData.DesigLavel, DesigTitle = designationData.DesigTitle }; return Json(model, JsonRequestBehavior.AllowGet); } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return Json(model, JsonRequestBehavior.AllowGet); }
public ActionResult EditDesignation(Organization oDesig) { try { bool execute = RDN.Library.Classes.League.Organization.UpdateDesignation(oDesig); return Redirect(Url.Content("~/organization/Designation?u=" + SiteMessagesEnum.s)); } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww)); }