示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Romontinka.Server.WebSite.Metadata.SimpleLookupAttribute"/> class.
 /// </summary>
 public AjaxCheckBoxListAttribute(string controller, string getItemsAction, string parentId)
 {
     _model                = new AjaxCheckBoxListModel();
     _model.Controller     = controller;
     _model.GetItemsAction = getItemsAction;
     _model.ParentId       = parentId;
 }
示例#2
0
        public static MvcHtmlString AjaxCheckBoxList(this HtmlHelper html, AjaxCheckBoxListModel model)
        {
            if (string.IsNullOrWhiteSpace(model.GetItemsAction))
            {
                model.GetItemsAction = GetItemsActionDefault;
            } //if

            if (string.IsNullOrWhiteSpace(model.Controller))
            {
                model.Controller = model.Property;
            } //if
            return(html.Partial("AjaxCheckBoxList", model));
        }