using FineUIPro;
|
using FineUIPro.iWareWms;
|
using iWareCommon.Common.Entity;
|
using iWareExcel.EXCEL.Service;
|
using System;
|
using System.Collections.Generic;
|
|
namespace iWareWms.View.EXCEL.WorkBook
|
{
|
public partial class ViewWorkSheet : PageBase
|
{
|
protected override Grid GetGrid()
|
{
|
return WorkSheetGrid;
|
}
|
|
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 workSheets = WorkSheetService.GetInstance().QueryByParam(new QueryParam
|
{
|
Search = new Dictionary<string, object> { { "Name", tbWorkSheetName.Text.Trim() } },
|
Filter=new Dictionary<string,object>(){{"WorkBookId",Request.QueryString["WorkBookId"]}},
|
PageIndex = pageIndex,
|
PageSize = pageSize
|
}, out msg, out totalNum, out currentPage);
|
|
var res = new List<object>();
|
|
workSheets.ForEach(x => res.Add(x));
|
|
return res;
|
}
|
|
protected override void Delete(int id, out string msg)
|
{
|
WorkSheetService.GetInstance().Delete(id, out msg);
|
}
|
|
protected override void Delete(List<int> ids, out string msg)
|
{
|
WorkSheetService.GetInstance().Delete(ids, out msg);
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
//判断删除复选框是否选择了至少一项纪录
|
ResolveDeleteButtonForGrid(Button3, WorkSheetGrid);
|
Button1.OnClientClick = Window1.GetShowReference("~/View/EXCEL/WorkBook/ViewWorkSheetDetail.aspx?WorkBookId="+Request .QueryString["WorkBookId"], "新增工作页");
|
Query(1);
|
}
|
}
|
|
}
|
}
|