public FormController(ICacheService cacheService, IDynamicService service, IFormService formService, IFormContext formContext, IEntityContext entityContext) { _cacheService = cacheService; _service = service; _formService = formService; _formContext = formContext; _entityContext = entityContext; }
public void Validate(NestedModel state, IFormContext formContext) { if (state.Selection != "Washington" && formContext.TryGetFormField("stateInput", out IFormField selectionData)) { selectionData.IsValid = false; selectionData.ValidationMessage = "Washington!!!!!!!"; } }
public FormController(UserManager <GearUser> userManager, RoleManager <GearRole> roleManager, ICacheService cacheService, ApplicationDbContext applicationDbContext, EntitiesDbContext context, INotify <GearRole> notify, IDynamicService service, IFormService formService, IFormContext formContext, IEntityContext entityContext) : base(userManager, roleManager, applicationDbContext, context, notify) { _cacheService = cacheService; _service = service; FormService = formService; _formContext = formContext; _entityContext = entityContext; }
public void Validate(Model state, IFormContext formContext) { _nestedReducer.Validate(state.Nested, formContext); if (state.Age < 12 && formContext.TryGetFormField("ageInput", out IFormField ageData)) { ageData.IsValid = false; ageData.ValidationMessage = "You must be 12 to ride this amusement park attraction"; } }
/// <summary> /// Constructor /// </summary> /// <param name="appContext"></param> /// <param name="service"></param> /// <param name="pageRender"></param> /// <param name="formContext"></param> /// <param name="pagesContext"></param> public PageRenderController(ApplicationDbContext appContext, IDynamicService service, IPageRender pageRender, IFormContext formContext, IDynamicPagesContext pagesContext) { _appContext = appContext; _service = service; _formContext = formContext; _pagesContext = pagesContext; _pageRender = pageRender; }
/// <summary> /// Constructor /// </summary> /// <param name="appContext"></param> /// <param name="service"></param> /// <param name="pageRender"></param> /// <param name="formContext"></param> /// <param name="pagesContext"></param> /// <param name="viewModelService"></param> public PageRenderController(GearIdentityDbContext appContext, IDynamicService service, IPageRender pageRender, IFormContext formContext, IDynamicPagesContext pagesContext, IViewModelService viewModelService) { _appContext = appContext; _service = service; _formContext = formContext; _pagesContext = pagesContext; _viewModelService = viewModelService; _pageRender = pageRender; }
public HtmlBuilder o_FormReference(Control commandTargetControl, IFormContext formContext, Nparams args) { if (_formTag != null) { throw new InvalidOperationException("Local.RedefineHtmlForm"); } _formTag = CreateHtmlBuilderFormTag(this, formContext, args); ElementPush(HtmlTag._FormReference, null); if (commandTargetControl != null) { o_CommandTarget(commandTargetControl); } return(this); }
public HtmlBuilder o_Form(Control commandTargetControl, IFormContext formContext, Nparams args) { if (_formTag != null) { throw new InvalidOperationException("Local.RedefineHtmlForm"); } _writeCount++; _formTag = CreateHtmlBuilderFormTag(this, formContext, args); //Http.Instance.EnterForm(this, attrib); string method; if (args != null) { _formName = args.Slice("name", "Form"); method = args.Slice("method", "POST"); if (args.HasValue()) { AddAttribute(args, null); } } else { _formName = "Form"; method = "POST"; } if (_formName.Length > 0) { _textWriter.AddAttributeIfUndefined(HtmlTextWriterAttribute.Name, _formName); } if (method.Length > 0) { _textWriter.AddAttribute("method", method.ToUpperInvariant()); } _textWriter.RenderBeginTag(HtmlTextWriterTag.Form); ElementPush(HtmlTag.Form, null); if (commandTargetControl != null) { o_CommandTarget(commandTargetControl); } return(this); }
public async Task UpdateProfileAsync(IFormContext context) { await _adaptee.UpdateProfileAsync(context as UserProfileFormContext <TProfile>); }
public async Task CreateProfileAsync(IFormContext context, string recoveryToken = null, string recoveryData = null) { await _adaptee.CreateProfileAsync(context as UserProfileFormContext <TProfile>, recoveryToken, recoveryData); }
public HtmlBuilderFormTag(HtmlBuilder b, IFormContext formContext, Nparams args) { }
public BusinessValidationException(IFormContext context) { FormContext = context; }
/// <summary> /// Creates the HTML builder form tag. /// </summary> /// <param name="b">The b.</param> /// <param name="formContext">The form context.</param> /// <param name="args">The args.</param> /// <returns></returns> public virtual HtmlBuilderFormTag CreateHtmlBuilderFormTag(HtmlBuilder b, IFormContext formContext, Nparams args) { return new HtmlBuilderFormTag(b, formContext, args); }
public virtual HtmlBuilderFormTag CreateHtmlBuilderFormTag(HtmlBuilder b, IFormContext formContext, Nparams args) { return(new HtmlBuilderFormTag(b, formContext, args)); }
/// <summary> /// O_s the form reference. /// </summary> /// <param name="commandTargetControl">The command target control.</param> /// <param name="formContext">The form context.</param> /// <param name="args">The args.</param> /// <returns></returns> public HtmlBuilder o_FormReference(Control commandTargetControl, IFormContext formContext, Nparams args) { if (_formTag != null) throw new InvalidOperationException("Local.RedefineHtmlForm"); _formTag = CreateHtmlBuilderFormTag(this, formContext, args); ElementPush(HtmlTag._FormReference, null); if (commandTargetControl != null) o_CommandTarget(commandTargetControl); return this; }
/// <summary> /// O_s the form reference. /// </summary> /// <param name="commandTargetControl">The command target control.</param> /// <param name="formContext">The form context.</param> /// <param name="args">The args.</param> /// <returns></returns> public HtmlBuilder o_FormReference(Control commandTargetControl, IFormContext formContext, params string[] args) { return o_FormReference(commandTargetControl, formContext, Nparams.Parse(args)); }
/// <summary> /// O_s the form. /// </summary> /// <param name="commandTargetControl">The command target control.</param> /// <param name="formContext">The form context.</param> /// <param name="args">The args.</param> /// <returns></returns> public HtmlBuilder o_Form(Control commandTargetControl, IFormContext formContext, Nparams args) { if (_formTag != null) throw new InvalidOperationException("Local.RedefineHtmlForm"); _writeCount++; _formTag = CreateHtmlBuilderFormTag(this, formContext, args); //Http.Instance.EnterForm(this, attrib); string method; if (args != null) { _formName = args.Slice("name", "Form"); method = args.Slice("method", "POST"); if (args.HasValue()) AddAttribute(args, null); } else { _formName = "Form"; method = "POST"; } if (_formName.Length > 0) _textWriter.AddAttributeIfUndefined(HtmlTextWriterAttribute.Name, _formName); if (method.Length > 0) _textWriter.AddAttribute("method", method.ToUpperInvariant()); _textWriter.RenderBeginTag(HtmlTextWriterTag.Form); ElementPush(HtmlTag.Form, null); if (commandTargetControl != null) o_CommandTarget(commandTargetControl); return this; }
public HtmlBuilder o_Form(Control commandTargetControl, IFormContext formContext, params string[] args) { return(o_Form(commandTargetControl, formContext, Nparams.Parse(args))); }
/// <summary> /// Initializes a new instance of the <see cref="HtmlBuilderFormTag"/> class. /// </summary> /// <param name="b">The b.</param> /// <param name="formContext">The form context.</param> /// <param name="args">The args.</param> public HtmlBuilderFormTag(HtmlBuilder b, IFormContext formContext, Nparams args) { }
public FormRepository(IFormContext formContext) { _formContext = formContext; }