private void LoadInformation(int _request) { if (intNumber == 1) // number = 1 (Enhancement) ; number = 2 (Issue) -- Vijay { lblView.Text = oCustomized.GetEnhancementBody(oCustomized.GetEnhancementID(intRequest), intEnvironment, true); DataSet dsReleases = oEnhancement.GetVersions(); foreach (DataRow drRelease in dsReleases.Tables[0].Rows) { string strName = DateTime.Parse(drRelease["release"].ToString()).ToShortDateString(); if (DateTime.Parse(drRelease["cutoff"].ToString()) < DateTime.Now) { strName += " (Closed)"; } else if (drRelease["available"].ToString() != "1") { strName += " (Full)"; } ddlRelease.Items.Add(new ListItem(strName, drRelease["id"].ToString())); } ddlRelease.Items.Insert(0, new ListItem("-- To Be Determined --", "0")); // Load data DataSet dsInfo = oCustomized.GetEnhancement(intRequest); if (dsInfo.Tables[0].Rows.Count > 0) { ddlRelease.SelectedValue = dsInfo.Tables[0].Rows[0]["release"].ToString(); radPriority.SelectedValue = dsInfo.Tables[0].Rows[0]["priority"].ToString(); } trPriority.Visible = true; trRelease.Visible = true; } else { lblView.Text = oCustomized.GetIssueBody(oCustomized.GetIssueID(intRequest), intEnvironment, true); } if (intProject > 0) { lblName.Text = oProject.Get(intProject, "name"); lblNumber.Text = oProject.Get(intProject, "number"); lblType.Text = "Project"; } else { lblName.Text = oResourceRequest.GetWorkflow(_request, "name"); lblNumber.Text = "CVT" + intRequest.ToString(); lblType.Text = "Task"; } if (Request.QueryString["div"] != null) { switch (Request.QueryString["div"]) { case "E": boolExecution = true; break; } } if (boolDetails == false && boolExecution == false) { boolDetails = true; } }
private void LoopRepeater() { panView.Visible = true; DataSet ds = oEnhancement.GetVersions(0); DataView dv = ds.Tables[0].DefaultView; if (Request.QueryString["sort"] != null) { dv.Sort = Request.QueryString["sort"].ToString(); } rptView.DataSource = dv; rptView.DataBind(); foreach (RepeaterItem ri in rptView.Items) { ImageButton oDelete = (ImageButton)ri.FindControl("btnDelete"); oDelete.Attributes.Add("onClick", "return confirm('Are you sure you want to delete this item?');"); ImageButton oEnable = (ImageButton)ri.FindControl("btnEnable"); if (oEnable.ImageUrl == "/admin/images/enabled.gif") { oEnable.ToolTip = "Click to disable"; oEnable.Attributes.Add("onClick", "return confirm('Are you sure you want to disable this item?');"); } else { oEnable.ToolTip = "Click to enable"; } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Response.Redirect("/admin/login.aspx"); } if (Request.QueryString["referrer"] != null && Request.QueryString["referrer"] != "") { strRedirect = Request.QueryString["referrer"]; } else if (Request.Cookies["loginreferrer"] != null && Request.Cookies["loginreferrer"].Value != "") { strRedirect = Request.Cookies["loginreferrer"].Value; } Enhancements oEnhancement = new Enhancements(0, dsn); DataSet ds = oEnhancement.GetVersions(1); foreach (DataRow dr in ds.Tables[0].Rows) { if (dr["compiled"].ToString() != "") { strPush += "<tr><td>" + dr["name"].ToString() + "</td><td>" + DateTime.Parse(dr["compiled"].ToString()).ToShortDateString() + "</td><td class=\"approved\">Success</td></tr>"; } } Tab oTab = new Tab("", 0, "divMenu1", false, true); oTab.AddTab("Functions", ""); oTab.AddTab("VMware", ""); oTab.AddTab("General", ""); oTab.AddTab("Asset", ""); oTab.AddTab("Proj / Req", ""); oTab.AddTab("Design", ""); oTab.AddTab("Forecast", ""); strMenuTab1 = oTab.GetTabs(); }