public IActionResult QuickFindPage(string source) { var tableDetail = new GetTableDetail(); ViewBag.NameList = ReturnQuickFind(source, false); return(View(tableDetail.ReturnTableDetailData(source, User.Identity.Name, true))); }
public IActionResult QuickSortPage(string source) { var tableDetail = new GetTableDetail(); return(PartialView(tableDetail.ReturnTableDetailData(source, User.Identity.Name, true))); }
public IEnumerable <KendoItem> ReturnKendoColumSettings(string userName, string source) { try { var getTableDetail = new GetTableDetail(); var tableDetail = getTableDetail.ReturnTableDetailData(source, userName); var kendoColumns = new KendoColumns(); var newTempListAggregate = tableDetail.Select(value => new KendoItem { aggregate = new KendoGridAggregates { field = ReturmEmptyIfNull(value.Column_Name), aggregate = ReturnSummaryType(value.SummaryType) } }).ToList(); var kendoColumnsAgre = newTempListAggregate.Select(item => item.aggregate).Where(item => item.aggregate.Length > 1); var newTempList = tableDetail.Select(value => new KendoItem { field = value.Column_Name, title = value.Column_Header, width = value.Column_Width.HasValue ? value.Column_Width.ToString() + "px" : "130px", height = "20px", format = value.FormatString ?? "", template = "#= Format(" + value.Column_Name + ",'" + value.Datatype + "','" + value.FormatString + "','" + value.LinkCommand + "','" + value.IsCheckbox + "') #", model = new KendoGridModel { fields = value.Column_Name, type = new KendoGridType { type = converDataType(value.Datatype) } }, attributes = new KendoGridAttributes { style = "#= ColorAttribute(" + value.Column_Name + ",'" + value.ColorControl + "') #" }, aggregateList = kendoColumnsAgre, footerTemplate = ReturnSummaryTypeFooter(value.SummaryType) }).ToList(); //newTempListAggregate = tableDetail.Select(value => new KendoItem //{ // aggregate = new KendoGridAggregates() // { // field = value.Column_Name, // aggregate = value.SummaryType // } //}).ToList(); kendoColumns.KendoColumsSettings = newTempList; return(kendoColumns.KendoColumsSettings); } catch (System.Exception ex) { // FormsAuthentication.SignOut(); return(null); } }