using FineUIPro; using iWareCommon.Common.Entity; using iWareDataCore.BASE.Service; using iWareExcel.EXCEL.Service; using iWareWms.Code.Excel.Service; using System; using System.Collections.Generic; namespace iWareWms.View.InOut { public partial class EndInOutList : PageBase { protected override Grid GetGrid() { return ListNoGrid; } protected override DropDownList GetPageSizeDropDownList() { return ddlPageSize; } protected override List GetDataSource(int pageIndex, int pageSize, out string msg, out int totalNum, out int currentPage) { var plans = InOutListService.GetInstance().QueryByParam(new QueryParam { Search = new Dictionary { { "ListNo", tbListNo.Text.Trim() } }, Filter = new Dictionary { { "Status", 1 } }, PageIndex = pageIndex, PageSize = pageSize }, out msg, out totalNum, out currentPage); var res = new List(); plans.ForEach(x => res.Add(x)); return res; } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Query(1); } } protected override Window GetWindow() { return Window2; } protected override void GetPath(object userName) { string msg; var plans = InOutListService.GetInstance().QueryByParam(new QueryParam { Search = new Dictionary { { "ListNo", tbListNo.Text.Trim() } } }, out msg); var datas = new List(); plans.ForEach(x => datas.Add(x)); var workBooks = WorkBookService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary { { "Name", "已完成出入库单" } } }, out msg); var path = ExcelService.GetInstance().ToExcelByEPPlus(workBooks[0], new Dictionary> { { "已完成出入库单", datas } }, out msg); Session["ExcelPath"] = path; } /// /// 单号状态,前台枚举显示 /// /// /// //protected string GetStatus(object status) //{ // return ((EPlanStatus)Convert.ToInt32(status)).ToString(); //} protected override FineUIPro.Timer GetTimer() { return timer1; } } }