protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int productionID = 0; if (Request.QueryString["ProductionID"] != null) { productionID = Utils.StringToInt(Request.QueryString["ProductionID"]); if (productionID > 0) { HiddenProductionID.Value = productionID.ToString(); } } DataProviders.DBaccess db = new DataProviders.DBaccess(); List <Models.Page> pages = new List <Models.Page>(); string prodName = ""; db.GetProductionName(productionID, ref prodName, out string errmsg); db.GetPagesForProduction(productionID, ref pages, out errmsg); lblProduct.Text = $"Check {pages.Count} pages for {prodName}"; foreach (Models.Page page in pages) { page.VirtualImagePath = "Application.png"; page.PageName = string.Format("{0}-{1} ({2})", page.Section, page.PageName, page.FileName); if (page.Status < 10) { page.VirtualImagePath = "Warning.png"; page.PageName += " (missing)"; } } RadListBoxPages.DataSource = pages; RadListBoxPages.DataTextField = "PageName"; RadListBoxPages.DataValueField = "VirtualImagePath"; RadListBoxPages.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int productionID = 0; if (Request.QueryString["ProductionID"] != null) { productionID = Utils.StringToInt(Request.QueryString["ProductionID"]); if (productionID > 0) { HiddenProductionID.Value = productionID.ToString(); } } DataProviders.DBaccess db = new DataProviders.DBaccess(); string prodName = ""; db.GetProductionName(productionID, ref prodName, out string errmsg); this.Title = prodName; } }