public ActionResult BulkEditSave(GridCommand command, [Bind(Prefix = "updated")]IEnumerable<PluginModel> updatedPlugins) { if (!_permissionService.Authorize(StandardPermissionProvider.ManagePlugins)) return AccessDeniedView(); //bool changed = false; if (updatedPlugins != null) { foreach (var pluginModel in updatedPlugins) { //update var pluginDescriptor = _pluginFinder.GetPluginDescriptorBySystemName(pluginModel.SystemName, false); if (pluginDescriptor != null) { //we allow editing of 'friendly name' and 'display order' pluginDescriptor.FriendlyName = pluginModel.FriendlyName; pluginDescriptor.DisplayOrder = pluginModel.DisplayOrder; PluginFileParser.SavePluginDescriptionFile(pluginDescriptor); //changed = true; } } } //if (changed) //restart application //_webHelper.RestartAppDomain("~/Admin/Plugin/List"); return BulkEditSelect(command); }
public ActionResult _AjaxList(GridCommand command, WorkingCalendarSearchModel searchModel) { var objList = this.genericMgr.FindAllWithNativeSql<object[]>("exec USP_Busi_GetWorkingCalendarView ?,?,?,?", new object[] { searchModel.SearchRegion, "", searchModel.StartWorkingDate, searchModel.EndWorkingDate }); var list = new List<WorkingCalendarView>(); foreach (var obj in objList) { var w = obj as object[]; if (w == null) continue; list.Add(new WorkingCalendarView { Date = (DateTime)w[0], DateFrom = (DateTime)w[1], DateTo = (DateTime)w[2] }); } return PartialView(new GridModel(list)); }
public ActionResult Configure(GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings)) return Content("Access denied"); var tmp = new List<FixedTaxRateModel>(); foreach (var taxCategory in _taxCategoryService.GetAllTaxCategories()) tmp.Add(new FixedTaxRateModel() { TaxCategoryId = taxCategory.Id, TaxCategoryName = taxCategory.Name, Rate = GetTaxRate(taxCategory.Id) }); var tmp2 = tmp.ForCommand(command); var gridModel = new GridModel<FixedTaxRateModel> { Data = tmp2, Total = tmp2.Count() }; return new JsonResult { Data = gridModel }; }
public ActionResult List(GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCustomers)) return AccessDeniedView(); var customers = _customerService.GetOnlineCustomers(DateTime.UtcNow.AddMinutes(-_customerSettings.OnlineCustomerMinutes), null, command.Page - 1, command.PageSize); var model = new GridModel<OnlineCustomerModel> { Data = customers.Select(x => { return new OnlineCustomerModel() { Id = x.Id, CustomerInfo = x.IsRegistered() ? x.Email : _localizationService.GetResource("Admin.Customers.Guest"), LastIpAddress = x.LastIpAddress, Location = _geoCountryLookup.LookupCountryName(x.LastIpAddress), LastActivityDate = _dateTimeHelper.ConvertToUserTime(x.LastActivityDateUtc, DateTimeKind.Utc), LastVisitedPage = x.GetAttribute<string>(SystemCustomerAttributeNames.LastVisitedPage) }; }), Total = customers.TotalCount }; return new JsonResult { Data = model }; }
public ActionResult RoutingMasterList(GridCommand command, RoutingMasterSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }
public ActionResult AffiliatedCustomerList(int affiliateId, GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageAffiliates)) return AccessDeniedView(); var affiliate = _affiliateService.GetAffiliateById(affiliateId); if (affiliate == null) throw new ArgumentException("No affiliate found with the specified id"); var customers = _customerService.GetAllCustomers( affiliateId: affiliate.Id, pageIndex: command.Page - 1, pageSize: command.PageSize); var model = new GridModel<AffiliateModel.AffiliatedCustomerModel> { Data = customers.Select(customer => { var customerModel = new AffiliateModel.AffiliatedCustomerModel(); customerModel.Id = customer.Id; customerModel.Name = customer.Email; return customerModel; }), Total = customers.TotalCount }; return new JsonResult { Data = model }; }
public ActionResult Configure(GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings)) return Content("Access denied"); var tmp = new List<FixedShippingRateModel>(); foreach (var shippingMethod in _shippingService.GetAllShippingMethods()) tmp.Add(new FixedShippingRateModel() { ShippingMethodId = shippingMethod.Id, ShippingMethodName = shippingMethod.Name, Rate = GetShippingRate(shippingMethod.Id) }); var tmp2 = tmp.ForCommand(command); var gridModel = new GridModel<FixedShippingRateModel> { Data = tmp2, Total = tmp2.Count() }; return new JsonResult { Data = gridModel }; }
public ActionResult _SearchResult(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo) { string sqlStr = PrepareSearchStatement(command, item, supplier, dateFrom, dateTo); IList<object[]> objectList = this.queryMgr.FindAllWithNativeSql<object[]>(sqlStr); var inspectDetailList = (from inp in objectList select new InspectDetail { IpNo = (string)inp[0], ManufactureParty = (string)inp[1], ManufacturePartyName = (string)inp[2], Item = (string)inp[3], ItemDescription = (string)inp[4], ReferenceItemCode = (string)inp[5], UnitCount = (decimal)inp[6], Uom = (string)inp[7], RejectQty = (decimal)inp[8], InspectQty = (decimal)inp[9] }).ToList(); int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage)); if (inspectDetailList.Count > count) { SaveWarningMessage(string.Format(Resources.EXT.ControllerLan.Con_DataExceedRowTheSpecifiedRows, count)); } return View(inspectDetailList.Take(count)); }
public ActionResult _ReturnHierarchyAjax(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo) { string sqlStr = PrepareReturnSearchStatement(command, item, supplier, dateFrom, dateTo); IList<object[]> objectList = this.queryMgr.FindAllWithNativeSql<object[]>(sqlStr); var receiveReturnList = (from rr in objectList select new ReceiveReturnModel { Supplier = (string)rr[0], Item = (string)rr[1], ReceivedQty = rr[2] == null ? 0 : (decimal)rr[2], RejectedQty = rr[3] == null ? 0 : (decimal)rr[3], ItemDescription = (string)rr[4], ReferenceItemCode = (string)rr[5], Uom = (string)rr[6], SupplierName = (string)rr[7] }).ToList(); int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage)); if (receiveReturnList.Count > count) { SaveWarningMessage(string.Format(Resources.EXT.ControllerLan.Con_DataExceedRowTheSpecifiedRows, count)); } return PartialView(new GridModel(receiveReturnList)); }
public ActionResult _AjaxList(GridCommand command, SearchModel searchModel) { SearchStatementModel searchStatementModel = PrepareSearchStatement(command, searchModel); GridModel<PostDO> gridlist = GetAjaxPageData<PostDO>(searchStatementModel, command); return PartialView(gridlist); }
private SearchStatementModel PrepareSearchStatement(GridCommand command, SearchModel searchModel) { string whereStatement = ""; IList<object> param = new List<object>(); HqlStatementHelper.AddEqStatement("OrderNo", searchModel.OrderNo, "t", ref whereStatement, param); HqlStatementHelper.AddEqStatement("ReceiptNo", searchModel.ReceiptNo, "t", ref whereStatement, param); HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "t", ref whereStatement, param); if (searchModel.StartDate != null & searchModel.EndDate != null) { HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartDate, searchModel.EndDate, "t", ref whereStatement, param); } else if (searchModel.StartDate != null & searchModel.EndDate == null) { HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartDate, "t", ref whereStatement, param); } else if (searchModel.StartDate == null & searchModel.EndDate != null) { HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndDate, "t", ref whereStatement, param); } string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors); if (command.SortDescriptors.Count == 0) { sortingStatement = " order by t.CreateDate desc"; } SearchStatementModel searchStatementModel = new SearchStatementModel(); searchStatementModel.SelectCountStatement = selectCountStatement; searchStatementModel.SelectStatement = selectStatement; searchStatementModel.WhereStatement = whereStatement; searchStatementModel.SortingStatement = sortingStatement; searchStatementModel.Parameters = param.ToArray<object>(); return searchStatementModel; }
private SearchNativeSqlStatementModel PrepareSearchStatement(GridCommand command, CabProductionViewSearchModel searchModel) { string statement = selectStatement; if (!string.IsNullOrWhiteSpace(searchModel.Flow)) { statement += string.Format(" and m.Flow = '{0}'", searchModel.Flow); } if (searchModel.Type != null) { statement += string.Format(" and m.Type = {0}", searchModel.Type); } if (searchModel.IsOut) { statement += " and exists(select 1 from ORD_OrderMstr_2 m2 where m2.OrderNo = m.ExtOrderNo)"; } string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors); if (string.IsNullOrEmpty(sortingStatement)) { sortingStatement = " order by ExtSeq asc"; } SearchNativeSqlStatementModel searchStatementModel = new SearchNativeSqlStatementModel(); searchStatementModel.SelectSql = statement; searchStatementModel.SortingStatement = sortingStatement; return searchStatementModel; }
public ActionResult TaxRateUpdate(FixedTaxRateModel model, GridCommand command) { int taxCategoryId = model.TaxCategoryId; decimal rate = model.Rate; _settingService.SetSetting(string.Format("Tax.TaxProvider.FixedRate.TaxCategoryId{0}", taxCategoryId), rate); var tmp = new List<FixedTaxRateModel>(); foreach (var taxCategory in _taxCategoryService.GetAllTaxCategories()) tmp.Add(new FixedTaxRateModel() { TaxCategoryId = taxCategory.Id, TaxCategoryName = taxCategory.Name, Rate = GetTaxRate(taxCategory.Id) }); var tmp2 = tmp.ForCommand(command); var gridModel = new GridModel<FixedTaxRateModel> { Data = tmp2, Total = tmp2.Count() }; return new JsonResult { Data = gridModel }; }
public ActionResult _SearchResult(GridCommand command, string item, string supplier, DateTime? dateFrom, DateTime? dateTo) { string sqlStr = PrepareSearchStatement(command, item, supplier, dateFrom, dateTo); IList<object[]> objectList = base.genericMgr.FindAllWithNativeSql<object[]>(sqlStr); var inspectDetailList = (from inp in objectList select new InspectDetail { IpNo = (string)inp[0], ManufactureParty = (string)inp[1], ManufacturePartyName = (string)inp[2], Item = (string)inp[3], ItemDescription = (string)inp[4], ReferenceItemCode = (string)inp[5], UnitCount = (decimal)inp[6], Uom = (string)inp[7], RejectQty = (decimal)inp[8], InspectQty = (decimal)inp[9] }).ToList(); int count = Convert.ToInt32(base.systemMgr.GetEntityPreferenceValue(EntityPreference.CodeEnum.MaxRowSizeOnPage)); if (inspectDetailList.Count > count) { SaveWarningMessage(string.Format("数据超过{0}行,只显示前{0}行", count)); } //return PartialView(inspectDetailList.Take(count)); GridModel<InspectDetail> gridModel = new GridModel<InspectDetail>(); gridModel.Total = count; gridModel.Data = inspectDetailList.Take(count); return PartialView(gridModel); }
public ActionResult Categories(GridCommand command) { var model = new GridModel<TaxCategoryModel>(); if (_permissionService.Authorize(StandardPermissionProvider.ManageTaxSettings)) { var categoriesModel = _taxCategoryService.GetAllTaxCategories() .Select(x => x.ToModel()) .ForCommand(command) .ToList(); model.Data = categoriesModel; model.Total = categoriesModel.Count; } else { model.Data = Enumerable.Empty<TaxCategoryModel>(); NotifyAccessDenied(); } return new JsonResult { Data = model }; }
public ActionResult CurrentCarts(GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCurrentCarts)) return AccessDeniedView(); var customers = _customerService.GetAllCustomers( loadOnlyWithShoppingCart: true, sct: ShoppingCartType.ShoppingCart, pageIndex: command.Page - 1, pageSize: command.PageSize); var gridModel = new GridModel<ShoppingCartModel> { Data = customers.Select(x => { return new ShoppingCartModel() { CustomerId = x.Id, CustomerEmail = x.IsRegistered() ? x.Email : _localizationService.GetResource("Admin.Customers.Guest"), TotalItems = x.ShoppingCartItems.Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart).ToList().GetTotalProducts() }; }), Total = customers.TotalCount }; return new JsonResult { Data = gridModel }; }
public ActionResult List(GridCommand command, OrderSeqSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); var error = false; if (string.IsNullOrWhiteSpace(searchModel.ProdLine)) { error = true; SaveWarningMessage(Resources.ErrorMessage.Errors_Common_FieldRequired, Resources.ORD.OrderMaster.OrderMaster_Flow); } if (!string.IsNullOrWhiteSpace(searchModel.TraceCode) && !error) { if (base.genericMgr.FindAll<long>("select count(*) from OrderSeq as s where s.TraceCode = ? and s.ProductLine=? ", new object[] { searchModel.TraceCode, searchModel.ProdLine })[0] == 0) { error = true; SaveErrorMessage("Van号值加生产线找不到对应的数据。"); } } if (error) { ViewBag.ReadOnly = true; return View(); } ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }
public ActionResult List(GridCommand command, string Flow) { ViewBag.Flow = Flow; this.CheckFlow(Flow, true); ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }
public ActionResult List(GridCommand command, IssueNoSearchModel searchModel) { var search = this.ProcessSearchModel(command, searchModel); //TempData["IssueNoSearchModel"] = searchModel; ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }
public ActionResult List(GridCommand command, LocationLotDetailSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); if (string.IsNullOrEmpty(searchModel.Location)) { SaveWarningMessage(Resources.EXT.ControllerLan.Con_LocationCanNotBeEmpty); return View(); } if (string.IsNullOrEmpty(searchModel.LotNoFrom)) { SaveWarningMessage(Resources.EXT.ControllerLan.Con_FirstBatchNumberCanNotBeEmpty); return View(); } if (string.IsNullOrEmpty(searchModel.LotNoFrom) && !string.IsNullOrEmpty(searchModel.LotNoTo)) { SaveWarningMessage(Resources.EXT.ControllerLan.Con_FirstBatchNumberBeEmptyCanNotInputSecondBatchNumber); return View(); } if (!string.IsNullOrEmpty(searchModel.Location)&&!string.IsNullOrEmpty(searchModel.LotNoFrom)) { ViewBag.Region = searchModel.Region; TempData["_AjaxMessage"] = ""; } else { SaveWarningMessage(Resources.EXT.ControllerLan.Con_SearchConditionNeedLocationAndBatchNo); } return View(); }
public ActionResult ShippingRateUpdate(FixedShippingRateModel model, GridCommand command) { int shippingMethodId = model.ShippingMethodId; decimal rate = model.Rate; _settingService.SetSetting(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId), rate); var tmp = new List<FixedShippingRateModel>(); foreach (var shippingMethod in _shippingService.GetAllShippingMethods()) tmp.Add(new FixedShippingRateModel() { ShippingMethodId = shippingMethod.Id, ShippingMethodName = shippingMethod.Name, Rate = GetShippingRate(shippingMethod.Id) }); var tmp2 = tmp.ForCommand(command); var gridModel = new GridModel<FixedShippingRateModel> { Data = tmp2, Total = tmp2.Count() }; return new JsonResult { Data = gridModel }; }
public ActionResult _AjaxList(GridCommand command, LocationLotDetailSearchModel searchModel) { if (string.IsNullOrEmpty(searchModel.Location)) { return PartialView(new GridModel(new List<LocationLotDetail>())); } if (string.IsNullOrEmpty(searchModel.LotNoFrom)) { return PartialView(new GridModel(new List<LocationLotDetail>())); ; } if (string.IsNullOrEmpty(searchModel.LotNoFrom) && !string.IsNullOrEmpty(searchModel.LotNoTo)) { return PartialView(new GridModel(new List<LocationLotDetail>())); } ReportSearchStatementModel reportSearchStatementModel = PrepareSearchStatement(command, searchModel); GridModel<LocationLotDetail> gridModel = GetAuditInspectionPageData<LocationLotDetail>(reportSearchStatementModel); foreach (var locationLotDetail in gridModel.Data) { locationLotDetail.ItemDescription=genericMgr.FindById<Item>(locationLotDetail.Item).Description; } return PartialView(gridModel); }
public ActionResult List(GridCommand command) { if (!_permissionService.Authorize(StandardPermissionProvider.ManagePolls)) return AccessDeniedView(); var polls = _pollService.GetPolls(0, false, command.Page - 1, command.PageSize, true); var gridModel = new GridModel<PollModel> { Data = polls.Select(x => { var m = x.ToModel(); if (x.StartDateUtc.HasValue) m.StartDate = _dateTimeHelper.ConvertToUserTime(x.StartDateUtc.Value, DateTimeKind.Utc); if (x.EndDateUtc.HasValue) m.EndDate = _dateTimeHelper.ConvertToUserTime(x.EndDateUtc.Value, DateTimeKind.Utc); m.LanguageName = x.Language.Name; return m; }), Total = polls.TotalCount }; return new JsonResult { Data = gridModel }; }
private SearchStatementModel PrepareSearchStatement(GridCommand command, SMSRecSearchModel searchModel) { string whereStatement = string.Empty; IList<object> param = new List<object>(); HqlStatementHelper.AddLikeStatement("Issue", searchModel.Issue, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param); HqlStatementHelper.AddLikeStatement("MsgID", searchModel.MsgID, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param); HqlStatementHelper.AddLikeStatement("Content", searchModel.Content, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param); HqlStatementHelper.AddLikeStatement("SrcID", searchModel.SrcID, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param); if (searchModel.DateFrom != null & searchModel.DateTo != null) { HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.DateFrom, searchModel.DateTo, "sms", ref whereStatement, param); } else if (searchModel.DateFrom != null & searchModel.DateTo == null) { HqlStatementHelper.AddGeStatement("CreateDate", searchModel.DateFrom, "sms", ref whereStatement, param); } else if (searchModel.DateFrom == null & searchModel.DateTo != null) { HqlStatementHelper.AddLeStatement("CreateDate", searchModel.DateTo, "sms", ref whereStatement, param); } HqlStatementHelper.AddEqStatement("EventHandler", SMSStatus.SMSEventHeadler_MESSAGERECEIVEDINTERFACE, "sms", ref whereStatement, param); string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors); SearchStatementModel searchStatementModel = new SearchStatementModel(); searchStatementModel.SelectCountStatement = selectCountStatement; searchStatementModel.SelectStatement = selectStatement; searchStatementModel.WhereStatement = whereStatement; searchStatementModel.SortingStatement = sortingStatement; searchStatementModel.Parameters = param.ToArray<object>(); return searchStatementModel; }
public ActionResult List(GridCommand command, WorkingCalendarSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); var error = false; if (string.IsNullOrWhiteSpace(searchModel.SearchRegion)) { error = true; SaveErrorMessage(Resources.ErrorMessage.Errors_Common_FieldRequired, Resources.PRD.WorkingCalendar.WorkingCalendar_ProdLine); } if (!searchModel.StartWorkingDate.HasValue) { error = true; SaveErrorMessage(Resources.ErrorMessage.Errors_Common_FieldRequired, Resources.PRD.WorkingCalendar.WorkingCalendar_StartWorkingDate); } if (!searchModel.EndWorkingDate.HasValue) { error = true; SaveErrorMessage(Resources.ErrorMessage.Errors_Common_FieldRequired, Resources.PRD.WorkingCalendar.WorkingCalendar_EndWorkingDate); } if (searchModel.StartWorkingDate.HasValue && searchModel.EndWorkingDate.HasValue && searchModel.StartWorkingDate.Value >= searchModel.EndWorkingDate.Value) { error = true; SaveErrorMessage(Resources.PRD.WorkingCalendar.WorkingCalendar_EndDateMustGreaterThanStartDate); } ViewBag.ReadOnly = error; ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }
//[SconitAuthorize(Permissions = "Url_LocationIOB_View")] public ActionResult _AjaxList(GridCommand command, LocationTransactionSearchModel searchModel) { if (string.IsNullOrEmpty(searchModel.Location)) { return PartialView(new GridModel(new List<LocationTransactionView>())); } SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel); GridModel<string> itemModel = GetAjaxPageData<string>(searchStatementModel, command); #region 拼接库存收发存对象 IList<string> itemLocList = (IList<string>)itemModel.Data; string hql = "from LocationTransaction as l where l.Item in (?"; IList<object> param = new List<object>(); param.Add(itemLocList[0]); for (int i = 1; i < itemLocList.Count; i++) { hql += ",?"; param.Add(itemLocList[i]); } hql += ")"; hql += " and (l.LocationFrom = ? and l.LocationTo = ?)"; param.Add(searchModel.Location.Trim()); param.Add(searchModel.Location.Trim()); if (!string.IsNullOrEmpty(searchModel.Item)) { hql += " and l.Item = ?"; param.Add(searchModel.Item.Trim()); } IList<LocationTransaction> loctransList = genericMgr.FindAll<LocationTransaction>(hql, param.ToArray()); IList<LocationTransactionView> groupLoctransList = (from l in loctransList group l by new { Item = l.Item, Location = l.Location } into result select new LocationTransactionView { Item = result.Key.Item, GroupLocation = result.Key.Location, SumProcurementInQty = result.Sum(t => t.ProcurementInQty), SumProductionInQty = result.Sum(t => t.ProductionInQty), SumProductionOutQty = result.Sum(t => t.ProductionOutQty), SumDistributionOutQty = result.Sum(t => t.DistributionOutQty), SumTransferInQty = result.Sum(t => t.TransferInQty), SumTransferOutQty = result.Sum(t => t.TransferOutQty), }).ToList(); #endregion GridModel<LocationTransactionView> groupModel = new GridModel<LocationTransactionView>(); groupModel.Total = itemModel.Total; groupModel.Data = groupLoctransList; ViewBag.Total = groupModel.Total; return PartialView(groupModel); }
public ActionResult List(GridCommand command, ProductLineLocationDetailSearchModel searchModel) { this.ProcessSearchModel(command, searchModel); if (string.IsNullOrEmpty(searchModel.OrderNo)) { SaveWarningMessage("请输入订单号。"); return View(new List<OrderBomDetail>()); } else { TempData["_AjaxMessage"] = ""; string sql = PrepareSearchStatement(searchModel); IList<object[]> list = base.genericMgr.FindAllWithNativeSql<object[]>(sql); IList<OrderBomDetail> OrderBomDetailList = new List<OrderBomDetail>(); OrderBomDetailList = (from tak in list select new OrderBomDetail { OrderNo = (string)tak[0], Item = (string)tak[1], ItemDescription = (string)tak[2], ReferenceItemCode = (string)tak[3], Uom = (string)tak[4], ManufactureParty = (string)tak[5], Operation = (int)tak[6], OpReference = (string)tak[7], OrderedQty = (decimal)tak[8], HuId = (string)tak[9], FeedQty = (decimal)tak[10], }).ToList(); return View(OrderBomDetailList); } }
public ActionResult _AjaxList(GridCommand command, OrderMasterSearchModel searchModel) { if (!this.CheckSearchModelIsNull(searchModel)) { return PartialView(new GridModel(new List<OrderMaster>())); } string whereStatement = "and o.OrderStrategy=" + (int)com.Sconit.CodeMaster.FlowStrategy.SEQ; if (!string.IsNullOrWhiteSpace(searchModel.SequenceGroup)) { whereStatement += " and o.SeqGroup='" + searchModel.SequenceGroup + "'"; } if (searchModel.IsListPrice) { whereStatement += string.Format(" and IsListPrice=0 and o.Status not in ({0},{1})", (int)com.Sconit.CodeMaster.OrderStatus.Cancel, (int)com.Sconit.CodeMaster.OrderStatus.Close); } if (searchModel.IsPrintOrder) { whereStatement += string.Format(" and IsPrintOrder=0 and o.Status not in ({0},{1})", (int)com.Sconit.CodeMaster.OrderStatus.Cancel, (int)com.Sconit.CodeMaster.OrderStatus.Close); } searchModel.SubType = (int)com.Sconit.CodeMaster.OrderSubType.Normal; ProcedureSearchStatementModel procedureSearchStatementModel = PrepareSearchStatement(command, searchModel, whereStatement, false); GridModel<OrderMaster> gridModel = GetAjaxPageDataProcedure<OrderMaster>(procedureSearchStatementModel, command); foreach (var ordermstr in gridModel.Data) { ordermstr.SeqOrderStrategyDescription = ordermstr.OrderTemplate == "KitOrder.xls" ? "Kit" : "排序"; } return PartialView(gridModel); }
public ActionResult _AjaxOutSoureViewList(GridCommand command, CabProductionViewSearchModel searchModel) { SearchNativeSqlStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel); var list = GetPageDataEntityWithNativeSql<CabProductionView>(searchStatementModel, command); ViewBag.Total1 = list.Total; return PartialView(list); }
public ActionResult List(GridCommand command, FacilityOrderSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }