protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // 1.获取数据总数 流程状态.Text = "待审核"; string str = "ZCZY"; 单据编号.Text = SchoolUtility.strbumber(str); OffSession(); 申请人.Text = HttpContext.Current.Session["姓名"].ToString(); Button9.Enabled = false; Button3.Enabled = false; 二级.Enabled = false; 级.Enabled = false; 负责人.Enabled = false; 房间.Enabled = false; // 2.获取当前分页数据 //DataTable table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);//查询方法 DataSet ds = bll.首页_X_资产转移流程表("流程状态-全部"); DataTable dt = ds.Tables[0].Copy();//复制一份table DataTable source = dt; // 3.绑定到Grid Grid1.DataSource = dt;//DataTable Grid1.DataBind(); List <School一级部门表> gsbm = bll.byzc(); 归属部门变更为.DataTextField = "名称"; 归属部门变更为.DataValueField = "ID"; 归属部门变更为.DataSource = gsbm; 归属部门变更为.DataBind(); List <School房间信息表> cfdd = bll.cfdd(); 存放地点变更为.DataTextField = "名称"; 存放地点变更为.DataValueField = "ID"; 存放地点变更为.DataSource = cfdd; 存放地点变更为.DataBind(); } }
protected void TabStrip2_TabIndexChanged(object sender, EventArgs e) { if (TabStrip2.ActiveTabIndex == 0) { } else if (TabStrip2.ActiveTabIndex == 1) { //查询 拍照补录 // 1.获取数据总数 // Grid3.RecordCount = 700;//测试,去数据库获取总数 // 2.获取当前分页数据 DataSet ds = bll.拍照补录查询(""); DataTable dt = ds.Tables[0].Copy();//复制一份table DataTable source = dt; // 3.绑定到Grid Grid3.DataSource = source;//DataTable Grid3.DataBind(); } else if (TabStrip2.ActiveTabIndex == 2) { DataSet dspk = bll.盘亏处理查询(""); DataTable dtpk = dspk.Tables[0].Copy(); //复制一份table Grid4.DataSource = dtpk; //DataTable Grid4.DataBind(); } else if (TabStrip2.ActiveTabIndex == 3) { //Grid5 Grid5.DataSource = bll.查询盘点报告();//DataTable Grid5.DataBind(); //绑定条件数据 List <School学校名称表> xxmc = bll.查询学校名称(); 单位.DataTextField = "学校名称"; 单位.DataValueField = "ID"; 单位.DataSource = xxmc; 单位.DataBind(); School资产转移BLL bllzy = new School资产转移BLL(); List <School一级部门表> gsbm = bllzy.byzc(); 部门.DataTextField = "名称"; 部门.DataValueField = "ID"; 部门.DataSource = gsbm; 部门.DataBind(); List <School一级类别表> yjlb = bll.查询一级类别(); 一级.DataTextField = "名称"; 一级.DataValueField = "ID"; 一级.DataSource = yjlb; 一级.DataBind(); List <School建筑物信息表> 查询建筑物 = bll.查询建筑物信息表(); 存放地点.DataTextField = "名称"; 存放地点.DataValueField = "ID"; 存放地点.DataSource = 查询建筑物; 存放地点.DataBind(); } }