private void BindData() { string DeviceCodeLink = Request.QueryString["DeviceCodeLink"]; this.DeviceName.Text = DeviceCodeLink; InspectDataBLL bll = null; DataPage dp = new DataPage(); InspectDataEntity condition = new InspectDataEntity(); condition.DeviceCode = this.DeviceName.Text; condition.StartTime = this.StartTime.Text; condition.EndTime = this.EndTime.Text; try { bll = BLLFactory.CreateBLL <InspectDataBLL>(); PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <InspectDataEntity> list = dp.Result as List <InspectDataEntity>; this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { InspectDataBLL bll = null; DataPage dp = new DataPage(); InspectDataEntity condition = Session["InspectDataCondition"] as InspectDataEntity; bll = BLLFactory.CreateBLL <InspectDataBLL>(); dp.PageIndex = 1; dp.PageSize = 100; dp = bll.GetList(condition, dp); List <InspectDataEntity> list = dp.Result as List <InspectDataEntity>; this.hiInspectData.Value = LAF.Common.Serialization.JsonConvertHelper.GetSerializes(list); }
private void BindData() { InspectDataBLL bll = null; DataPage dp = new DataPage(); InspectDataEntity condition = new InspectDataEntity(); try { bll = BLLFactory.CreateBLL <InspectDataBLL>(); condition.ItemCode = this.ItemCode.Text; condition.DeviceCode = this.DeviceCode.Text; condition.StartTime = this.StartTime.Text; condition.EndTime = this.EndTime.Text; condition.OrganID = this.OrganID.Text; condition.DeviceType = this.DeviceType.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <InspectDataEntity> list = dp.Result as List <InspectDataEntity>; this.GvList.DataSource = list; this.GvList.DataBind(); //for (int i = 0; i < this.GvList.Rows.Count; i++) //{ // string click = string.Format("return edit('{0}');", this.GvList.DataKeys[i]["Id"].ToString()); // (this.GvList.Rows[i].Cells[6].Controls[0] as WebControl).Attributes.Add("onclick", click); //} PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }