Exemple #1
0
        protected Dictionary <string, Dictionary <string, string> > Table_SearchResult_Rows <TModel>(HtmlHelper <IEnumerable <TModel> > helper, IEnumerable <TModel> models) where TModel : ISearchResultModel
        {
            var ajaxHelper = new AjaxHelper <IEnumerable <SearchResult> >(
                helper.ViewContext, helper.ViewDataContainer);
            var modelsList = (IList <TModel>)models.ToList();
            var rows       = new Dictionary <string, Dictionary <string, string> >();

            modelsList.ForEach(o =>
            {
                var dic = Table_SearchResult_Row(o);
                dic.Add(Guid.NewGuid().ToString(), ajaxHelper.Button_Edit(o.ID).ToHtmlString());
                dic.Add(Guid.NewGuid().ToString(), ajaxHelper.Button_Delete(o.ID).ToHtmlString());
                rows.Add(o.ID, dic);
            });


            return(rows);
        }