public ActionResult Index(FastOrder FastOrder, EFPagingInfo <FastOrder> p, bool?IsShowSupAgent, int?LowerLevel, int IsFirst = 0) { if (IsShowSupAgent == null) { IsShowSupAgent = false; } LowerLevel = LowerLevel == null ? 0 : LowerLevel; p = this.Condition(FastOrder, p, IsShowSupAgent.Value, LowerLevel.Value); IPageOfItems <FastOrder> FastOrderList = null; if (IsFirst == 0) { FastOrder.STime = DateTime.Now.AddDays(-1).Date; FastOrder.ETime = DateTime.Now; FastOrderList = new PageOfItems <FastOrder>(new List <FastOrder>(), 0, 10, 0, new Hashtable()); } else { FastOrderList = Entity.Selects <FastOrder>(p); } ViewBag.FastOrderList = FastOrderList; ViewBag.FastOrder = FastOrder; //副表信息 List <int> UId = FastOrderList.Select(o => o.UId).Distinct().ToList(); ViewBag.UsersList = Entity.Users.Where(n => n.State == 1 && UId.Contains(n.Id)).ToList(); //其他信息 ViewBag.IsShowSupAgent = IsShowSupAgent;//是否显示下级 ViewBag.LowerLevel = LowerLevel; //权限相关 ViewBag.Edit = this.checkPower("Edit"); return(View()); }
public ActionResult Index(FastOrder FastOrder, EFPagingInfo <FastOrder> p, bool?IsShowSupAgent, int IsFirst = 0) { if (IsShowSupAgent == null) { IsShowSupAgent = false; } p = this.Condition(FastOrder, p, IsShowSupAgent.Value); IPageOfItems <FastOrder> FastOrderList = null; if (IsFirst == 0) { FastOrderList = new PageOfItems <FastOrder>(new List <FastOrder>(), 0, 10, 0, new Hashtable()); } else { FastOrderList = Entity.Selects <FastOrder>(p); } ViewBag.FastOrderList = FastOrderList; ViewBag.FastOrder = FastOrder; //副表信息 List <int> UId = FastOrderList.Select(o => o.UId).Distinct().ToList(); ViewBag.UsersList = Entity.Users.Where(n => n.State == 1 && UId.Contains(n.Id)).ToList(); //其他信息 var FastPayWayList = Entity.FastPayWay.ToList(); var AllowFastPayWayIdList = FastPayWayList.Where(o => AllowFastPayWay.Contains(o.DllName)).Select(o => o.Id).ToList(); ViewBag.FastPayWayList = FastPayWayList; ViewBag.AllowFastPayWayIdList = AllowFastPayWayIdList; ViewBag.SysAgentList = Entity.SysAgent.Where(n => n.State == 1).ToList(); ViewBag.IsShowSupAgent = IsShowSupAgent;//是否显示下级 //权限相关 ViewBag.Edit = this.checkPower("Edit"); ViewBag.IndexStats = this.checkPower("IndexStats"); ViewBag.ExcelExport = this.checkPower("ExcelExport"); ViewBag.SysAgentClearing = this.checkPower("SysAgentClearing"); ViewBag.StateChange = this.checkPower("StateChange"); ViewBag.Resubmit = this.checkPower("Resubmit"); ViewBag.ExcelInport = this.checkPower("ExcelInport"); ViewBag.Download = this.checkPower("Download"); ViewBag.OrdersRepair = this.checkPower("OrdersRepair"); return(View()); }