/// <summary> /// 获得自动回复的列表 /// </summary> /// <param name="pager">分页</param> /// <param name="queryStr">查询条件</param> /// <param name="messageRule">类型</param> /// <param name="matchKey">关键字</param> /// <param name="category">规则</param> /// <returns></returns> public JsonResult GetList(GridPager pager, string queryStr, int messageRule, string matchKey, int?category = 0) { WC_OfficalAccountsModel model = account_BLL.GetCurrentAccount(); //组合查询条件 var predicate = PredicateBuilder.True <WC_MessageResponse>(); predicate = predicate.And(x => string.Equals(x.OfficalAccountId, model.Id, StringComparison.OrdinalIgnoreCase)); predicate = predicate.And(x => x.MessageRule == messageRule); if (category != 0) { predicate = predicate.And(x => x.Category == category); } if (!string.IsNullOrEmpty(matchKey)) { predicate = predicate.And(x => x.MatchKey == matchKey); } List <WC_MessageResponseModel> list = m_BLL.GetList(ref pager, predicate, queryStr); GridRows <WC_MessageResponseModel> grs = new GridRows <WC_MessageResponseModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
protected override async Task OnOpen() { GridRows.IsNotifying = false; GridRows.AddRange(await _productionService.GetProductionBatches()); GridRows.IsNotifying = true; GridRows.Refresh(); }
public JsonResult GetReturnOrderListBySupplier(GridPager pager, string supplierId, string supplierShortName) { if (!String.IsNullOrEmpty(supplierId)) { supplierId = supplierId.Trim(); } if (!String.IsNullOrEmpty(supplierShortName)) { supplierShortName = supplierShortName.Trim(); } //TODO:指定供应商,且退货单号为空的退货行 if (String.IsNullOrEmpty(supplierId) && String.IsNullOrEmpty(supplierShortName)) { supplierId = "0"; } //supplierId为空、supplierShortName不为空,则通过supplierShortName获取supplierId if (String.IsNullOrEmpty(supplierId) && !String.IsNullOrEmpty(supplierShortName)) { var supplier = m_SupplierBLL.GetListByWhere(ref setNoPagerAscById, "SupplierShortName == \"" + supplierShortName + "\"").First(); supplierId = supplier.Id.ToString(); } //List<WMS_ReturnOrderModel> list = m_ReturnOrderBLL.GetListByWhere(ref pager, "SupplierId == \"" + supplierId + "\" && Abs(AdjustQty) < Abs(ReturnQty)").ToList(); List <WMS_ReturnOrderModel> list = m_ReturnOrderBLL.GetListByWhere(ref setNoPagerAscById, "Status != \"无效\"") .Where(p => p.SupplierId.ToString() == supplierId && (Math.Abs(p.AdjustQty) + Math.Abs(p.LossQty)) < Math.Abs(p.ReturnQty)) .ToList(); GridRows <WMS_ReturnOrderModel> grs = new GridRows <WMS_ReturnOrderModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult FeedListGetList(GridPager pager, string type, string queryStr) { //TODO:显示未打印的投料单。 List <WMS_Feed_ListModel> list; if (type == "print") { list = m_BLL.GetListByWhereAndGroupBy(ref pager, "PrintStaus == \"未打印\""); } else { if (String.IsNullOrEmpty(queryStr)) { list = m_BLL.GetListByWhereAndGroupBy(ref pager, "PrintStaus == \"已打印\" && ConfirmStatus == \"未确认\""); } else { list = m_BLL.GetListByWhereAndGroupBy(ref pager, "FeedBillNum = \"" + queryStr + "\" && PrintStaus == \"已打印\" && ConfirmStatus == \"未确认\""); } } GridRows <WMS_Feed_ListModel> grs = new GridRows <WMS_Feed_ListModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetList(GridPager pager, string po, string supplierShortName, string partCode, DateTime beginDate, DateTime endDate) { if (!String.IsNullOrEmpty(po)) { po = po.Trim(); } if (!String.IsNullOrEmpty(supplierShortName)) { supplierShortName = supplierShortName.Trim(); } if (!String.IsNullOrEmpty(partCode)) { partCode = partCode.Trim(); } //List<WMS_POModel> list = m_BLL.GetList(ref pager, queryStr); //GridRows<WMS_POModel> grs = new GridRows<WMS_POModel>(); //grs.rows = list; //grs.total = pager.totalRows; //return Json(grs); List <WMS_POModel> list = m_BLL.GetListByWhere(ref pager, "PO.Contains(\"" + po.Trim() + "\") && WMS_Supplier.SupplierShortName.Contains(\"" + supplierShortName.Trim() + "\")&& WMS_Part.PartCode.Contains(\"" + partCode.Trim() + "\")&& CreateTime>=(\"" + beginDate + "\")&& CreateTime<=(\"" + endDate.AddDays(1) + "\")"); GridRows <WMS_POModel> grs = new GridRows <WMS_POModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult ImportBefor(string filePath, int flag) { var personList = new List <Spl_PersonModel>(); bool checkResult = false; //校验数据 if (flag == 0) { checkResult = m_BLL.CheckImportData(Utils.GetMapPath(filePath), personList, ref errors); } else { checkResult = m_BLL.CheckImportBatchData(Utils.GetMapPath(filePath), personList, ref errors); } //校验通过返回数据 if (checkResult) { GridRows <Spl_PersonModel> grs = new GridRows <Spl_PersonModel>(); grs.rows = personList; grs.total = personList.Count(); return(Json(grs)); } else { string ErrorCol = errors.Error; LogHandler.WriteServiceLog(GetUserId(), ErrorCol, "失败", "导入", "Spl_Person"); return(Json(JsonHandler.CreateMessage(0, Resource.InsertFail + ErrorCol))); } }
public JsonResult GetList(GridPager pager, string saleBillNum, string sellBillNum, string partCode, string customerShortName, string printStaus, string confirmStatus, DateTime beginDate, DateTime endDate) { //List<WMS_Sale_OrderModel> list = m_BLL.GetList(ref pager, queryStr); string query = " 1=1 "; if (printStaus == "已打印") { query += " && PrintDate>=(\"" + beginDate + "\")&& PrintDate<=(\"" + endDate + "\")"; } //query += " && SaleBillNum.Contains(\"" + saleBillNum + "\")&& SellBillNum.Contains(\"" + sellBillNum + "\")&&WMS_Part.PartCode.Contains(\"" + partCode + "\")"; //去除掉系统单据号查询 query += " && SaleBillNum.Contains(\"" + saleBillNum + "\") && WMS_Part.PartCode.Contains(\"" + partCode + "\")"; query += " && WMS_Customer.CustomerShortName.Contains(\"" + customerShortName + "\")&& PrintStaus.Contains(\"" + printStaus + "\")&& ConfirmStatus.Contains(\"" + confirmStatus + "\")"; List <WMS_Sale_OrderModel> list = m_BLL.GetListByWhere(ref pager, query); //List<WMS_Sale_OrderModel> list = m_BLL.GetListByWhere(ref pager, "1=1"); GridRows <WMS_Sale_OrderModel> grs = new GridRows <WMS_Sale_OrderModel>(); decimal Qty_All = m_BLL.GetSumByWhere(query, "Qty"); List <WMS_Sale_OrderModel> footerList = new List <WMS_Sale_OrderModel>(); footerList.Add(new WMS_Sale_OrderModel() { SaleBillNum = "<div style='text-align:right;color:#444'>合计:</div>", //Qty = list.Sum(p => p.Qty), Qty = Qty_All, }); grs.rows = list; grs.footer = footerList; grs.total = pager.totalRows; return(Json(grs)); }
public void GetEnumerator_OnNullCurrentRowsProcessesRows() { IQueryable <GridModel> models = new[] { new GridModel(), new GridModel() }.AsQueryable(); IGridProcessor <GridModel> postProcessor = Substitute.For <IGridProcessor <GridModel> >(); IGridProcessor <GridModel> preProcessor = Substitute.For <IGridProcessor <GridModel> >(); IQueryable <GridModel> postProcessedModels = new[] { new GridModel() }.AsQueryable(); IQueryable <GridModel> preProcessedModels = new[] { new GridModel() }.AsQueryable(); postProcessor.ProcessorType = GridProcessorType.Post; preProcessor.ProcessorType = GridProcessorType.Pre; Grid <GridModel> grid = new Grid <GridModel>(models); postProcessor.Process(preProcessedModels).Returns(postProcessedModels); preProcessor.Process(models).Returns(preProcessedModels); grid.Processors.Add(postProcessor); grid.Processors.Add(preProcessor); GridRows <GridModel> rows = new GridRows <GridModel>(grid); IEnumerable <IGridRow> currentRows = rows.CurrentRows; IEnumerable <Object> actual = rows.ToList().Select(row => row.Model); IEnumerable <Object> expected = postProcessedModels; postProcessor.Received().Process(preProcessedModels); CollectionAssert.AreEqual(expected, actual); preProcessor.Received().Process(models); Assert.IsNull(currentRows); }
public JsonResult GetList(GridPager pager, string sourceBill, string partCode, string partName, string type, DateTime beginDate, DateTime endDate) { //List<WMS_InvRecordModel> list = m_BLL.GetList(ref pager, queryStr); //GridRows<WMS_InvRecordModel> grs = new GridRows<WMS_InvRecordModel>(); //grs.rows = list; //grs.total = pager.totalRows; //return Json(grs); string query = " 1=1 "; query += " && SourceBill.Contains(\"" + sourceBill + "\")&&WMS_Part.PartCode.Contains(\"" + partCode + "\")"; query += " && WMS_Part.PartName.Contains(\"" + partName + "\")&& Type.Contains(\"" + type + "\")"; query += " && OperateDate>=(\"" + beginDate + "\")&& OperateDate<=(\"" + endDate + "\")"; List <WMS_InvRecordModel> list = m_BLL.GetListByWhere(ref pager, query); GridRows <WMS_InvRecordModel> grs = new GridRows <WMS_InvRecordModel>(); List <WMS_InvRecordModel> footerList = new List <WMS_InvRecordModel>(); footerList.Add(new WMS_InvRecordModel() { SourceBill = "<div style='text-align:right;color:#444'>合计:</div>", QTY = list.Sum(p => p.QTY), }); grs.rows = list; grs.footer = footerList; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetList(GridPager pager, string arrivalBillNum, string po, string supplierShortName, string partCode, DateTime beginDate, DateTime endDate, string inspectStatus) { //TODO:显示到货的到货单 //List<WMS_AIModel> list = m_BLL.GetList(ref pager, queryStr); if (!String.IsNullOrEmpty(po)) { po = po.Trim(); } if (!String.IsNullOrEmpty(arrivalBillNum)) { arrivalBillNum = arrivalBillNum.Trim(); } if (!String.IsNullOrEmpty(supplierShortName)) { supplierShortName = supplierShortName.Trim(); } if (!String.IsNullOrEmpty(partCode)) { partCode = partCode.Trim(); } List <WMS_AIModel> list = m_BLL.GetListByWhere(ref pager, "WMS_PO.PO.Contains(\"" + po + "\")&&ArrivalBillNum.Contains(\"" + arrivalBillNum + "\") && WMS_PO.WMS_Supplier.SupplierShortName.Contains(\"" + supplierShortName + "\")&& WMS_PO.WMS_Part.PartCode.Contains(\"" + partCode + "\")&& InspectStatus.Contains(\"" + inspectStatus + "\")&& ArrivalDate>=(\"" + beginDate + "\")&& ArrivalDate<=(\"" + endDate + "\")"); GridRows <WMS_AIModel> grs = new GridRows <WMS_AIModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetList(GridPager pager, string invAdjustBillNum, string partCode, string partName, string adjustType, DateTime beginDate, DateTime endDate) { if (!String.IsNullOrEmpty(invAdjustBillNum)) { invAdjustBillNum = invAdjustBillNum.Trim(); } if (!String.IsNullOrEmpty(partName)) { partName = partName.Trim(); } if (!String.IsNullOrEmpty(partCode)) { partCode = partCode.Trim(); } if (!String.IsNullOrEmpty(adjustType)) { adjustType = adjustType.Trim(); } //List<WMS_Inv_AdjustModel> list = m_BLL.GetList(ref pager, queryStr); List <WMS_Inv_AdjustModel> list = m_BLL.GetListByWhere(ref pager, "InvAdjustBillNum.Contains(\"" + invAdjustBillNum + "\") && WMS_Part.PartName.Contains(\"" + partName + "\")&& WMS_Part.PartCode.Contains(\"" + partCode + "\")&& AdjustType.Contains(\"" + adjustType + "\")&& CreateTime>=(\"" + beginDate + "\")&& CreateTime<=(\"" + endDate + "\")&& !AdjustType.Contains(\"售\")"); GridRows <WMS_Inv_AdjustModel> grs = new GridRows <WMS_Inv_AdjustModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
//subchild - level 2 //subchild - level 3 public int GetRowCount() { GridRows.WaitTilIsVisible(); int count = GridRows.GetCount(); return(count); }
public JsonResult GetList(GridPager pager, string inspectBillNum, string po, string supplierShortName, string partCode, DateTime beginDate, DateTime endDate, string inStoreStatus) { if (!String.IsNullOrEmpty(po)) { po = po.Trim(); } if (!String.IsNullOrEmpty(inspectBillNum)) { inspectBillNum = inspectBillNum.Trim(); } if (!String.IsNullOrEmpty(supplierShortName)) { supplierShortName = supplierShortName.Trim(); } if (!String.IsNullOrEmpty(partCode)) { partCode = partCode.Trim(); } //TODO:查询出检验状态=已送检 and 入库状态=未入库 的记录 //List<WMS_AIModel> list = m_BLL.GetListByWhere(ref pager, "InspectStatus == \"已检验\" && InStoreStatus == \"未入库\" ") // .OrderBy(p => p.InspectBillNum).ToList(); List <WMS_AIModel> list = m_BLL.GetListByWhere(ref pager, "WMS_PO.PO.Contains(\"" + po + "\")&&InspectBillNum.Contains(\"" + inspectBillNum + "\") && WMS_PO.WMS_Supplier.SupplierShortName.Contains(\"" + supplierShortName + "\")&& WMS_PO.WMS_Part.PartCode.Contains(\"" + partCode + "\")&& InStoreStatus.Contains(\"" + inStoreStatus + "\")&& InspectDate>=(\"" + beginDate + "\")&& InspectDate<=(\"" + endDate + "\")"); GridRows <WMS_AIModel> grs = new GridRows <WMS_AIModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult FeedListGetList(GridPager pager, string type, string queryStr) { //TODO:显示未打印的投料单。 List <WMS_Feed_ListModel> list; if (type == "print") { list = m_BLL.GetListByWhere(ref pager, "PrintStaus == \"未打印\"") .GroupBy(p => new { p.FeedBillNum, p.ReleaseBillNum }) .Select(g => g.First()) .OrderBy(p => p.FeedBillNum).ToList(); } else { list = m_BLL.GetListByWhere(ref pager, "PrintStaus == \"已打印\" and ConfirmStatus == \"未确认\"") .GroupBy(p => new { p.FeedBillNum, p.ReleaseBillNum }) .Select(g => g.First()) .OrderBy(p => p.FeedBillNum).ToList(); } GridRows <WMS_Feed_ListModel> grs = new GridRows <WMS_Feed_ListModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetSupplierDelivery(GridPager pager, string po, string suppliername, string partcode, string partname, DateTime beginDate, DateTime endDate, string deliveryType) { if (!String.IsNullOrEmpty(po)) { po = po.Trim(); } if (!String.IsNullOrEmpty(suppliername)) { suppliername = suppliername.Trim(); } if (!String.IsNullOrEmpty(partcode)) { partcode = partcode.Trim(); } if (!String.IsNullOrEmpty(partname)) { partname = partname.Trim(); } List <WMS_AIModel> list = m_BLL.SupplierDelivery(ref pager, po, suppliername, partcode, partname, beginDate, endDate, deliveryType); GridRows <WMS_AIModel> grs = new GridRows <WMS_AIModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs, JsonRequestBehavior.AllowGet)); }
public void GetEnumerator_ProcessesRows() { IQueryable <GridModel> items = new[] { new GridModel(), new GridModel() }.AsQueryable(); IGridProcessor <GridModel> postProcessor = Substitute.For <IGridProcessor <GridModel> >(); IGridProcessor <GridModel> preProcessor = Substitute.For <IGridProcessor <GridModel> >(); IGridProcessor <GridModel> manProcessor = Substitute.For <IGridProcessor <GridModel> >(); IQueryable <GridModel> postProcessedItems = new[] { new GridModel() }.AsQueryable(); IQueryable <GridModel> preProcessedItems = new[] { new GridModel() }.AsQueryable(); manProcessor.ProcessorType = GridProcessorType.Manual; postProcessor.ProcessorType = GridProcessorType.Post; preProcessor.ProcessorType = GridProcessorType.Pre; Grid <GridModel> grid = new Grid <GridModel>(items); postProcessor.Process(preProcessedItems).Returns(postProcessedItems); manProcessor.Process(items).Returns(new GridModel[0].AsQueryable()); preProcessor.Process(items).Returns(preProcessedItems); grid.Processors.Add(postProcessor); grid.Processors.Add(preProcessor); grid.Processors.Add(manProcessor); IEnumerable <Object> actual = new GridRows <GridModel>(grid).ToList().Select(row => row.Model); IEnumerable <Object> expected = postProcessedItems; postProcessor.Received().Process(preProcessedItems); manProcessor.DidNotReceive().Process(items); preProcessor.Received().Process(items); Assert.Equal(expected, actual); }
public JsonResult GetList(GridPager pager, string feedBillNum, string assemblyPartCode, string subAssemblyPartCode, string printStaus, string confirmStatus, DateTime beginDate, DateTime endDate) { //List<WMS_Feed_ListModel> list = m_BLL.GetList(ref pager, queryStr); string query = " 1=1 "; query += " && CreateTime>=(\"" + beginDate + "\")&& CreateTime<=(\"" + endDate + "\")"; //query += " && FeedBillNum.Contains(\"" + feedBillNum + "\")&&WMS_Part.PartCode.Contains(\"" + assemblyPartCode + "\")"; query += " && FeedBillNum.Contains(\"" + feedBillNum + "\")"; query += " && WMS_Part.PartCode.Contains(\"" + subAssemblyPartCode + "\")&& PrintStaus.Contains(\"" + printStaus + "\")&& ConfirmStatus.Contains(\"" + confirmStatus + "\")"; //List<WMS_Feed_ListModel> list = m_BLL.GetListByWhere(ref pager, "FeedBillNum.Contains(\"" + feedBillNum + "\")&&WMS_Part.PartCode.Contains(\"" + assemblyPartCode + "\") && WMS_Part1.PartCode.Contains(\"" // + subAssemblyPartCode + "\")&& PrintStaus.Contains(\"" + printStaus + "\")&& ConfirmStatus.Contains(\"" + confirmStatus + "\")&& PrintDate>=(\"" // + beginDate + "\")&& PrintDate<=(\"" + endDate + "\")"); List <WMS_Feed_ListModel> list = m_BLL.GetListByWhere(ref pager, query); GridRows <WMS_Feed_ListModel> grs = new GridRows <WMS_Feed_ListModel>(); decimal FeedQty_All = m_BLL.GetSumByWhere(query, "FeedQty"); List <WMS_Feed_ListModel> footerList = new List <WMS_Feed_ListModel>(); footerList.Add(new WMS_Feed_ListModel() { FeedBillNum = "<div style='text-align:right;color:#444'>合计:</div>", //FeedQty = list.Sum(p => p.FeedQty), FeedQty = FeedQty_All, }); grs.rows = list; grs.footer = footerList; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetUserRight(GridPager pager, string userId) { if (userId == null) { GridRows <P_Sys_GetRightByUser_Result> grs = new GridRows <P_Sys_GetRightByUser_Result>(); grs.rows = new List <P_Sys_GetRightByUser_Result>(); grs.total = 0; return(Json(grs)); } var userRightList = sysRightGetUserRightBLL.GetList(userId); List <P_Sys_GetRightByUser_Result> list = userRightList.Skip((pager.page - 1) * pager.rows).Take(pager.rows).ToList(); int totalRecords = userRightList.Count(); var json = new { total = totalRecords, rows = (from r in list select new SysRightUserRight() { ModuleId = r.moduleId, ModuleName = r.moduleName, KeyCode = r.keyCode, }).ToArray() }; return(Json(json)); }
public void GridRows_SetsGrid() { IGrid <GridModel> expected = new Grid <GridModel>(Array.Empty <GridModel>()); IGrid <GridModel> actual = new GridRows <GridModel>(expected).Grid; Assert.Same(expected, actual); }
public void GridRows_SetsGrid() { IGrid <GridModel> expected = new Grid <GridModel>(new GridModel[0]); IGrid <GridModel> actual = new GridRows <GridModel>(expected).Grid; Assert.AreSame(expected, actual); }
public void GetEnumerator_OnNullCurrentRowsProcessesRows() { IQueryable<GridModel> items = new[] { new GridModel(), new GridModel() }.AsQueryable(); IGridProcessor<GridModel> postProcessor = Substitute.For<IGridProcessor<GridModel>>(); IGridProcessor<GridModel> preProcessor = Substitute.For<IGridProcessor<GridModel>>(); IQueryable<GridModel> postProcesseditems = new[] { new GridModel() }.AsQueryable(); IQueryable<GridModel> preProcesseditems = new[] { new GridModel() }.AsQueryable(); postProcessor.ProcessorType = GridProcessorType.Post; preProcessor.ProcessorType = GridProcessorType.Pre; Grid<GridModel> grid = new Grid<GridModel>(items); postProcessor.Process(preProcesseditems).Returns(postProcesseditems); preProcessor.Process(items).Returns(preProcesseditems); grid.Processors.Add(postProcessor); grid.Processors.Add(preProcessor); GridRows<GridModel> rows = new GridRows<GridModel>(grid); IEnumerable<IGridRow> currentRows = rows.CurrentRows; IEnumerable<Object> actual = rows.ToList().Select(row => row.Model); IEnumerable<Object> expected = postProcesseditems; postProcessor.Received().Process(preProcesseditems); Assert.Equal(expected, actual); preProcessor.Received().Process(items); Assert.Null(currentRows); }
public void GridRows_SetsGrid() { IGrid<GridModel> expected = new Grid<GridModel>(new GridModel[0]); IGrid<GridModel> actual = new GridRows<GridModel>(expected).Grid; Assert.Same(expected, actual); }
private void CreateGrid() { grid = new Grid(); grid.Redim(100, 10); grid.FixedRows = 0; rowsBase = grid.Rows; coord = new StandardHiddenRowCoordinator(grid.Rows); }
public JsonResult GetList(GridPager pager, string queryStr) { List <Spl_ContactCompanyCategoryModel> list = m_BLL.GetList(ref pager, queryStr); GridRows <Spl_ContactCompanyCategoryModel> grs = new GridRows <Spl_ContactCompanyCategoryModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetList(GridPager pager, string queryStr) { List <WMS_ReportModel> list = m_BLL.GetList(ref pager, queryStr); GridRows <WMS_ReportModel> grs = new GridRows <WMS_ReportModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
//[SupportFilter(ActionName = "Index")] public JsonResult GetList(GridPager pager, string queryStr) { List <Spl_Person> list = m_BLL.m_Rep.FindPageList(ref pager, queryStr).ToList(); GridRows <Spl_Person> grs = new GridRows <Spl_Person>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
////[SupportFilter(ActionName = "Index")] public JsonResult GetList(GridPager pager, string queryStr) { List <WC_OfficalAccounts> list = m_BLL.GetList(ref pager, queryStr); GridRows <WC_OfficalAccounts> grs = new GridRows <WC_OfficalAccounts>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetReturnOrderListByNum(GridPager pager, string returnOrderNum) { List <WMS_ReturnOrderModel> list = m_BLL.GetListByWhere(ref pager, "ReturnOrderNum == \"" + returnOrderNum + "\"&& PrintStaus <> \"已失效\"").ToList(); GridRows <WMS_ReturnOrderModel> grs = new GridRows <WMS_ReturnOrderModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetReturnInspectBillList(GridPager pager, string returnInspectBillNum) { List <WMS_ReturnInspectionModel> list = m_BLL.GetListByWhere(ref pager, "ReturnInspectionNum == \"" + returnInspectBillNum + "\" && InspectStatus == \"" + "未检验" + "\"").ToList(); GridRows <WMS_ReturnInspectionModel> grs = new GridRows <WMS_ReturnInspectionModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetList(GridPager pager, string queryStr, string parentId) { List <WMS_ReturnOrder_DModel> list = m_BLL.GetListByParentId(ref pager, queryStr, parentId); GridRows <WMS_ReturnOrder_DModel> grs = new GridRows <WMS_ReturnOrder_DModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult GetListParent(GridPager pager, string queryStr) { List <Spl_WarehouseModel> list = m_WarehouseBLL.GetList(ref pager, queryStr, GetUserId()); GridRows <Spl_WarehouseModel> grs = new GridRows <Spl_WarehouseModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public JsonResult RetunOrderForPrintedGetList(GridPager pager, string supplierCode, string supplierShortName) { List <WMS_ReturnOrder_DModel> list = m_BLL.GetListByWhereAndGroupBy(ref pager, "WMS_ReturnOrder.WMS_Supplier.SupplierCode.Contains(\"" + supplierCode + "\") && WMS_ReturnOrder.WMS_Supplier.SupplierShortName.Contains(\"" + supplierShortName + "\") && PrintStaus == \"已退货\" && ConfirmStatus == \"未确认\""); GridRows <WMS_ReturnOrder_DModel> grs = new GridRows <WMS_ReturnOrder_DModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
public void GetEnumerator_SetsRowCssClasses() { IQueryable<GridModel> items = new[] { new GridModel(), new GridModel() }.AsQueryable(); Grid<GridModel> grid = new Grid<GridModel>(items); GridRows<GridModel> rows = new GridRows<GridModel>(grid); rows.CssClasses = (model) => "grid-row"; Assert.True(rows.All(row => row.CssClasses == "grid-row")); }
public void GetEnumerator_ReturnsCurrentRows() { IQueryable<GridModel> items = new[] { new GridModel(), new GridModel() }.AsQueryable(); IGridProcessor<GridModel> preProcessor = Substitute.For<IGridProcessor<GridModel>>(); preProcessor.Process(items).Returns(new GridModel[0].AsQueryable()); preProcessor.ProcessorType = GridProcessorType.Pre; Grid<GridModel> grid = new Grid<GridModel>(items); GridRows<GridModel> rows = new GridRows<GridModel>(grid); rows.ToList(); grid.Processors.Add(preProcessor); IEnumerable<Object> actual = rows.ToList().Select(row => row.Model); IEnumerable<Object> expected = items; preProcessor.DidNotReceive().Process(Arg.Any<IQueryable<GridModel>>()); Assert.Equal(expected, actual); }
public void GetEnumerator_GetsSameEnumerable() { GridModel[] items = { new GridModel(), new GridModel() }; Grid<GridModel> grid = new Grid<GridModel>(items); GridRows<GridModel> rows = new GridRows<GridModel>(grid); IEnumerator actual = (rows as IEnumerable).GetEnumerator(); IEnumerator expected = rows.GetEnumerator(); while (expected.MoveNext() | actual.MoveNext()) Assert.Same((expected.Current as IGridRow).Model, (actual.Current as IGridRow).Model); }
public void Grid_SetsRows() { Grid<GridModel> grid = new Grid<GridModel>(new GridModel[0]); GridRows<GridModel> actual = grid.Rows as GridRows<GridModel>; GridRows<GridModel> expected = new GridRows<GridModel>(grid); Assert.Same(expected.Grid, actual.Grid); Assert.Equal(expected, actual); }