using FineUIPro;
|
using FineUIPro.iWareWms;
|
using iWareCommon.Common.Entity;
|
using iWareCommon.Common.EnumType;
|
using iWareExcel.EXCEL.Service;
|
using System;
|
using System.Collections.Generic;
|
|
|
namespace iWareWms.View.EXCEL.WorkBook
|
{
|
public partial class WorkBook : PageBase
|
{
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
//判断删除复选框是否选择了至少一项纪录
|
ResolveDeleteButtonForGrid(Button3, GetGrid());
|
Button1.OnClientClick = Window1.GetShowReference("~/View/EXCEL/WorkBook/WorkBookDetail.aspx", "新增工作簿");
|
|
|
|
Query(1);
|
}
|
}
|
|
protected override Grid GetGrid()
|
{
|
return WorkBookGrid;
|
}
|
|
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 workbooks = WorkBookService.GetInstance().QueryByParam(new QueryParam
|
{
|
Search = new Dictionary<string, object> { { "Name", tbName.Text.Trim() }},
|
PageIndex = pageIndex,
|
PageSize = pageSize
|
}, out msg, out totalNum, out currentPage);
|
var res = new List<object>();
|
workbooks.ForEach(x => res.Add(x));
|
return res;
|
}
|
|
protected override void Delete(int id, out string msg)
|
{
|
WorkBookService.GetInstance().Delete(id, out msg);
|
}
|
|
protected override void Delete(List<int> ids, out string msg)
|
{
|
WorkBookService.GetInstance().Delete(ids, out msg);
|
}
|
|
|
/// <summary>
|
/// 获取验证类型
|
/// </summary>
|
/// <param name="type"></param>
|
/// <returns></returns>
|
protected string GetNeedTemplate(object label)
|
{
|
return ((EYesOrNo)Convert.ToInt32(label)).ToString();
|
}
|
}
|
}
|