public ActionResult Search(ZJCheckSearchModel model) { int pos = model.posStart.HasValue ? model.posStart.Value : 0; GetZJCheckList searchdata = new GetZJCheckList() { CheckUnitName = model.CheckUnitName, CheckEquip = model.CheckEquip, CheckPeople = model.CheckPeople, Area = model.Area, Report = model.Report, ZX = model.ZX, posStart = model.posStart, count = model.count, ProjectName = model.ProjectName, StartDate = model.StartDate, EndDate = model.EndDate }; var response = zJCheckService.GetZJCheck(searchdata); int totalCount = (int)response.totalCount; DhtmlxGrid grid = new DhtmlxGrid(); grid.AddPaging(totalCount, pos); int index = pos; foreach (var item in response.datas) { var strpeople = string.Empty; if (!item.testingpeople.IsNullOrEmpty()) { var names = JsonConvert.DeserializeObject <List <LiftingEquipmentPeopleModel> >(item.testingpeople); List <string> testingPeople = new List <string>(); foreach (var name in names) { testingPeople.Add(name.name); } strpeople = testingPeople.Join(","); } DhtmlxGridRow row = new DhtmlxGridRow(item.Id); row.AddCell(++index); row.AddCell(item.customname); row.AddCell(item.projectname); row.AddCell(item.areainfo); row.AddCell((int)item.pilenum); row.AddCell(strpeople); row.AddCell(string.Empty); row.AddCell(item.testingequipment); row.AddCell(item.checknum); row.AddCell(item.reportcount); row.AddCell(item.filepath.IsNullOrEmpty() ? "否" : "是"); row.AddCell(new DhtmlxGridCell("查看", false).AddCellAttribute("title", "查看")); grid.AddGridRow(row); } string str = grid.BuildRowXml().ToString(System.Xml.Linq.SaveOptions.DisableFormatting); return(Content(str, "text/xml")); }
/// <summary> /// 获取桩基检测方案信息 /// </summary> /// <param name="request"></param> /// <returns></returns> public GetZJCheckListResponse GetZJCheck(GetZJCheckList model) { var client = new JsonServiceClient(GetSceneDataUrl); GetZJCheckList request = new GetZJCheckList() { CheckUnitName = model.CheckUnitName, CheckEquip = model.CheckEquip, CheckPeople = model.CheckPeople, Area = model.Area, Report = model.Report, ZX = model.ZX, posStart = model.posStart, count = model.count, ProjectName = model.ProjectName, StartDate = model.StartDate, EndDate = model.EndDate }; return(client.Get(request)); }