示例#1
0
        private IList <SelectListItem> GetStates(IdeaStates currentState)
        {
            var initialState = "New";

            if (currentState.In(IdeaStates.Resolved, IdeaStates.Rejected))
            {
                initialState = currentState.ToString();
            }

            var states = new string[] { initialState, "Implementation", "Realized", "Closed" };

            return(states.Select(s => new SelectListItem()
            {
                Text = IdeaStatesResource.ResourceManager.GetString(s),
                Value = s
            }).ToList());
        }
示例#2
0
 public virtual ActionResult ChangeState(string ideaId, IdeaStates nextStateId)
 {
     Service.ChangeState(ideaId, nextStateId);
     return(RedirectToAction(MVC.Idea.Details(ideaId, null, null)));
 }
示例#3
0
 public static string GetIdeaStateString(this HtmlHelper html, IdeaStates state, InitiativeTypes?type)
 {
     return(type.HasValue ?
            Globalization.Resources.Services.InitiativeTypes.ResourceManager.GetString(type.ToString()) :
            IdeaStatesResource.ResourceManager.GetString(state.ToString()));
 }