public static MvcHtmlString DropDownProductSortByFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model, object htmlAttributes) { return(htmlHelper.DropDownListFor(expression, model, "Choose....", "", htmlAttributes)); }
public static MvcHtmlString DropDownWinLossTypeListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model, object htmlAttributes) { return(htmlHelper.DropDownListFor(expression, model, "Choose....", "No Win/Loss types found", htmlAttributes)); }
public static MvcHtmlString DropDownProductSortByFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model) { return(DropDownProductSortByFor(htmlHelper, expression, model, null)); }
public ActionResult Index() { var model = new DropDownModel(); return(View(model)); }
public static MvcHtmlString DropDownWinLossTypeListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model) { return(DropDownWinLossTypeListFor(htmlHelper, expression, model, null)); }
public static MvcHtmlString DropDownGroupUsersFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model, object htmlAttributes) { return(htmlHelper.DropDownListFor(expression, model, "Choose....", "No project statuses found", htmlAttributes)); }
public ActionResult Index(DropDownModel model) { // Get the selected value return(View()); }
public IEnumerable <GetState_Result> GetState(DropDownModel objModel) { return(Context.GetState(objModel.CountryId).ToList()); }
public static MvcHtmlString DropDownCountryListFor <TModel, TProperty, TProperty2>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > countryElementId, Expression <Func <TModel, TProperty2> > stateElementId, DropDownModel model) { return(DropDownCountryListFor(htmlHelper, countryElementId, stateElementId, model, null)); }
public IEnumerable <GetProductCategory_Result> GetProductCategory(DropDownModel objModel) { return(Context.GetProductCategory(objModel.ParentCatId).ToList()); }
public IEnumerable <GetProfessionalKeyword_Result> GetProfessionalKeyword(DropDownModel objModel) { return(Context.GetProfessionalKeyword().ToList()); }
public IEnumerable <GetCity_Result> GetCity(DropDownModel objModel) { return(Context.GetCity(objModel.StateId).ToList()); }
public static MvcHtmlString DropDownCommissionMultiplierListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model, object htmlAttributes) { return(htmlHelper.DropDownListFor(expression, model, "Choose....", "No commission multipliers found", htmlAttributes)); }
public static MvcHtmlString DropDownCommissionMultiplierListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, DropDownModel model) { return(DropDownCommissionMultiplierListFor(htmlHelper, expression, model, null)); }
public static DropDownModel GetOfferDropDown(Offer offer, Func<Offer,string> urlMaker, OfferDropDownFilter filter = OfferDropDownFilter.None) { var dropDown = new DropDownModel { Id = DropDownModel.OfferDD, Title = offer.Name, Items = new List<DropDownItem>() }; foreach (var item in offer.Localisation.Offers) { switch (filter) { case OfferDropDownFilter.Quotation: { if (item.AcceptQuotation()) dropDown.Items.Add(new DropDownItem { DisplayName = item.Name, Link = urlMaker(item) }); break; } case OfferDropDownFilter.Booking: { if (item.AcceptBooking()) dropDown.Items.Add(new DropDownItem { DisplayName = item.Name, Link = urlMaker(item) }); break; } case OfferDropDownFilter.None: default: dropDown.Items.Add(new DropDownItem { DisplayName = item.Name, Link = urlMaker(item) }); break; } } return dropDown; }
public static MvcHtmlString DropDownCountryListFor <TModel, TProperty, TProperty2>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > countryElementId, Expression <Func <TModel, TProperty2> > stateElementId, DropDownModel model, object htmlAttributes) { string countryCode = ExpressionHelper.GetExpressionText(countryElementId); string stateId = ExpressionHelper.GetExpressionText(stateElementId); object attributes = Utilities.Merge(htmlAttributes, new { onchange = "CountrySelected('" + countryCode + "','" + stateId + "');" }); return(htmlHelper.DropDownListFor(countryElementId, model, "Choose....", "No countries found", attributes)); }
public virtual ActionResult UserMenu() { var displayName = User.Identity.Name; var memberId = 0; FormsIdentity ident = User.Identity as FormsIdentity; if (ident != null) { displayName = WebHelper.GetIdentityDisplayName(User.Identity); memberId = WebHelper.GetIdentityId(User.Identity); } var dropDown = new DropDownModel { Id = DropDownModel.ProfilDD, Title = string.Format(Worki.Resources.Views.Home.HomeString.Welcome + " {0} !", displayName), Items = new List<DropDownItem> { new DropDownItem{ DisplayName = Worki.Resources.Menu.Menu.UserSpace, Link = Url.Action(MVC.Dashboard.Home.Index())} } }; if (User.IsInRole(MiscHelpers.BackOfficeConstants.BackOfficeRole)) { dropDown.Items.Add(new DropDownItem { DisplayName = Worki.Resources.Menu.Menu.OwnerSpace, Link = Url.Action(MVC.Backoffice.Home.Index()) }); var context = ModelFactory.GetUnitOfWork(); var mRepo = ModelFactory.GetRepository<IMemberRepository>(context); var member = mRepo.Get(memberId); foreach (var item in member.Localisations) { dropDown.Items.Add(new DropDownItem { DisplayName = item.Name, Link = Url.Action(MVC.Backoffice.Localisation.Index(item.ID)) }); } } if (User.IsInRole(MiscHelpers.AdminConstants.AdminRole)) { dropDown.Items.Add(new DropDownItem { DisplayName = Worki.Resources.Menu.Menu.AdminSpace, Link = Url.Action(MVC.Admin.Sheet.Index()) }); } dropDown.Items.Add(new DropDownItem { DisplayName = Worki.Resources.Views.Shared.SharedString.Deconnect, Link = Url.Action(MVC.Account.LogOff()) }); return PartialView(MVC.Shared.Views._DropDownList, dropDown); }
public static MvcHtmlString DropDownRegionListFor(this HtmlHelper htmlHelper, DropDownModel model, object htmlAttributes) { return(htmlHelper.DropDownListFor(model.AjaxElementId, model, "Choose....", "No regions found", htmlAttributes)); }