public object Get(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(_data.Employees, loadOptions)); }
public object Get(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(_db.Exams, loadOptions)); }
public object GetSubjectExam(DataSourceLoadOptions loadOptions, Guid id) { return(DataSourceLoader.Load(_db.Exams.Where(m => m.SubjectId == id), loadOptions)); }
public object load(DataSourceLoadOptions options) { var query = this.dataContext.dicts; return(DataSourceLoader.Load(query, options)); }
public object load(DataSourceLoadOptions options) { var query = from b in this.dataContext.honors orderby b.publishAt descending select b; return(DataSourceLoader.Load(query, options)); }
public IActionResult Get_Material_m_Resource(DataSourceLoadOptions loadOptions) { var mt = _context.m_Resource.Where(w => w.ItemType == "R").Distinct(); return(Json(DataSourceLoader.Load(mt, loadOptions))); }
public object loadActiveProductTags([FromQuery] DataSourceLoadOptions options) { options.Filter.Add(new String[] { "and" }); options.Filter.Add(new object[] { "status", "=", 1 }); return(DataSourceLoader.Load(this.db.productTags, options)); }
public ActionResult Employees(DataSourceLoadOptions loadOptions) { var serializedEmployees = JsonConvert.SerializeObject(DataSourceLoader.Load(TreeViewHierarchicalData.Employees, loadOptions)); return(Content(serializedEmployees, "application/json")); }
public ActionResult GetHierarchicalDataForSearch(DataSourceLoadOptions loadOptions) { return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(TreeViewHierarchicalDataForSearch.Products, loadOptions)), "application/json")); }
public HttpResponseMessage Get(DataSourceLoadOptions loadOptions) { return(Request.CreateResponse(DataSourceLoader.Load(SampleData.Orders.Where(o => o.ID != 14 && o.ID <= 32), loadOptions))); }
public HttpResponseMessage Get(DataSourceLoadOptions loadOptions) { return(Request.CreateResponse(DataSourceLoader.Load(SampleData.DataGridEmployees.Where(e => e.ID <= 10), loadOptions))); }
public LoadResult GetDevextremeList(DevxLoadOptions options) => DataSourceLoader.Load(_context.GroupTeachers, options);
public object Get(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(SampleData.WorldPopulationData, loadOptions)); }
public HttpResponseMessage GetResoucer(DataSourceLoadOptions loadOptions) { return(Request.CreateResponse(DataSourceLoader.Load(AgendaResource.AgendaResources.ToList(), loadOptions))); }
public IActionResult Get_m_Processmaster(DataSourceLoadOptions loadOptions) { var pm = _context.m_ProcessMaster.Where(w => w.SysemProcessFLag == "Y"); return(Json(DataSourceLoader.Load(pm, loadOptions))); }
public ActionResult GetPlainDataForDragAndDrop(DataSourceLoadOptions loadOptions) { return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(TreeViewPlainDataForDragAndDrop.FileSystemItems, loadOptions)), "application/json")); }
public IActionResult Get_FCode_WeeklyPlan(DataSourceLoadOptions loadOptions) { var fc = _context.WeeklyPlan.Select(s => new { s.Fcode, s.Model }).Distinct(); return(Json(DataSourceLoader.Load(fc, loadOptions))); }
public object GetUserExam(DataSourceLoadOptions loadOptions) { var userExam = _db.UserExams.Where(u => u.UserId == CurrentUserId); return(DataSourceLoader.Load(userExam, loadOptions)); }
public object load([FromQuery] DataSourceLoadOptions options) { return(DataSourceLoader.Load(this.db.productTags, options)); }
public object Get([FromBody] DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(SampleData.GetStates(), loadOptions)); }
public HttpResponseMessage Gets(DataSourceLoadOptions loadOptions) { return(Request.CreateResponse(DataSourceLoader.Load(_councilTypeBLL.GetCouncilTypes(), loadOptions))); }
public object GetList(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(_context.Employees, loadOptions)); }
public void GroupingAndSummary() { /* * * G1=1 * G2=1 * A=1 B=1 * A=2 B=3 * * count=2 sum(A)=3 avg(A)=1.5 * * G2=2 * A=3 B=5 * * count=1 sum(A)=3 avg(A)=3 * * count=3 sum(A)=6 avg(A)=2 * * G2=2 * G1=1 * A=4 B=7 * A=5 B=9 * * count=2 sum(A)=9 avg(A)=4.5 * * G1=2 * A=6 B=11 * * count=1 sum(A)=6 avg(A)=6 * * count=3 sum(A)=15, avg(A)=5 * * count=6 sum(B)=36 avg(B)=6 * * */ var data = new[] { new { G1 = 1, G2 = 1, A = 1, B = 1 }, new { G1 = 1, G2 = 1, A = 2, B = 3 }, new { G1 = 1, G2 = 2, A = 3, B = 5 }, new { G1 = 2, G2 = 1, A = 4, B = 7 }, new { G1 = 2, G2 = 1, A = 5, B = 9 }, new { G1 = 2, G2 = 2, A = 6, B = 11 }, }; var loadOptions = new SampleLoadOptions { RemoteGrouping = true, RequireTotalCount = true, Group = new[] { new GroupingInfo { Selector = "G1", IsExpanded = false }, new GroupingInfo { Selector = "G2", IsExpanded = false } }, GroupSummary = new[] { new SummaryInfo { SummaryType = "count" }, new SummaryInfo { Selector = "A", SummaryType = "sum" }, new SummaryInfo { Selector = "A", SummaryType = "avg" } }, TotalSummary = new[] { new SummaryInfo { SummaryType = "count" }, new SummaryInfo { Selector = "B", SummaryType = "sum" }, new SummaryInfo { Selector = "B", SummaryType = "avg" }, } }; var result = DataSourceLoader.Load(data, loadOptions); Assert.Single(loadOptions.ExpressionLog); Assert.Matches(@"AnonType`2\(I0 = .+?, I1 = .+?\)", loadOptions.ExpressionLog[0]); Assert.Equal(new object[] { 6, 36M, 6M }, result.summary); Assert.Equal(6, result.totalCount); Assert.Equal(-1, result.groupCount); var groups = result.data.Cast <Group>().ToArray(); var g1 = groups[0]; var g2 = groups[1]; var g11 = g1.items[0] as Group; var g12 = g1.items[1] as Group; var g21 = g2.items[0] as Group; var g22 = g2.items[1] as Group; Assert.Equal(1, g1.key); Assert.Equal(1, g11.key); Assert.Equal(2, g12.key); Assert.Equal(2, g2.key); Assert.Equal(1, g21.key); Assert.Equal(2, g22.key); Assert.Equal(new object[] { 3, 6M, 2M }, g1.summary); Assert.Equal(new object[] { 2, 3M, 1.5M }, g11.summary); Assert.Equal(new object[] { 1, 3M, 3M }, g12.summary); Assert.Equal(new object[] { 3, 15M, 5M }, g2.summary); Assert.Equal(new object[] { 2, 9M, 4.5M }, g21.summary); Assert.Equal(new object[] { 1, 6M, 6M }, g22.summary); Assert.Equal(2, g11.count); Assert.Equal(1, g12.count); Assert.Equal(2, g21.count); Assert.Equal(1, g22.count); Assert.Null(g11.items); Assert.Null(g12.items); Assert.Null(g21.items); Assert.Null(g22.items); }
public object GetChoice(DataSourceLoadOptions loadOptions, Guid id) { return(DataSourceLoader.Load(_db.Choices.Where(u => u.QuestionId == id), loadOptions)); }
public object Get(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(SampleData.Orders, loadOptions)); }
public object GetExamQuestion(DataSourceLoadOptions loadOptions, Guid id) { return(DataSourceLoader.Load(_db.UserExamQuestions.Where(m => m.UserExam.ExamId == id), loadOptions)); }
public object GetSubject(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(_db.Subjects, loadOptions)); }
public object GetCompanies(DataSourceLoadOptions loadOptions) { return(DataSourceLoader.Load(TabPanelData.Companies, loadOptions)); }
public object GetQuestionExam(DataSourceLoadOptions loadOptions, Guid id) { return(DataSourceLoader.Load(_db.QuestionExams.Where(m => m.QuestionId == id), loadOptions)); }
public HttpResponseMessage Get(DataSourceLoadOptions loadOptions, int?id) { db.PlanGrupoId = SysData.ToInteger(id); return(Request.CreateResponse(DataSourceLoader.Load(db.PlanGrupoDetList, loadOptions))); }