protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oProjectRequest = new ProjectRequest(intProfile, dsn); oApprove = new ProjectRequest_Approval(intProfile, dsn, intEnvironment); oPage = new Pages(intProfile, dsn); oAppPage = new AppPages(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oUser = new Users(intProfile, dsn); if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } strRedirect = oPage.GetFullLink(intWorkflowPage); lblTitle.Text = oPage.Get(intPage, "title"); oPage.LoadPaging(oApprove.GetAwaiting(intProfile), Request, intPage, lblPage, lblSort, lblTopPaging, lblBottomPaging, txtPage, lblPages, lblRecords, rptView, lblNone); }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/projects_approve.aspx"; Response.Cookies["loginreferrer"].Expires = DateTime.Now.AddDays(30); if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Response.Redirect("/admin/login.aspx"); } oProject = new Projects(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oProjectRequest = new ProjectRequest(intProfile, dsn); oApprove = new ProjectRequest_Approval(intProfile, dsn, intEnvironment); oUser = new Users(intProfile, dsn); oOrganization = new Organizations(intProfile, dsn); if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "") { panView.Visible = true; intRequest = Int32.Parse(Request.QueryString["rid"]); if (!IsPostBack) { for (int ii = 1; ii <= 4; ii++) { string strName = "Manager"; if (ii == 2) { strName = "Platform"; } else if (ii == 3) { strName = "Board"; } else if (ii == 4) { strName = "Director"; } TreeNode oParent = new TreeNode(); oParent.Text = strName; oParent.Value = ii.ToString(); oParent.ToolTip = strName; oParent.ImageUrl = "/images/folder.gif"; oParent.SelectAction = TreeNodeSelectAction.Expand; oTreeview.Nodes.Add(oParent); DataSet ds = oApprove.GetAwaitingRequest(intRequest, ii); foreach (DataRow dr in ds.Tables[0].Rows) { TreeNode oNode = new TreeNode(); oNode.Text = dr["username"].ToString(); oNode.Value = dr["userid"].ToString(); oNode.ToolTip = dr["username"].ToString(); oNode.ShowCheckBox = true; oNode.SelectAction = TreeNodeSelectAction.None; oParent.ChildNodes.Add(oNode); } } } } else { panAll.Visible = true; rptView.DataSource = oApprove.GetAwaiting(); rptView.DataBind(); } btnApprove.Attributes.Add("onclick", "return confirm('Are you sure you want to continue?');"); btnReject.Attributes.Add("onclick", "return confirm('Are you sure you want to continue?');"); btnFuture.Attributes.Add("onclick", "return confirm('Are you sure you want to continue?');"); }