public JsDataTable JsDataTableWithPastRequests()
 {
     var jsDataTable =  new JsDataTable();
     jsDataTable.add_Columns("Url", "Date", "UserName", "SessionID", "PostData");
     foreach(var pastRequest in activityTracking.PastRequests)
         jsDataTable.add_Row(pastRequest.Url, pastRequest.Date, pastRequest.UserName, pastRequest.SessionID, pastRequest.PostData);
     return jsDataTable;
 }
Exemplo n.º 2
0
        public JsDataTable getDataTableFromGuidanceItems(List<GuidanceItem_V3> rawGuidanceItems)
        {
            var guidanceItems = rawGuidanceItems.GroupBy((guidanceItem)=>guidanceItem.guidanceItemId)
                                                .Select((g)=>g.First())
                                                .ToList();

            var jsDataTable =  new JsDataTable();
            jsDataTable.add_Columns("Check", "Title",  "Technology", "Phase", "Type", "Category", "Id");
            foreach(var guidanceItem in guidanceItems)
                    jsDataTable.add_Row("<input type='checkbox' class='GuidanceItemCheckBox' style='text-align: center'/>",
                                        guidanceItem.title.trim(),
                                        guidanceItem.technology.trim() ,
                                        guidanceItem.phase ?? "",
                                        guidanceItem.rule_Type.trim() ,
                                        //guidanceItem.type ?? "(TBD2)",
                                        guidanceItem.category.trim() ,
                                        guidanceItem.guidanceItemId);
            return jsDataTable;
        }