using FineUIPro;
|
using iWareCommon.Common.Entity;
|
using iWareDataCore.Check.Service;
|
using iWareExcel.EXCEL.Service;
|
using iWareWms;
|
using iWareWms.Code.Excel.Service;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
|
|
namespace iWareWms.View.CHECK.Plan
|
{
|
public partial class PlaceMaterialView : PageBase
|
{
|
protected override Grid GetGrid()
|
{
|
return PlaceMaterialGrid;
|
}
|
|
protected override FineUIPro.DropDownList GetPageSizeDropDownList()
|
{
|
return ddlPageSize;
|
}
|
|
|
protected override List<object> GetDataSource(int pageIndex, int pageSize, out string msg, out int totalNum, out int currentPage)
|
{
|
var plans = PlanViewService.GetInstance().QueryByParam(new QueryParam
|
{
|
Filter = new Dictionary<string, object> { { "PlanId", Convert.ToInt32(Request.QueryString["Id"]) } },
|
Search = new Dictionary<string, object> { { "MaterialCode", tbMaterialCode.Text.Trim() }, { "PlaceCode", tbPlaceCode.Text.Trim() } },
|
PageIndex = pageIndex,
|
PageSize = pageSize
|
}, out msg, out totalNum, out currentPage);
|
|
var res = new List<object>();
|
|
plans.ForEach(x => res.Add(x));
|
|
return res;
|
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
if (!IsPostBack)
|
{
|
|
|
Query(1);
|
}
|
|
}
|
|
protected override void GetPath(object userName)
|
{
|
string msg;
|
var placematerial = PlanViewService.GetInstance().QueryByParam(new QueryParam
|
{
|
Filter = new Dictionary<string, object> { { "PlanId", Convert.ToInt32(Request.QueryString["Id"]) } },
|
Search = new Dictionary<string, object> { { "MaterialCode", tbMaterialCode.Text.Trim() }, { "PlaceCode", tbPlaceCode.Text.Trim() } },
|
}, out msg);
|
|
var placematerials = new List<object>();
|
placematerial.ForEach(x => placematerials.Add(x));
|
|
var workBooks = WorkBookService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary<string, object> { { "Name", "已完成盘点明细" } } }, out msg);
|
|
var path = ExcelService.GetInstance().ToExcelByEPPlus(workBooks[0], new Dictionary<string, List<object>> { { "已完成盘点明细", placematerials } }, out msg);
|
|
Session["ExcelPath"] = path;
|
}
|
|
|
protected override Window GetWindow()
|
{
|
return Window2;
|
}
|
|
protected override FineUIPro.Timer GetTimer()
|
{
|
return timer1;
|
}
|
|
|
}
|
}
|