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() { WHClientBLL bll = null; DataPage dp = new DataPage(); WHClient condition = new WHClient(); try { bll = BLLFactory.CreateBLL <WHClientBLL>(); condition.ClientName = this.Description.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WHClient> list = dp.Result as List <WHClient>; 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; } }
private void BindData() { StockOverdueAlarmBLL bll = null; DataPage dp = new DataPage(); WHMatAmount condition = new WHMatAmount(); try { bll = BLLFactory.CreateBLL <StockOverdueAlarmBLL>(); condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WHMatAmount> list = dp.Result as List <WHMatAmount>; this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { StockLimitBLL bll = null; DataPage dp = new DataPage(); WHStockLimit condition = new WHStockLimit(); string whID = Request.QueryString["whID"]; try { bll = BLLFactory.CreateBLL <StockLimitBLL>(); this.hiWHID.Value = whID; condition.MatID = this.MatID.SelectedValue; condition.Warehouse = whID; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WHStockLimit> list = dp.Result as List <WHStockLimit>; 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[8].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { VDCameraBLL bll = null; DataPage dp = new DataPage(); VDCamera condition = new VDCamera(); string postionID = Request.QueryString["postionID"]; try { bll = BLLFactory.CreateBLL <VDCameraBLL>(); this.hiPostionID.Value = postionID; condition.PostionID = postionID; condition.CameraCode = this.CameraCode.Text; condition.CameraName = this.CameraName.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <VDCamera> list = dp.Result as List <VDCamera>; 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[5].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { DataPage dp = new DataPage(); ProducePlan condition = new ProducePlan(); ProducePlanBLL bll = null; try { bll = BLLFactory.CreateBLL <ProducePlanBLL>(); condition.FACTORYPID = this.FACTORYPID.SelectedValue; condition.PRID = this.PRID.SelectedValue; condition.PRODUCTIONID = this.PRODUCTIONID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <ProducePlan> list = dp.Result as List <ProducePlan>; 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]["PID"].ToString()); (this.GvList.Rows[i].Cells[7].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { SchedulingInfoBLL bll = null; DataPage dp = new DataPage(); SchedulingInfo condition = new SchedulingInfo(); try { bll = BLLFactory.CreateBLL <SchedulingInfoBLL>(); condition.FAID = this.FAID.Text; condition.PRID = this.PRID.Text; condition.WOID = this.WOID.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <SchedulingInfo> list = dp.Result as List <SchedulingInfo>; 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]["PID"].ToString()); (this.GvList.Rows[i].Cells[9].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { StockAccountBLL bll = null; DataPage dp = new DataPage(); WHMonthAccount condition = new WHMonthAccount(); string[] yearMonths = this.YearMonth.Text.Split("-".ToArray()); try { bll = BLLFactory.CreateBLL <StockAccountBLL>(); condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; condition.AccountYear = int.Parse(yearMonths[0]); condition.AccountMonth = int.Parse(yearMonths[1]); PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.QueryMonthAccount(condition, dp); List <WHMonthAccount> list = dp.Result as List <WHMonthAccount>; this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { InStockQueryBLL bll = null; DataPage dp = new DataPage(); InStockBill condition = new InStockBill(); try { bll = BLLFactory.CreateBLL <InStockQueryBLL>(); condition.StartDate = this.StartDate.Value; condition.EndDate = this.EndDate.Value; condition.Warehouse = this.WarehouseID.Value; condition.MatID = this.MatID.Value; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetInMatDetails(condition, dp); List <InStockQueryResult> list = dp.Result as List <InStockQueryResult>; foreach (InStockQueryResult detail in list) { detail.UnitName = string.IsNullOrEmpty(detail.UnitName) == false ? detail.UnitName : detail.MainUnitName; } this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { QualityCheckBLL bll = null; DataPage dp = new DataPage(); QualityCheckCondition condition = new QualityCheckCondition(); try { bll = BLLFactory.CreateBLL <QualityCheckBLL>(); condition.BillNO = this.BillNO.Text; condition.StartDate = this.StartDate.Text; condition.EndDate = this.EndDate.Text; condition.CheckResult = this.CheckResult.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WHQualityCheck> list = dp.Result as List <WHQualityCheck>; 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; } }
private void BindData() { WHMatBLL bll = null; DataPage dp = new DataPage(); WHMat condition = new WHMat(); try { bll = BLLFactory.CreateBLL <WHMatBLL>(); PagerHelper.InitPageControl(this.AspNetPager1, dp, true); condition.ID = this.hiMatID.Value; condition.IDCodeStatus = this.CodeStatus.SelectedValue; condition.SpecCode = this.MatSpec.SelectedValue; dp = bll.GetMatIDCodeList(condition, dp); List <MatIDCode> list = dp.Result as List <MatIDCode>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { Label lblBarCode = this.GvList.Rows[i].Cells[2].FindControl("lblBarCode") as Label; lblBarCode.Text = this.GvList.Rows[i].Cells[1].Text; } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { InspectStatisticsBLL bll = null; DataPage dp = new DataPage(); InspectResultEntity condition = new InspectResultEntity(); try { bll = BLLFactory.CreateBLL <InspectStatisticsBLL>(); 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; condition.ResultType = this.ResultType.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <InspectResultEntity> list = dp.Result as List <InspectResultEntity>; CommonDropdown resultTypeDropdown = new CommonDropdown(); List <DictInfo> resultTypeList = resultTypeDropdown.getInspectResultType(); foreach (InspectResultEntity ide in list) { foreach (DictInfo di in resultTypeList) { if (di.ID.Equals(ide.ResultType)) { ide.ResultType = di.Des; break; } } } 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; } }
private void BindData() { CheckStockBLL bll = null; DataPage dp = new DataPage(); CheckStockBill condition = new CheckStockBill(); try { bll = BLLFactory.CreateBLL <CheckStockBLL>(); condition.StartDate = this.StartDate.Text; condition.EndDate = this.EndDate.Text; condition.Warehouse = this.Warehouse.SelectedValue; condition.AreaID = this.AreaID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <CheckStockBill> list = dp.Result as List <CheckStockBill>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { this.GvList.Rows[i].Cells[6].Text = this.GvList.Rows[i].Cells[6].Text == "0" ? "未确认" : "已确认"; string click = string.Format("return edit('{0}');", this.GvList.DataKeys[i]["ID"].ToString()); LinkButton btEdit = (this.GvList.Rows[i].Cells[9].FindControl("lbtEdit") as LinkButton); if (this.GvList.Rows[i].Cells[6].Text == "已确认") { btEdit.Visible = false; } else { //绑定编辑功能 btEdit.Attributes.Add("onclick", click); } //绑定查看功能 (this.GvList.Rows[i].Cells[8].FindControl("lbtView") as LinkButton) .Attributes.Add("onclick", "return view('" + this.GvList.DataKeys[i]["ID"].ToString() + "');"); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { StockBLL bll = null; DataPage dp = new DataPage(); WHMatAmount condition = new WHMatAmount(); try { bll = BLLFactory.CreateBLL <StockBLL>(); condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; condition.IsDetail = this.CbxDetail.Checked; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); if (condition.IsDetail == false) { this.GvList.Columns[1].Visible = false; this.GvList.Columns[2].Visible = false; this.GvList.Columns[8].Visible = false; this.GvList.Columns[9].Visible = false; this.GvList.Columns[10].Visible = false; this.GvList.Columns[12].Visible = false; this.GvList.Columns[13].Visible = false; } else { this.GvList.Columns[1].Visible = true; this.GvList.Columns[2].Visible = true; this.GvList.Columns[8].Visible = true; this.GvList.Columns[9].Visible = true; this.GvList.Columns[10].Visible = true; this.GvList.Columns[12].Visible = true; this.GvList.Columns[13].Visible = true; } List <WHMatAmount> list = dp.Result as List <WHMatAmount>; this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { UserManageBLL bll = null; DataPage dp = new DataPage(); Manage.Entity.Sys.User condition = new Manage.Entity.Sys.User(); try { bll = BLLFactory.CreateBLL <UserManageBLL>(); condition.LoginUserID = this.LoginUserID.Text; condition.UserName = this.UserName.Text; condition.OrganID = this.OrganID.Value; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <Entity.Sys.User> list = dp.Result as List <Entity.Sys.User>; foreach (Entity.Sys.User user in list) { if (string.IsNullOrEmpty(user.OrganID) == false && user.OrganID == "root") { user.OrganDESC = ConfigurationManager.AppSettings["rootOrgan"]; } } 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]["UserID"].ToString()); (this.GvList.Rows[i].Cells[8].Controls[0] as WebControl).Attributes.Add("onclick", click); LinkButton btWHPowers = this.GvList.Rows[i].Cells[9].FindControl("btWHPowers") as LinkButton; btWHPowers.OnClientClick = "setWHPowers('" + this.GvList.DataKeys[i]["UserID"].ToString() + "');return false;"; } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { ProcessInfoBLL bll = null; DataPage dp = new DataPage(); Manage.Entity.MES.ProcessInfo condition = new Manage.Entity.MES.ProcessInfo(); string eID = Request.QueryString["eID"]; if (!string.IsNullOrEmpty(eID)) { if (eID.Split('|')[1] == "F") { condition.FACTORYPID = eID.Split('|')[0]; } else { condition.FLOWID = eID.Split('|')[0]; } } this.HiFLOWID.Value = condition.FLOWID; try { bll = BLLFactory.CreateBLL <ProcessInfoBLL>(); condition.PCODE = this.PCODE.Text; condition.PNAME = this.PNAME.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <Manage.Entity.MES.ProcessInfo> list = dp.Result as List <Manage.Entity.MES.ProcessInfo>; 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]["PID"].ToString()); (this.GvList.Rows[i].Cells[4].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { InspectDeviceBLL bll = null; DataPage dp = new DataPage(); InspectDeviceEntity condition = new InspectDeviceEntity(); try { bll = BLLFactory.CreateBLL <InspectDeviceBLL>(); condition.DeviceCode = this.DeviceCode.Text; condition.DeviceName = this.DeviceName.Text; condition.OrganID = this.OrganID.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <InspectDeviceEntity> list = dp.Result as List <InspectDeviceEntity>; CommonDropdown commonDropdown = new CommonDropdown(); List <DictInfo> typeList = commonDropdown.getInspectDeviceType(); foreach (InspectDeviceEntity ide in list) { var temp = typeList.Find(p => p.ID == ide.DeviceType); if (temp != null && temp.Des != null) { ide.DeviceTypeName = temp.Des; } } 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[14].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { UseMatBLL bll = null; DataPage dp = new DataPage(); UseMatBill condition = new UseMatBill(); try { bll = BLLFactory.CreateBLL <UseMatBLL>(); condition.BatchNumber = this.BatchNumber.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <UseMatBill> list = dp.Result as List <UseMatBill>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { string pid = null; if (this.GvList.DataKeys[i]["PID"] != null) { pid = this.GvList.DataKeys[i]["PID"].ToString(); string viewClick = string.Format("return view('{0}');", pid); (this.GvList.Rows[i].Cells[6].FindControl("LinkView") as LinkButton).Attributes.Add("onclick", viewClick); (this.GvList.Rows[i].Cells[6].FindControl("LinkView") as LinkButton).Text = "查看"; (this.GvList.Rows[i].Cells[7].FindControl("LinkBuild") as LinkButton).Visible = false; } else { (this.GvList.Rows[i].Cells[6].FindControl("LinkView") as LinkButton).Enabled = false; } } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { WorkStationBLL bll = null; DataPage dp = new DataPage(); WorkStation condition = new WorkStation(); string wsID = Request.QueryString["wsID"]; if (!string.IsNullOrEmpty(wsID)) { if (wsID.Split('|')[1] == "F") { condition.FACTORYPID = wsID.Split('|')[0]; } else { condition.PRODUCTLINEPID = wsID.Split('|')[0]; } } try { bll = BLLFactory.CreateBLL <WorkStationBLL>(); condition.WSCODE = this.WSCODE.Text; condition.WSNAME = this.WSNAME.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WorkStation> list = dp.Result as List <WorkStation>; 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]["PID"].ToString()); (this.GvList.Rows[i].Cells[8].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { WHMatSpecBLL bll = null; DataPage dp = new DataPage(); WHMatSpec condition = new WHMatSpec(); string matID = Request.QueryString["matID"]; try { bll = BLLFactory.CreateBLL <WHMatSpecBLL>(); this.MatID.Value = matID; WHMat mat = BLLFactory.CreateBLL <WHMatBLL>().Get(new WHMat { ID = matID }); this.MatCode.Text = mat.MatCode; this.MatName.Text = mat.MatName; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); condition.MatID = matID; dp = bll.GetList(condition, dp); List <WHMatSpec> list = dp.Result as List <WHMatSpec>; 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; } }
private void BindData() { OutStockBLL bll = null; DataPage dp = new DataPage(); OutStockBill condition = new OutStockBill(); try { bll = BLLFactory.CreateBLL <OutStockBLL>(); condition.StartDate = this.StartDate.Text; condition.EndDate = this.EndDate.Text; condition.OutStockMode = this.OutStockMode.SelectedValue; condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <OutStockBill> list = dp.Result as List <OutStockBill>; 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[10].Controls[0] as WebControl).Attributes.Add("onclick", click); //绑定查看功能 (this.GvList.Rows[i].Cells[11].FindControl("lbtView") as LinkButton).PostBackUrl = "ViewOutStockBill.aspx?id=" + this.GvList.DataKeys[i]["ID"].ToString(); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { WHMatBLL bll = null; DataPage dp = new DataPage(); WHMat condition = new WHMat(); try { bll = BLLFactory.CreateBLL <WHMatBLL>(); condition.MatName = this.Description.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <WHMat> list = dp.Result as List <WHMat>; 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[10].Controls[0] as WebControl).Attributes.Add("onclick", click); LinkButton lbtBuildCode = this.GvList.Rows[i].Cells[11].FindControl("lbtBuildCode") as LinkButton; lbtBuildCode.PostBackUrl = "BuildMatIDCode.aspx?matID=" + this.GvList.DataKeys[i]["ID"].ToString(); LinkButton lbtSetSpec = this.GvList.Rows[i].Cells[12].FindControl("lbtSetSpec") as LinkButton; lbtSetSpec.PostBackUrl = "ManageMatSpec.aspx?matID=" + this.GvList.DataKeys[i]["ID"].ToString(); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { StockWarningBLL bll = null; DataPage dp = new DataPage(); WHMatAmount condition = new WHMatAmount(); try { bll = BLLFactory.CreateBLL <StockWarningBLL>(); condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <StockWarningResult> list = dp.Result as List <StockWarningResult>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { if (this.GvList.DataKeys[i]["WarningMode"].ToString() == "1") { this.GvList.Rows[i].BackColor = System.Drawing.Color.Red; } else { this.GvList.Rows[i].BackColor = System.Drawing.Color.Yellow; } } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { QualityTraceQueryBLL bll = null; DataPage dp = new DataPage(); QualityTraceCondition condition = new QualityTraceCondition(); try { bll = BLLFactory.CreateBLL <QualityTraceQueryBLL>(); condition.StartDate = this.StartDate.Text; condition.EndDate = this.EndDate.Text; condition.Factory = this.Factory.SelectedValue; condition.ProductLine = this.ProductLine.SelectedValue; condition.Product = this.Product.SelectedValue; condition.ProductBatchNumber = this.ProductBatchNumber.Text; condition.MatIDCode = this.MatIDCode.Text; condition.ProductIDCode = this.ProductIDCode.Text; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <QualityTraceInfo> list = dp.Result as List <QualityTraceInfo>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { LinkButton lbtQualityTrace = this.GvList.Rows[i].Cells[7].FindControl("lbtQualityTrace") as LinkButton; lbtQualityTrace.OnClientClick = "viewTraceDetail('" + this.GvList.DataKeys[i]["PID"].ToString() + "');return false;"; } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
private void BindData() { OutStockQueryBLL bll = null; DataPage dp = new DataPage(); OutStockBill condition = new OutStockBill(); try { bll = BLLFactory.CreateBLL <OutStockQueryBLL>(); condition.StartDate = this.StartDate.Text; condition.EndDate = this.EndDate.Text; condition.OutStockMode = this.OutStockMode.SelectedValue; condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <InStockQueryResult> list = dp.Result as List <InStockQueryResult>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { //绑定查看功能 LinkButton lbtView = this.GvList.Rows[i].Cells[7].FindControl("lbtView") as LinkButton; lbtView.OnClientClick = string.Format("view('{0}','{1}','{2}','{3}');return false;" , this.GvList.DataKeys[i]["WarehouseID"].ToString(), this.GvList.DataKeys[i]["MatID"].ToString() , this.StartDate.Text, this.EndDate.Text); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
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; } }