initProject
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
public partial class Depart :PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#region BindGrid
|
||||
private void BindGrid()
|
||||
{
|
||||
List<Model.Base_Depart> lists = BLL.DepartService.GetDepartListBySupCheckItem("0");
|
||||
|
||||
Grid1.DataSource = lists;
|
||||
Grid1.DataBind();
|
||||
|
||||
IniGrid(lists);
|
||||
}
|
||||
|
||||
private static void IniGrid(List<Base_Depart> lists)
|
||||
{
|
||||
DataTable table = new DataTable();
|
||||
DataColumn column1 = new DataColumn("DepartId", typeof(String));
|
||||
DataColumn column2 = new DataColumn("DepartCode", typeof(String));
|
||||
DataColumn column3 = new DataColumn("DepartName", typeof(String));
|
||||
DataColumn column4 = new DataColumn("Remark", typeof(String));
|
||||
DataColumn column5 = new DataColumn("SupCheckItem", typeof(String));
|
||||
table.Columns.Add(column1);
|
||||
table.Columns.Add(column2);
|
||||
table.Columns.Add(column3);
|
||||
table.Columns.Add(column4);
|
||||
table.Columns.Add(column5);
|
||||
|
||||
foreach (var item in lists)
|
||||
{
|
||||
List<Model.Base_Depart> departs = BLL.DepartService.GetDepartListBySupCheckItem(item.SupCheckItem);
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = departs[0];
|
||||
row[1] = departs[1];
|
||||
row[2] = departs[2];
|
||||
row[3] = departs[3];
|
||||
row[4] = departs[4];
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user