//public ActionResult _Consignments() //{ // var data = OrderService.GetAllSalesConsignments(CurrentTenantId, CurrentWarehouseId).OrderByDescending(x => x.DateCreated) // .Select(ops => new // { // ops.DeliveryNO, // ops.OrderID, // ops.DateCreated, // ops.OrderProcessID, // ops.Order.OrderNumber, // ops.Order.Account.AccountCode, // ops.Order.Account.CompanyName // }).ToList(); // return PartialView(data); //} public ActionResult _Consignments(int?consignmentId) { var viewModel = GridViewExtension.GetViewModel(ViewBag.productId + "consignmentgridview"); if (viewModel == null) { viewModel = ConsignmentCustomBinding.CreateConsignmentGridViewModel(); } ViewBag.ConsignmentId = consignmentId; return(_ConsignmentsGridActionCore(viewModel, consignmentId)); }
public ActionResult _ConsignmentsGridActionCore(GridViewModel gridViewModel, int?Id) { gridViewModel.ProcessCustomBinding( new GridViewCustomBindingGetDataRowCountHandler(args => { ConsignmentCustomBinding.ConsignmentDataRowCount(args, CurrentTenantId, CurrentWarehouseId, Id); }), new GridViewCustomBindingGetDataHandler(args => { ConsignmentCustomBinding.ConsignmentData(args, CurrentTenantId, CurrentWarehouseId, Id); }) ); return(PartialView("_Consignments", gridViewModel)); }