Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
            oPage            = new Pages(intProfile, dsn);
            oResourceRequest = new ResourceRequest(intProfile, dsn);
            oCustomized      = new Customized(intProfile, dsn);
            oVariable        = new Variables(intEnvironment);
            oStatusLevel     = new StatusLevels(intProfile, dsn);
            if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "")
            {
                intPage = Int32.Parse(Request.QueryString["pageid"]);
            }
            strRedirect   = oPage.GetFullLinkRelated(intPage);
            lblTitle.Text = oPage.Get(intPage, "title");
            lblPage.Text  = "1";
            lblSort.Text  = "";

            if (Request.QueryString["page"] != null && Request.QueryString["page"] != "")
            {
                lblPage.Text = Request.QueryString["page"];
            }
            if (Request.QueryString["sort"] != null && Request.QueryString["sort"] != "")
            {
                lblSort.Text = Request.QueryString["sort"];
            }
            lblTopPaging.Text = "";

            LoadDefaultValues();
            LoadPaging(Int32.Parse(lblPage.Text), lblSort.Text);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile      = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustomized     = new Customized(intProfile, dsn);
            oPage           = new Pages(intProfile, dsn);
            oServiceRequest = new ServiceRequests(intProfile, dsn);
            oRequest        = new Requests(intProfile, dsn);
            if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "")
            {
                intRequest = Int32.Parse(Request.QueryString["rid"]);
            }

            ds = oCustomized.GetIssue(intRequest);

            if (!IsPostBack)
            {
                drpModules.DataSource     = oPage.Gets(0, 1);
                drpModules.DataTextField  = "title";
                drpModules.DataValueField = "pageid";
                drpModules.DataBind();
                drpModules.SelectedValue = ds.Tables[0].Rows[0]["pageid"].ToString();

                txtTitle.Text       = ds.Tables[0].Rows[0]["title"].ToString();
                txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString();
                txtNumUsers.Text    = ds.Tables[0].Rows[0]["num_users"].ToString();
                txtURL.Text         = ds.Tables[0].Rows[0]["url"].ToString();
                lblPath.Text        = ds.Tables[0].Rows[0]["path"].ToString();
            }
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Response.Cookies["loginreferrer"].Value   = "/admin/segments.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");
     }
     oCustomized = new Customized(intProfile, dsn);
     oPage       = new Pages(intProfile, dsn);
     oUser       = new Users(intProfile, dsn);
     if (!IsPostBack)
     {
         LoadLists();
         LoopRepeater();
         btnUpload.Attributes.Add("onclick", "return OpenWindow('FILEBROWSER','" + txtDocUpload.ClientID + "','',false,400,600);");
         btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnId.ClientID + "','" + hdnOrder.ClientID + "&type=USER_GUIDE" + "',false,400,400);");
         btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this userguide?');");
         btnCancel.Attributes.Add("onclick", "return Cancel();");
     }
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile   = Int32.Parse(Request.Cookies["profileid"].Value);
            oPage        = new Pages(intProfile, dsn);
            oUser        = new Users(intProfile, dsn);
            oCustomized  = new Customized(intProfile, dsn);
            oApplication = new Applications(intProfile, dsn);

            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            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.GetFullLinkRelated(intPage);
            lblTitle.Text = oPage.Get(intPage, "title");
            oPage.LoadPaging(oCustomized.GetCostAvoidanceAll(intApplication), Request, intPage, lblPage, lblSort, lblTopPaging, lblBottomPaging, txtPage, lblPages, lblRecords, rptView, lblNone);
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile      = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustomized     = new Customized(intProfile, dsn);
            oPage           = new Pages(intProfile, dsn);
            oServiceRequest = new ServiceRequests(intProfile, dsn);
            oRequest        = new Requests(intProfile, dsn);
            if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "")
            {
                intRequest = Int32.Parse(Request.QueryString["rid"]);
            }

            ds = oCustomized.GetEnhancement(intRequest);

            if (!IsPostBack)
            {
                drpModules.DataSource     = oPage.Gets(0, 1);
                drpModules.DataTextField  = "title";
                drpModules.DataValueField = "pageid";
                drpModules.DataBind();
                drpModules.SelectedValue = ds.Tables[0].Rows[0]["pageid"].ToString();

                txtTitle.Text       = ds.Tables[0].Rows[0]["title"].ToString();
                txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString();
                txtNumUsers.Text    = ds.Tables[0].Rows[0]["num_users"].ToString();
                txtURL.Text         = ds.Tables[0].Rows[0]["url"].ToString();
                lblPath.Text        = ds.Tables[0].Rows[0]["path"].ToString();
                txtStartDate.Text   = DateTime.Parse(ds.Tables[0].Rows[0]["startdate"].ToString()).ToShortDateString();
                txtEndDate.Text     = DateTime.Parse(ds.Tables[0].Rows[0]["enddate"].ToString()).ToShortDateString();
            }

            imgStartDate.Attributes.Add("onclick", "return OpenCalendar('" + txtStartDate.ClientID + "');");
            imgEndDate.Attributes.Add("onclick", "return OpenCalendar('" + txtEndDate.ClientID + "');");
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile      = Int32.Parse(Request.Cookies["profileid"].Value);
            oPage           = new Pages(intProfile, dsn);
            oRequestItem    = new RequestItems(intProfile, dsn);
            oServiceRequest = new ServiceRequests(intProfile, dsn);
            oApplication    = new Applications(intProfile, dsn);
            oServiceEditor  = new ServiceEditor(intProfile, dsnServiceEditor);
            oCustomized     = new Customized(intProfile, dsn);
            oRequest        = new Requests(intProfile, dsn);
            oProject        = new Projects(intProfile, dsn);
            oService        = new Services(intProfile, dsn);
            oFunction       = new Functions(intProfile, dsn, intEnvironment);
            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            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);
            }

            if (Request.QueryString["returned"] != null)
            {
                boolReqReturned = true;
            }
            if (Request.QueryString["denied"] != null)
            {
                boolReqDenied = true;
            }

            if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
            {
                LoadValues();
                if (!IsPostBack)
                {
                    LoadRequest();
                }
                radExpediteYes.Attributes.Add("onclick", "Expedite(this, '" + radExpediteNo.ClientID + "');");
                // Custom Loads
                int    intItem        = Int32.Parse(lblItem.Text);
                int    intApp         = oRequestItem.GetItemApplication(intItem);
                string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
                if (strDeliverable != "")
                {
                    btnDeliverable.Visible = true;
                    btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
                }
                btnDocuments.Attributes.Add("onclick", "return OpenWindow('DOCUMENTS_SECURE','?rid=" + Request.QueryString["rid"] + "');");
            }
            btnBack.Attributes.Add("onclick", "return confirm('WARNING: Any unsaved changes will be lost.\\n\\nAre you sure you want to continue?') && ProcessButton(this) && LoadWait();");
            btnCancel.Attributes.Add("onclick", "return confirm('WARNING: Any unsaved changes will be lost.\\n\\nAre you sure you want to continue?') && ProcessButton(this) && LoadWait();");
            btnCancelR.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?') && ProcessButton(this) && LoadWait();");
        }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile    = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage         = new Pages(intProfile, dsn);
     oRequestItem  = new RequestItems(intProfile, dsn);
     oRequest      = new Requests(intProfile, dsn);
     oApplication  = new Applications(intProfile, dsn);
     oVariable     = new Variables(intEnvironment);
     oRequestField = new RequestFields(intProfile, dsn);
     oService      = new Services(intProfile, dsn);
     oCustomized   = new Customized(intProfile, dsn);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "")
     {
         if (!IsPostBack)
         {
             LoadLists();
         }
         if (Request.QueryString["q"] != null && Request.QueryString["q"] != "")
         {
             txtServer.Text = Request.QueryString["q"];
         }
         LoadValues();
         btnNext.Attributes.Add("onclick", "return ValidateText('" + txtServer.ClientID + "','Please enter a server name')" +
                                " && ValidateRadioButtons('" + radPhysical.ClientID + "','" + radVirtual.ClientID + "','Please select the destination server type for this retrieval')" +
                                " && (document.getElementById('" + radPhysical.ClientID + "').checked == false || (document.getElementById('" + radPhysical.ClientID + "').checked == true && ValidateDropDown('" + ddlModel.ClientID + "','Please select the preferred server model')))" +
                                " && ValidateText('" + txtCode.ClientID + "','Please enter an application code')" +
                                " && ValidateDropDown('" + ddlClass.ClientID + "','Please select a class')" +
                                " && ValidateDate('" + txtDate.ClientID + "','Please enter a valid date of completion')" +
                                " && ValidateCheck('" + chkAgreement.ClientID + "','Please check that you have read and agreed to the disclaimer')" +
                                ";");
         radPhysical.Attributes.Add("onclick", "ShowHideDiv('" + divPhysical.ClientID + "','inline');");
         radVirtual.Attributes.Add("onclick", "ShowHideDiv('" + divPhysical.ClientID + "','none');");
         imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');");
         btnSearch.Attributes.Add("onclick", "return ShowTextInfo('" + txtServer.ClientID + "','ARCHIVED_SEARCH');");
         txtServer.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnSearch.ClientID + "').click();return false;}} else {return true}; ");
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustom    = new Customized(intProfile, dsn);
            oUser      = new Users(intProfile, dsn);
            oPage      = new Pages(intProfile, dsn);

            lblModified.Text = oUser.GetFullNameAD(intProfile, intEnvironment);
            lblUpdated.Text  = DateTime.Now.ToString();

            if (Request.QueryString["save"] != null)
            {
                Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">window.top.refreshIE();<" + "/" + "script>");
            }
            if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
            {
                intRequest = Int32.Parse(Request.QueryString["rid"]);
            }
            if (Request.QueryString["iid"] != "" && Request.QueryString["iid"] != null)
            {
                intItem = Int32.Parse(Request.QueryString["iid"]);
            }
            if (Request.QueryString["num"] != "" && Request.QueryString["num"] != null)
            {
                intNumber = Int32.Parse(Request.QueryString["num"]);
            }
            if (Request.QueryString["id"] != "" && Request.QueryString["id"] != null)
            {
                intId = Int32.Parse(Request.QueryString["id"]);
            }

            if (!IsPostBack)
            {
                drpAssetType.DataSource     = oCustom.GetIDCAssetTypes(1);
                drpAssetType.DataTextField  = "name";
                drpAssetType.DataValueField = "id";
                drpAssetType.DataBind();
                drpAssetType.Items.Insert(0, "-- SELECT --");
                if (intId > 0)
                {
                    btnUpdate.Visible           = true;
                    btnAdd.Visible              = false;
                    dsAsset                     = oCustom.GetTechAsset(intId);
                    drpAssetType.SelectedValue  = dsAsset.Tables[0].Rows[0]["asset_typeid"].ToString();
                    drpSaleStatus.SelectedValue = dsAsset.Tables[0].Rows[0]["salestatus"].ToString();
                    lblModified.Text            = dsAsset.Tables[0].Rows[0]["lastmodified"].ToString();
                    lblUpdated.Text             = dsAsset.Tables[0].Rows[0]["modified"].ToString();
                }
            }
            btnAdd.Attributes.Add("onclick", "return ValidateDropDown('" + drpAssetType.ClientID + "','Please make a selection for Asset Type')" +
                                  "&& ValidateDropDown('" + drpSaleStatus.ClientID + "','Please make a selection for Sale Status')" +
                                  ";");
            btnUpdate.Attributes.Add("onclick", "return ValidateDropDown('" + drpAssetType.ClientID + "','Please make a selection for Asset Type')" +
                                     "&& ValidateDropDown('" + drpSaleStatus.ClientID + "','Please make a selection for Sale Status')" +
                                     ";");
        }
Ejemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     oServiceRequest  = new ServiceRequests(intProfile, dsn);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         // Custom Loads
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
     }
     ddlCluster.Attributes.Add("onchange", "ResetDiv(null);SwapDivDDL(this,null,'" + divClusterYesGroup.ClientID + "','" + divClusterNo.ClientID + "',null);");
     ddlClusterYesSQLGroup.Attributes.Add("onchange", "SwapDivDDL(this,'" + divClusterYesGroupNew.ClientID + "',null,'" + divClusterYesGroupExisting.ClientID + "',null);");
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
     btnNext.Attributes.Add("onclick", "return ValidateText('" + txtServerName.ClientID + "','Please enter the server name')" +
                            " && ValidateDropDown('" + ddlOS.ClientID + "','Please select the operating system')" +
                            " && ValidateDropDown('" + ddlMaintenance.ClientID + "','Please select the maintenance window')" +
                            " && ValidateDropDown('" + ddlCurrent.ClientID + "','Please select if the server currently has SAN')" +
                            " && ValidateDropDown('" + ddlType.ClientID + "','Please select the server type')" +
                            " && ValidateDropDown('" + ddlDR.ClientID + "','Please select the DR options')" +
                            " && ValidateDropDown('" + ddlPerformance.ClientID + "','Please select the performance type')" +
                            " && ValidateDropDown('" + ddlChange.ClientID + "','Please select if you have scheduled a change')" +
                            " && ValidateDropDown('" + ddlCluster.ClientID + "','Please select if the server is part of a cluster')" +
                            " && EnsureStorage3rd('" + ddlCluster.ClientID + "','" + ddlClusterYesSQLGroup.ClientID + "','" + txtClusterYesGroupExisting.ClientID + "','" + ddlClusterYesGroupExisting.ClientID + "','" + txtClusterYesGroupExistingFileSystem.ClientID + "','" + chkClusterYesGroupNewNetwork.ClientID + "','" + txtClusterYesGroupNewNetwork.ClientID + "','" + chkClusterYesGroupNewIP.ClientID + "','" + txtClusterYesGroupNewIP.ClientID + "','" + ddlClusterNo.ClientID + "','" + txtClusterNo.ClientID + "')" +
                            " && ValidateNumber0('" + txtAdditional.ClientID + "','Please enter the amount of ADDITIONAL storage to be added')" +
                            " && ValidateText('" + txtDescription.ClientID + "','Please enter a description of the work to be performed')" +
                            ";");
     imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');");
 }
Ejemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oServiceRequest  = new ServiceRequests(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oUser            = new Users(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oResourceRequest = new ResourceRequest(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         LoadRequest();
         btnNext.Attributes.Add("onclick", "return ValidateHidden('" + hdnExecutive.ClientID + "','" + txtExecutive.ClientID + "','Please enter the LAN ID of your executive sponsor')" +
                                " && ValidateHidden('" + hdnWorking.ClientID + "','" + txtWorking.ClientID + "','Please enter the LAN ID of your working sponsor')" +
                                " && ValidateText('" + txtStatement.ClientID + "','Please enter a statement of work')" +
                                " && ValidateDate('" + txtStart.ClientID + "','Please enter a valid estimated start date')" +
                                " && ValidateDate('" + txtEnd.ClientID + "','Please enter a valid estimated end date')" +
                                " && ValidateDates('" + txtStart.ClientID + "','" + txtEnd.ClientID + "','The estimated start date must occur before the estimated end date')" +
                                ";");
         txtExecutive.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divExecutive.ClientID + "','" + lstExecutive.ClientID + "','" + hdnExecutive.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstExecutive.Attributes.Add("ondblclick", "AJAXClickRow();");
         txtWorking.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divWorking.ClientID + "','" + lstWorking.ClientID + "','" + hdnWorking.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstWorking.Attributes.Add("ondblclick", "AJAXClickRow();");
         imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
         imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");
         // Custom Loads
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to cancel this service request?');");
 }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oServiceRequest  = new ServiceRequests(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oUser            = new Users(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oResourceRequest = new ResourceRequest(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         LoadRequest();
         imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
         imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");
         // Custom Loads
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
         int intWorkingDays = oApplication.GetLead(intApp, 3);
         if (intWorkingDays > 0)
         {
             oApplication.AssignPriority(intApp, radPriority, lblDeliverable.ClientID, txtEnd.ClientID, hdnEnd.ClientID);
             lblDeliverable.Text = intWorkingDays.ToString();
             txtEnd.Text         = DateTime.Today.AddDays(intWorkingDays).ToShortDateString();
             hdnEnd.Value        = DateTime.Today.AddDays(intWorkingDays).ToShortDateString();
         }
         btnDocuments.Attributes.Add("onclick", "return OpenWindow('DOCUMENTS_SECURE','?rid=" + Request.QueryString["rid"] + "');");
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         txtWorking.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divWorking.ClientID + "','" + lstWorking.ClientID + "','" + hdnWorking.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstWorking.Attributes.Add("ondblclick", "AJAXClickRow();");
         imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
         imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");
         // Custom Loads
         int intItem = Int32.Parse(lblItem.Text);
         int intApp  = oRequestItem.GetItemApplication(intItem);
         LoadRequest(intApp);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
         oApplication.AssignPriority(intApp, radPriority, lblDeliverable.ClientID, txtEnd.ClientID, hdnEnd.ClientID);
         int intWorking = oApplication.GetLead(intApp, 3);
         lblDeliverable.Text = intWorking.ToString();
         txtEnd.Text         = DateTime.Today.AddDays(intWorking).ToShortDateString();
         hdnEnd.Value        = DateTime.Today.AddDays(intWorking).ToShortDateString();
         btnClose.Attributes.Add("onclick", "return CloseWindow();");
         btnBack2.Attributes.Add("onclick", "ShowHideDiv('" + divShow.ClientID + "','inline');ShowHideDiv('" + divHide.ClientID + "','none');return false;");
         btnDocuments.Attributes.Add("onclick", "return OpenWindow('DOCUMENTS_SECURE','?rid=" + Request.QueryString["rid"] + "');");
         imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');");
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile  = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustomized = new Customized(intProfile, dsn);
            oPage       = new Pages(intProfile, dsn);
            if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "")
            {
                intPage = Int32.Parse(Request.QueryString["pageid"]);
            }

            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                intId = Int32.Parse(Request.QueryString["id"]);
            }

            if (!IsPostBack)
            {
                drpCategory.DataSource     = oCustomized.GetCategories(0);
                drpCategory.DataTextField  = "name";
                drpCategory.DataValueField = "id";
                drpCategory.DataBind();
                drpCategory.Items.Insert(0, new ListItem("--SELECT--"));

                drpItem.DataSource     = oCustomized.GetItems(0);
                drpItem.DataTextField  = "name";
                drpItem.DataValueField = "id";
                drpItem.DataBind();
                drpItem.Items.Insert(0, new ListItem("--SELECT--"));

                rptView.DataSource = oCustomized.GetCategoryList(intId);
                rptView.DataBind();
            }

            foreach (RepeaterItem ri in rptView.Items)
            {
                LinkButton oEdit   = (LinkButton)ri.FindControl("btnEdit");
                Panel      panEdit = (Panel)ri.FindControl("panEdit");
                panEdit.Visible = true;
                LinkButton oDelete = (LinkButton)ri.FindControl("btnDelete");
                oDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item ?');");
            }


            lblNone.Visible = rptView.Items.Count == 0;
            drpItem.Attributes.Add("onchange", "AjaxGetItemAmount('" + drpItem.ClientID + "','" + lblAmt.ClientID + "','');");
            btnAdd.Attributes.Add("onclick", "return ValidateDropDown('" + drpCategory.ClientID + "','Please select a category')" +
                                  " && ValidateDropDown('" + drpItem.ClientID + "','Please select an item')" +
                                  ";");
            //btnUpdate.Attributes.Add("onclick", "return ValidateDropDown('" + drpCategory.ClientID + "','Please select a category')" +
            //            " && ValidateDropDown('" + drpItem.ClientID + "','Please select an item')" +
            //            ";");
        }
Ejemplo n.º 14
0
        protected void btnComplete_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (panNoSlider.Visible == true)
            {
                double dblAllocated = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated"));
                oResourceRequest.UpdateWorkflowHoursOverwrite(intResourceWorkflow, dblAllocated);
            }
            // Add a green / completed status if there are no updates, OR the last status is not green
            DataSet dsStatus = oResourceRequest.GetStatuss(intResourceWorkflow);

            if (dsStatus.Tables[0].Rows.Count == 0 || dsStatus.Tables[0].Rows[0]["status"].ToString() != "3")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, 3, "Completed", intProfile);
            }

            int     intAnswer = 0;
            int     intModel  = 0;
            DataSet ds        = oOnDemandTasks.GetServerOther(intRequest, intService, intNumber);

            if (ds.Tables[0].Rows.Count > 0)
            {
                intAnswer = Int32.Parse(ds.Tables[0].Rows[0]["answerid"].ToString());
                intModel  = Int32.Parse(ds.Tables[0].Rows[0]["modelid"].ToString());
            }
            else if (intService == intServiceDNS)
            {
                Customized oCustomized = new Customized(0, dsn);
                ds = oCustomized.GetPNCDNSConflict(intRequest, intItem, intNumber);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    intAnswer = Int32.Parse(ds.Tables[0].Rows[0]["answerid"].ToString());
                    intModel  = oForecast.GetModelAsset(intAnswer);
                    if (intModel == 0)
                    {
                        intModel = oForecast.GetModel(intAnswer);
                    }
                    oCustomized.UpdatePNCDNSConflict(intRequest, intItem, intNumber);
                }
            }
            SaveMIS();
            oOnDemandTasks.UpdateServerOtherComplete(intRequest, intService, intNumber);
            oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 3, true);

            //oPNCTask.InitiateNextStep(intRequest, intService, intNumber, intAnswer, intModel, intEnvironment, intApplicationCitrix, intAssignPage, intViewPage, dsnAsset, dsnIP, dsnServiceEditor, false, 0);
            oPNCTask.InitiateNextStep(intRequest, intAnswer, intModel, intEnvironment, intAssignPage, intViewPage, dsnAsset, dsnIP, dsnServiceEditor);


            oResourceRequest.CloseWorkflow(intResourceWorkflow, intEnvironment, 0, dsnServiceEditor, true, intResourceRequestApprove, intAssignPage, intViewPage, dsnAsset, dsnIP);
            Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "reload", "<script type=\"text/javascript\">RefreshOpeningWindow();window.close();<" + "/" + "script>");
        }
Ejemplo n.º 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oServiceRequest  = new ServiceRequests(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oUser            = new Users(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oResourceRequest = new ResourceRequest(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
         imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");
         // Custom Loads
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
         btnDocuments.Attributes.Add("onclick", "return OpenWindow('DOCUMENTS_SECURE','?rid=" + Request.QueryString["rid"] + "');");
         btnNext.Attributes.Add("onclick", "return ValidateText('" + txtTitle.ClientID + "','Please enter a title')" +
                                " && ValidateText('" + txtStatement.ClientID + "','Please enter a statement of work')" +
                                " && ValidateDate('" + txtStart.ClientID + "','Please enter a valid estimated start date')" +
                                " && ValidateDate('" + txtEnd.ClientID + "','Please enter a valid estimated end date')" +
                                " && ValidateDates('" + txtStart.ClientID + "','" + txtEnd.ClientID + "','The estimated start date must occur before the estimated end date')" +
                                ";");
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
Ejemplo n.º 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile      = Int32.Parse(Request.Cookies["profileid"].Value);
     oRequest        = new Requests(intProfile, dsn);
     oService        = new Services(intProfile, dsn);
     oServiceRequest = new ServiceRequests(intProfile, dsn);
     oCustomized     = new Customized(intProfile, dsn);
     oVariable       = new Variables(intEnvironment);
     btnSend.Attributes.Add("onclick", "return ValidateTreeNodeSelection()");
     if (!IsPostBack)
     {
         LoadTreeView();
     }
 }
Ejemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage            = new Pages(intProfile, dsn);
     oRequestItem     = new RequestItems(intProfile, dsn);
     oApplication     = new Applications(intProfile, dsn);
     oVariable        = new Variables(intEnvironment);
     oRequestField    = new RequestFields(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oProject         = new Projects(intProfile, dsn);
     oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         LoadValues();
         txtManager.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divManager.ClientID + "','" + lstManager.ClientID + "','" + hdnLead.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstManager.Attributes.Add("ondblclick", "AJAXClickRow();");
         txtEngineer.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divEngineer.ClientID + "','" + lstEngineer.ClientID + "','" + hdnTechnical.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstEngineer.Attributes.Add("ondblclick", "AJAXClickRow();");
         imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
         imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");
         chkExpedite_Yes.Attributes.Add("onclick", "Expedite(this, '" + chkExpedite_No.ClientID + "');");
         // Custom Loads
         int intItem = Int32.Parse(lblItem.Text);
         int intApp  = oRequestItem.GetItemApplication(intItem);
         LoadRequest(intItem, intApp);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
         btnDocuments.Attributes.Add("onclick", "return OpenWindow('DOCUMENTS_SECURE','?rid=" + Request.QueryString["rid"] + "');");
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
Ejemplo n.º 18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile    = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage         = new Pages(intProfile, dsn);
     oRequestItem  = new RequestItems(intProfile, dsn);
     oRequest      = new Requests(intProfile, dsn);
     oApplication  = new Applications(intProfile, dsn);
     oVariable     = new Variables(intEnvironment);
     oRequestField = new RequestFields(intProfile, dsn);
     oService      = new Services(intProfile, dsn);
     oCustomized   = new Customized(intProfile, dsn);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         if (!IsPostBack)
         {
             LoadLists();
         }
         LoadValues();
         btnNext.Attributes.Add("onclick", "return ValidateText('" + txtServer.ClientID + "','Please enter a server name')" +
                                " && ValidateDropDown('" + ddlModel.ClientID + "','Please select a model')" +
                                " && ValidateText('" + txtCode.ClientID + "','Please enter an application code')" +
                                " && ValidateDropDown('" + ddlClass.ClientID + "','Please select a class')" +
                                " && ValidateDate('" + txtDate.ClientID + "','Please enter a valid date of completion')" +
                                " && ValidateCheck('" + chkAgreement.ClientID + "','Please check that you have read and agreed to the disclaimer')" +
                                ";");
         imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');");
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     AuthenticateUser();
     intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
     oResourceRequest = new ResourceRequest(intProfile, dsn);
     oRequest         = new Requests(intProfile, dsn);
     oService         = new Services(intProfile, dsn);
     oCustomized      = new Customized(intProfile, dsn);
     if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "" && Request.QueryString["sid"] != null && Request.QueryString["sid"] != "" && Request.QueryString["sidn"] != null && Request.QueryString["sidn"] != "")
     {
         int intRequest = Int32.Parse(Request.QueryString["rid"]);
         int intService = Int32.Parse(Request.QueryString["sid"]);
         int intNumber  = Int32.Parse(Request.QueryString["sidn"]);
         if (oRequest.GetUser(intRequest) == intProfile)
         {
             DataSet ds = oCustomized.GetStorage3rdFlow1(intRequest, oService.GetItemId(intService), intNumber);
             if (ds.Tables[0].Rows.Count > 0)
             {
                 strView += GetSummary(intRequest, intService, intNumber);
                 if (ds.Tables[0].Rows[0]["number2"].ToString() != "0")
                 {
                     strView += GetSummary(intRequest, intServiceSAN, Int32.Parse(ds.Tables[0].Rows[0]["number2"].ToString()));
                 }
                 if (ds.Tables[0].Rows[0]["number3"].ToString() != "0")
                 {
                     strView += GetSummary(intRequest, intServiceDist, Int32.Parse(ds.Tables[0].Rows[0]["number3"].ToString()));
                 }
                 if (ds.Tables[0].Rows[0]["number3"].ToString() != "0")
                 {
                     strView += GetSummary(intRequest, intServiceMid, Int32.Parse(ds.Tables[0].Rows[0]["number3"].ToString()));
                 }
             }
         }
         if (strView != "")
         {
             strView = "<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\"><tr><td></td><td><b><u>Technician:</u></b></td><td><b><u>Department:</u></b></td><td align=\"center\"><b><u>Status:</u></b></td><td><b><u>Progress:</u></b></td><td></td></tr>" + strView + "</table>";
         }
         else
         {
             strView = "Service Information Unavailable";
         }
         strTitle = oService.GetName(intService);
     }
 }
Ejemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile  = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustomized = new Customized(intProfile, dsn);
            oPage       = new Pages(intProfile, dsn);
            oUser       = new Users(intProfile, dsn);
            if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "")
            {
                intPage = Int32.Parse(Request.QueryString["pageid"]);
            }
            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                intId = Int32.Parse(Request.QueryString["id"]);
            }

            if (intId > 0)
            {
                DataSet ds = oCustomized.GetCostAvoidanceById(intId);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblTitle.Text       = "View Cost Avoidance";
                    lblCAO.Text         = ds.Tables[0].Rows[0]["opportunity"].ToString();
                    lblDescription.Text = ds.Tables[0].Rows[0]["description"].ToString();
                    if (ds.Tables[0].Rows[0]["path"].ToString() != "")
                    {
                        hypUpload.NavigateUrl = ds.Tables[0].Rows[0]["path"].ToString();
                    }
                    else
                    {
                        hypUpload.Text = "";
                    }
                    string strVal = ds.Tables[0].Rows[0]["addtlcostavoidance"].ToString();
                    strVal             = strVal == "" ? "0" : strVal;
                    lblAddtlCA.Text    = String.Format("{0:C}", Double.Parse(strVal));
                    lblDate.Text       = DateTime.Parse(ds.Tables[0].Rows[0]["date"].ToString()).ToShortDateString();
                    lblSubmitter.Text  = oUser.GetFullName(Int32.Parse(ds.Tables[0].Rows[0]["userid"].ToString()));
                    lblDateSubmit.Text = DateTime.Parse(ds.Tables[0].Rows[0]["created"].ToString()).ToShortDateString();
                    rptView.DataSource = oCustomized.GetCategoryList(intId);
                    rptView.DataBind();
                    lblNone.Visible = rptView.Items.Count == 0;
                }
            }
        }
Ejemplo n.º 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["s"] != null)
     {
         oCustomized = new Customized(0, dsn);
         DataSet ds = oCustomized.GetWMServerArchiveServerNames();
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             string strValue = dr["servername"].ToString().ToUpper();
             if (strValue.StartsWith(Request.QueryString["s"].ToUpper()) == false)
             {
                 dr.Delete();
             }
         }
         rptView.DataSource = ds;
         rptView.DataBind();
         lblNone.Visible = (rptView.Items.Count == 0);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     intProfile   = Int32.Parse(Request.Cookies["profileid"].Value);
     oPage        = new Pages(intProfile, dsn);
     oRequestItem = new RequestItems(intProfile, dsn);
     oRequest     = new Requests(intProfile, dsn);
     oApplication = new Applications(intProfile, dsn);
     oWorkstation = new Workstations(intProfile, dsn);
     oCustomized  = new Customized(intProfile, dsn);
     if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
     {
         intApplication = Int32.Parse(Request.QueryString["applicationid"]);
     }
     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);
     }
     if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
     {
         if (!IsPostBack)
         {
             LoadLists();
         }
         LoadValues();
         int    intItem        = Int32.Parse(lblItem.Text);
         int    intApp         = oRequestItem.GetItemApplication(intItem);
         string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
         if (strDeliverable != "")
         {
             panDeliverable.Visible = true;
             btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
         }
         Variables oVariable = new Variables(intEnvironment);
         txtManager.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'300','195','" + divManager.ClientID + "','" + lstManager.ClientID + "','" + hdnManager.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
         lstManager.Attributes.Add("ondblclick", "AJAXClickRow();");
         btnManager.Attributes.Add("onclick", "return OpenWindow('NEW_USER','');");
     }
     btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to cancel this service request?');");
 }
Ejemplo n.º 23
0
        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
            {
                Reload();
            }
            oVariable    = new Variables(intEnvironment);
            oCustomized  = new Customized(intProfile, dsn);
            oService     = new Services(intProfile, dsn);
            oApplication = new Applications(intProfile, dsn);
            oUser        = new Users(intProfile, dsn);
            Int32.TryParse(Request.QueryString["applicationid"], out intApplication);
            if (intApplication > 0)
            {
                litApplication.Text = oApplication.GetName(intApplication);
            }

            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                lblId.Text = Request.QueryString["id"];
            }
            string strControl     = "";
            string strControlText = "";

            if (Request.QueryString["control"] != null)
            {
                strControl = Request.QueryString["control"];
            }
            if (Request.QueryString["controltext"] != null)
            {
                strControlText = Request.QueryString["controltext"];
            }
            btnNone.Attributes.Add("onclick", "return Reset(0,'" + hdnId.ClientID + "','No Document','" + txtName.ClientID + "');");
            btnSave.Attributes.Add("onclick", "return Update('" + hdnId.ClientID + "','" + strControl + "','" + txtName.ClientID + "','" + strControlText + "');");
            btnClose.Attributes.Add("onclick", "return HidePanel();");
            LoadTree();
        }
Ejemplo n.º 24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Response.Cookies["loginreferrer"].Value   = "/admin/asset/asset_room.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");
     }
     oCustom = new Customized(intProfile, dsn);
     if (!IsPostBack)
     {
         LoopRepeater();
         btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnId.ClientID + "','" + hdnOrder.ClientID + "&type=A_ROOM" + "',false,400,400);");
         btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');");
         btnCancel.Attributes.Add("onclick", "return Cancel();");
     }
 }
Ejemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
            string strValue = String.Format("{0:C}", "0");
            int    intId    = 0;

            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                oCustomized = new Customized(intProfile, dsn);
                Int32.TryParse(Request.QueryString["id"], out intId);
                DataSet ds = oCustomized.GetItem(intId);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strValue = String.Format("{0:C}", ds.Tables[0].Rows[0]["amount"]);
                }
            }
            Response.ContentType = "application/text";
            Response.Write(strValue);
            Response.End();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile = Int32.Parse(Request.Cookies["profileid"].Value);
            //    Response.Redirect("/redirect.aspx?referrer=/frame/document_repository_rename.aspx?id=" + intDocId);

            oCustomized = new Customized(intProfile, dsn);
            oIcon       = new Icons(intProfile, dsn);

            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                intDocId = Int32.Parse(Request.QueryString["id"]);
                strType  = oCustomized.GetDocumentRepository(intDocId, "type");
                if (!IsPostBack)
                {
                    txtName.Text = oCustomized.GetDocumentRepository(intDocId, "name");
                    if (txtName.Text.EndsWith(strType))
                    {
                        txtName.Text = txtName.Text.Substring(0, txtName.Text.IndexOf(strType));
                    }
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "loader", "<script type=\"text/javascript\">document.getElementById('" + txtName.ClientID + "').focus();document.getElementById('" + txtName.ClientID + "').select();<" + "/" + "script>");
                }
            }

            // Security code
            strSecurity = oCustomized.GetDocumentRepositorySharesByIds(intDocId, "security");
            if (strSecurity == "")
            {
                strSecurity = oCustomized.GetDocumentRepository(intDocId, "security");
            }
            strOwner = oCustomized.GetDocumentRepositorySharesByIds(intDocId, "ownerid");
            if (strOwner == "")
            {
                strOwner = oCustomized.GetDocumentRepository(intDocId, "profileid");
            }
            strPath        = oCustomized.GetDocumentRepository(intDocId, "path");
            strProfile     = oCustomized.GetDocumentRepository(intDocId, "profileid");
            strApplication = oCustomized.GetDocumentRepository(intDocId, "applicationid");
            btnRename.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter a valid name');");
        }
Ejemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
            oPage            = new Pages(intProfile, dsn);
            oRequestItem     = new RequestItems(intProfile, dsn);
            oServiceRequest  = new ServiceRequests(intProfile, dsn);
            oApplication     = new Applications(intProfile, dsn);
            oVariable        = new Variables(intEnvironment);
            oRequestField    = new RequestFields(intProfile, dsn);
            oService         = new Services(intProfile, dsn);
            oUser            = new Users(intProfile, dsn);
            oCustomized      = new Customized(intProfile, dsn);
            oRequest         = new Requests(intProfile, dsn);
            oResourceRequest = new ResourceRequest(intProfile, dsn);
            oProject         = new Projects(intProfile, dsn);
            oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment);
            oCustom          = new Customized(intProfile, dsn);
            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            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);
            }
            if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null)
            {
                int intRequest = Int32.Parse(Request.QueryString["rid"]);
                LoadValues();
                // Vijay -- Added Validation Check
                btnNext.Attributes.Add("onclick", "return ValidateDates('" + txtStart.ClientID + "','" + txtEnd.ClientID + "','The estimated start date must occur before the estimated end date');");
                imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');");
                imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');");

                // Vijay -- Added onclick attributes to followup and date engaged fields
                imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDateEngaged.ClientID + "');");
                imgFollowUpDate.Attributes.Add("onclick", "return ShowCalendar('" + txtFollowupDate.ClientID + "');");


                // Custom Loads
                int    intItem        = Int32.Parse(lblItem.Text);
                int    intApp         = oRequestItem.GetItemApplication(intItem);
                string strDeliverable = oApplication.Get(intApp, "deliverables_doc");
                if (strDeliverable != "")
                {
                    panDeliverable.Visible = true;
                    btnDeliverable.Attributes.Add("onclick", "return OpenWindow('NEW_WINDOW','" + strDeliverable + "');");
                }
                int intNumber = Int32.Parse(lblNumber.Text);
                rptAssets.DataSource = oCustom.GetTechAssets(intRequest, intItem, intNumber);
                rptAssets.DataBind();
                rptResource.DataSource = oCustom.GetResourceAssignments(intRequest, intItem, intNumber);
                rptResource.DataBind();
                lblNoAsset.Visible = rptAssets.Items.Count == 0;
                lblNoRes.Visible   = rptResource.Items.Count == 0;
                foreach (RepeaterItem ri in rptAssets.Items)
                {
                    Panel      panEdit   = (Panel)ri.FindControl("panEditable");
                    LinkButton btnDelete = (LinkButton)panEdit.FindControl("btnDelete");

                    btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this asset?');");
                    panEdit.Visible = true;
                }
                if (IsPostBack)
                {
                    int intInvestigatedBy = 0;
                    if (Request.Form[hdnInvestigatedBy.UniqueID] != "")
                    {
                        intInvestigatedBy = Int32.Parse(Request.Form[hdnInvestigatedBy.UniqueID]);
                    }
                    int intIDCSPOC = 0;
                    if (Request.Form[hdnIDCSPOC.UniqueID] != "")
                    {
                        intIDCSPOC = Int32.Parse(Request.Form[hdnIDCSPOC.UniqueID]);
                    }
                    oCustomized.AddIDCDetails(intRequest, intItem, intNumber, drpInvestigated.SelectedItem.Text, intInvestigatedBy, txtFollowupDate.Text, txtDateEngaged.Text, drpPhase.SelectedItem.Text, drpEffortSize.SelectedItem.Text, drpInvolvement.SelectedItem.Text, drpEIT.SelectedItem.Text, drpProjectClass.SelectedItem.Text, drpEnterprise.SelectedItem.Text, drpNoInvolve.SelectedItem.Text, intIDCSPOC, txtComment.Text);
                    try
                    {
                        oRequest.UpdateStartDate(intRequest, DateTime.Parse(txtStart.Text));
                        oRequest.UpdateEndDate(intRequest, DateTime.Parse(txtEnd.Text));
                    }
                    catch { }
                }
                else
                {
                    DataSet dsInvestigation = oCustom.GetIDCDetails(intRequest, intItem, intNumber);
                    if (dsInvestigation.Tables[0].Rows.Count > 0)
                    {
                        int intSPOC = 0;
                        if (dsInvestigation.Tables[0].Rows[0]["idc_spoc"].ToString() != "0")
                        {
                            intSPOC         = Int32.Parse(dsInvestigation.Tables[0].Rows[0]["idc_spoc"].ToString());
                            txtIDCSPOC.Text = oUser.GetFullName(intSPOC) + " (" + oUser.GetName(intSPOC) + ")";
                        }
                        hdnIDCSPOC.Value = intSPOC.ToString();
                        int intInvestigatedBy = 0;
                        if (dsInvestigation.Tables[0].Rows[0]["investigated_by"].ToString() != "0")
                        {
                            intInvestigatedBy      = Int32.Parse(dsInvestigation.Tables[0].Rows[0]["investigated_by"].ToString());
                            txtInvestigatedBy.Text = oUser.GetFullName(intInvestigatedBy) + " (" + oUser.GetName(intInvestigatedBy) + ")";
                        }
                        hdnInvestigatedBy.Value       = intInvestigatedBy.ToString();
                        drpInvestigated.SelectedValue = dsInvestigation.Tables[0].Rows[0]["investigated"].ToString();
                        if (dsInvestigation.Tables[0].Rows[0]["followup_date"].ToString() != "")
                        {
                            txtFollowupDate.Text = DateTime.Parse(dsInvestigation.Tables[0].Rows[0]["followup_date"].ToString()).ToShortDateString();
                        }
                        if (dsInvestigation.Tables[0].Rows[0]["date_engaged"].ToString() != "")
                        {
                            txtDateEngaged.Text = DateTime.Parse(dsInvestigation.Tables[0].Rows[0]["date_engaged"].ToString()).ToShortDateString();
                        }
                        drpPhase.SelectedValue       = dsInvestigation.Tables[0].Rows[0]["phase_engaged"].ToString();
                        drpEffortSize.SelectedValue  = dsInvestigation.Tables[0].Rows[0]["effort_size"].ToString();
                        drpInvolvement.SelectedValue = dsInvestigation.Tables[0].Rows[0]["involvement"].ToString();
                        if (drpInvolvement.SelectedItem.Value == "No")
                        {
                            divInvolvement.Style["display"] = "inline";
                        }
                        drpEIT.SelectedValue          = dsInvestigation.Tables[0].Rows[0]["eit_testing"].ToString();
                        drpProjectClass.SelectedValue = dsInvestigation.Tables[0].Rows[0]["project_class"].ToString();
                        drpEnterprise.SelectedValue   = dsInvestigation.Tables[0].Rows[0]["enterprise_release"].ToString();
                        drpNoInvolve.SelectedValue    = dsInvestigation.Tables[0].Rows[0]["no_involve"].ToString();
                        txtComment.Text = dsInvestigation.Tables[0].Rows[0]["comments"].ToString();
                    }
                }



                foreach (RepeaterItem ri in rptResource.Items)
                {
                    int   id = Int32.Parse(((Label)ri.FindControl("lblResID")).Text);
                    Label lblResourceType  = (Label)ri.FindControl("lblResourceType");
                    Label lblRequestedDate = (Label)ri.FindControl("lblRequestedDate");
                    Label lblFulfillDate   = (Label)ri.FindControl("lblFulfillDate");
                    lblRequestedDate.Text = Convert.ToDateTime(lblRequestedDate.Text).ToShortDateString();
                    lblFulfillDate.Text   = Convert.ToDateTime(lblFulfillDate.Text).ToShortDateString();
                    lblResourceType.Text  = oCustom.GetResourceTypeName(id, "name");
                    Panel      panEdit   = (Panel)ri.FindControl("panEditable");
                    LinkButton btnDelete = (LinkButton)panEdit.FindControl("btnDelete");
                    btnDelete.Attributes.Add("onclick", " return confirm('Are you sure you want to delete this resource?') ;");
                    panEdit.Visible = true;
                }
                btnAddRes.Attributes.Add("onclick", "return EditResource('" + intRequest + "','" + intItem + "','" + intNumber + "','0');");
                btnAddAsset.Attributes.Add("onclick", "return EditAsset('" + intRequest + "','" + intItem + "','" + intNumber + "','0');");
            }
            txtInvestigatedBy.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'200','195','" + divAJAX.ClientID + "','" + lstAJAX.ClientID + "','" + hdnInvestigatedBy.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
            lstAJAX.Attributes.Add("ondblclick", "AJAXClickRow();");
            txtIDCSPOC.Attributes.Add("onkeyup", "return AJAXTextBoxGet(this,'200','195','" + divIDCSPOC.ClientID + "','" + lstIDCSPOC.ClientID + "','" + hdnIDCSPOC.ClientID + "','" + oVariable.URL() + "/frame/users.aspx',2);");
            lstIDCSPOC.Attributes.Add("ondblclick", "AJAXClickRow();");
            drpInvolvement.Attributes.Add("onchange", "ShowInvolvementReason(this,'" + divInvolvement.ClientID + "');");
            btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to cancel this service request?');");
        }
Ejemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            intProfile       = Int32.Parse(Request.Cookies["profileid"].Value);
            oProject         = new Projects(intProfile, dsn);
            oFunction        = new Functions(intProfile, dsn, intEnvironment);
            oUser            = new Users(intProfile, dsn);
            oPage            = new Pages(intProfile, dsn);
            oResourceRequest = new ResourceRequest(intProfile, dsn);
            oRequestItem     = new RequestItems(intProfile, dsn);
            oRequest         = new Requests(intProfile, dsn);
            oService         = new Services(intProfile, dsn);
            oServiceRequest  = new ServiceRequests(intProfile, dsn);
            oRequestField    = new RequestFields(intProfile, dsn);
            oApplication     = new Applications(intProfile, dsn);
            oServiceDetail   = new ServiceDetails(intProfile, dsn);
            oDelegate        = new Delegates(intProfile, dsn);
            oCustomized      = new Customized(intProfile, dsn);
            oVariable        = new Variables(intEnvironment);
            oClass           = new Classes(intProfile, dsn);
            oEnvironment     = new Environments(intProfile, dsn);
            oLocation        = new Locations(intProfile, dsn);
            if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "")
            {
                intApplication = Int32.Parse(Request.QueryString["applicationid"]);
            }
            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);
            }

            if (Request.QueryString["rrid"] != null && Request.QueryString["rrid"] != "")
            {
                // Start Workflow Change
                lblResourceWorkflow.Text = Request.QueryString["rrid"];
                int intResourceWorkflow = Int32.Parse(Request.QueryString["rrid"]);
                int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);
                ds = oResourceRequest.Get(intResourceParent);
                // End Workflow Change
                intRequest          = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString());
                lblRequestedBy.Text = oUser.GetFullName(oRequest.GetUser(intRequest));
                lblRequestedOn.Text = DateTime.Parse(oResourceRequest.Get(intResourceParent, "created")).ToString();
                intItem             = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString());
                intNumber           = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString());
                // Start Workflow Change
                bool boolComplete = (oResourceRequest.GetWorkflow(intResourceWorkflow, "status") == "3");
                int  intUser      = Int32.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "userid"));
                txtCustom.Text = oResourceRequest.GetWorkflow(intResourceWorkflow, "name");
                double dblAllocated = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated"));
                // End Workflow Change
                intService      = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString());
                lblService.Text = oService.Get(intService, "name");
                int intApp = oRequestItem.GetItemApplication(intItem);

                if (Request.QueryString["save"] != null && Request.QueryString["save"] != "")
                {
                    Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">alert('Information Saved Successfully');<" + "/" + "script>");
                }
                if (Request.QueryString["status"] != null && Request.QueryString["status"] != "")
                {
                    Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "statusd", "<script type=\"text/javascript\">alert('Status Updates has been Added');<" + "/" + "script>");
                }
                if (!IsPostBack)
                {
                    double dblUsed = oResourceRequest.GetWorkflowUsed(intResourceWorkflow);
                    lblUpdated.Text = oResourceRequest.GetUpdated(intResourceWorkflow);
                    if (dblAllocated == dblUsed)
                    {
                        if (boolComplete == false)
                        {
                            oFunction.ConfigureToolButton(btnComplete, "/images/tool_complete");
                            btnComplete.Attributes.Add("onclick", "return confirm('Are you sure you want to mark this as completed and remove it from your workload?');");
                        }
                        else
                        {
                            oFunction.ConfigureToolButton(btnComplete, "/images/tool_complete");
                            btnComplete.Attributes.Add("onclick", "alert('This task has already been marked COMPLETE. You can close this window.');return false;");
                        }
                        panComplete.Visible = true;
                    }
                    else
                    {
                        btnComplete.ImageUrl = "/images/tool_complete_dbl.gif";
                        btnComplete.Enabled  = false;
                    }
                    dblUsed             = (dblUsed / dblAllocated) * 100;
                    intProject          = oRequest.GetProjectNumber(intRequest);
                    hdnTab.Value        = "D";
                    panWorkload.Visible = true;
                    LoadStatus(intResourceWorkflow);
                    LoadInformation(intResourceWorkflow);
                    LoadDetails();

                    btnDenied.Attributes.Add("onclick", "return CloseWindow();");
                    oFunction.ConfigureToolButton(btnSave, "/images/tool_save");
                    oFunction.ConfigureToolButton(btnPrint, "/images/tool_print");
                    btnPrint.Attributes.Add("onclick", "return PrintWindow();");
                    oFunction.ConfigureToolButton(btnClose, "/images/tool_close");
                    btnClose.Attributes.Add("onclick", "return ExitWindow();");
                    btnSave.Attributes.Add("onclick", "return ValidateNumber0('" + txtAmount.ClientID + "','Please enter the total amount of storage')" +
                                           " && ValidateStatus('" + ddlStatus.ClientID + "','" + txtComments.ClientID + "')" +
                                           ";");
                    // 6/1/2009 - Load ReadOnly View
                    if (oResourceRequest.CanUpdate(intProfile, intResourceWorkflow, false) == false)
                    {
                        oFunction.ConfigureToolButtonRO(btnSave, btnComplete);
                        //panDenied.Visible = true;
                    }
                }
            }
            else
            {
                panDenied.Visible = true;
            }
        }
Ejemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile = Int32.Parse(Request.Cookies["profileid"].Value);

            oPage       = new Pages(intProfile, dsn);
            oUser       = new Users(intProfile, dsn);
            oTPM        = new TPM(intProfile, dsn, intEnvironment);
            oCustomized = new Customized(intProfile, dsn);
            oCost       = new Costs(intProfile, dsn);
            oVariable   = new Variables(intEnvironment);

            if (Request.QueryString["status"] != "" && Request.QueryString["status"] != null)
            {
                strStatus = Request.QueryString["status"];
            }

            if (Request.QueryString["id"] != "" && Request.QueryString["id"] != null)
            {
                intId = Int32.Parse(Request.QueryString["id"]);
            }

            if (Request.QueryString["work"] != "" && Request.QueryString["work"] != null)
            {
                intWorking = Int32.Parse(Request.QueryString["work"]);
            }

            if (Request.QueryString["exec"] != "" && Request.QueryString["exec"] != null)
            {
                intExecutive = Int32.Parse(Request.QueryString["exec"]);
            }


            if (!IsPostBack)
            {
                ds = oTPM.GetPCR(intId);
                int intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString());
                int intItem    = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString());
                int intNumber  = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString());
                int intParent  = Int32.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                strPath = ds.Tables[0].Rows[0]["path"].ToString();

                dsResource = oCustomized.GetTPM(intRequest, intItem, intNumber);
                string   strCosts = dsResource.Tables[0].Rows.Count > 0 ? dsResource.Tables[0].Rows[0]["costs"].ToString() : "No Cost Center(s)";
                string[] strCost;
                char[]   strSplit = { '&' };
                strCost = strCosts.Split(strSplit);
                string strText = strCosts == "" ? "None" : "";
                foreach (string str in strCost)
                {
                    if (str != "")
                    {
                        strText += oCost.GetName(Int32.Parse(str)) + ";";
                    }
                }


                chkScope.Checked     = ds.Tables[0].Rows[0]["scope"].ToString() == "1" ? true : false;
                chkSchedule.Checked  = ds.Tables[0].Rows[0]["s"].ToString() == "1" ? true : false;
                chkFinancial.Checked = ds.Tables[0].Rows[0]["f"].ToString() == "1" ? true : false;

                divScope.Style["display"]     = chkScope.Checked ? "inline" : "none";
                divSchedule.Style["display"]  = chkSchedule.Checked ? "inline" : "none";
                divFinancial.Style["display"] = chkFinancial.Checked ? "inline" : "none";

                txtPCRScheduleDS.Text = ds.Tables[0].Rows[0]["sds"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["sds"].ToString()).ToShortDateString() : "";
                txtPCRScheduleDE.Text = ds.Tables[0].Rows[0]["sde"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["sde"].ToString()).ToShortDateString() : "";
                txtPCRSchedulePS.Text = ds.Tables[0].Rows[0]["sps"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["sps"].ToString()).ToShortDateString() : "";
                txtPCRSchedulePE.Text = ds.Tables[0].Rows[0]["spe"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["spe"].ToString()).ToShortDateString() : "";
                txtPCRScheduleES.Text = ds.Tables[0].Rows[0]["ses"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["ses"].ToString()).ToShortDateString() : "";
                txtPCRScheduleEE.Text = ds.Tables[0].Rows[0]["see"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["see"].ToString()).ToShortDateString() : "";
                txtPCRScheduleCS.Text = ds.Tables[0].Rows[0]["scs"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["scs"].ToString()).ToShortDateString() : "";
                txtPCRScheduleCE.Text = ds.Tables[0].Rows[0]["sce"].ToString() != "" ? DateTime.Parse(ds.Tables[0].Rows[0]["sce"].ToString()).ToShortDateString() : "";

                chkPCRScheduleD.Checked = txtPCRScheduleDS.Text != "" || txtPCRScheduleDE.Text != "";
                chkPCRScheduleP.Checked = txtPCRSchedulePS.Text != "" || txtPCRSchedulePE.Text != "";
                chkPCRScheduleE.Checked = txtPCRScheduleES.Text != "" || txtPCRScheduleEE.Text != "";
                chkPCRScheduleC.Checked = txtPCRScheduleCS.Text != "" || txtPCRScheduleCE.Text != "";

                if (dsResource.Tables[0].Rows[0]["appsd"] == DBNull.Value || dsResource.Tables[0].Rows[0]["apped"] == DBNull.Value)
                {
                    chkPCRScheduleD.Enabled = false;
                    lblPCRScheduleD.Text    = "N / A";
                }
                else
                {
                    lblPCRScheduleD.Text = GetDate(dsResource.Tables[0].Rows[0]["appsd"].ToString()) + " - " + GetDate(dsResource.Tables[0].Rows[0]["apped"].ToString());
                }
                if (dsResource.Tables[0].Rows[0]["appsp"] == DBNull.Value || dsResource.Tables[0].Rows[0]["appep"] == DBNull.Value)
                {
                    chkPCRScheduleP.Enabled = false;
                    lblPCRScheduleP.Text    = "N / A";
                }
                else
                {
                    lblPCRScheduleP.Text = GetDate(dsResource.Tables[0].Rows[0]["appsp"].ToString()) + " - " + GetDate(dsResource.Tables[0].Rows[0]["appep"].ToString());
                }
                if (dsResource.Tables[0].Rows[0]["appse"] == DBNull.Value || dsResource.Tables[0].Rows[0]["appee"] == DBNull.Value)
                {
                    chkPCRScheduleE.Enabled = false;
                    lblPCRScheduleE.Text    = "N / A";
                }
                else
                {
                    lblPCRScheduleE.Text = GetDate(dsResource.Tables[0].Rows[0]["appse"].ToString()) + " - " + GetDate(dsResource.Tables[0].Rows[0]["appee"].ToString());
                }
                if (dsResource.Tables[0].Rows[0]["appsc"] == DBNull.Value || dsResource.Tables[0].Rows[0]["appec"] == DBNull.Value)
                {
                    chkPCRScheduleC.Enabled = false;
                    lblPCRScheduleC.Text    = "N / A";
                }
                else
                {
                    lblPCRScheduleC.Text = GetDate(dsResource.Tables[0].Rows[0]["appsc"].ToString()) + " - " + GetDate(dsResource.Tables[0].Rows[0]["appec"].ToString());
                }


                double dblAppDI = GetFloat(dsResource.Tables[0].Rows[0]["appid"].ToString());
                double dblAppDE = GetFloat(dsResource.Tables[0].Rows[0]["appexd"].ToString());
                double dblAppDH = GetFloat(dsResource.Tables[0].Rows[0]["apphd"].ToString());
                double dblAppD  = dblAppDI + dblAppDE + dblAppDH;
                lblPCRFinancialD.Text = "$" + dblAppD.ToString("N");


                double dblAppPI = GetFloat(dsResource.Tables[0].Rows[0]["appip"].ToString());
                double dblAppPE = GetFloat(dsResource.Tables[0].Rows[0]["appexp"].ToString());
                double dblAppPH = GetFloat(dsResource.Tables[0].Rows[0]["apphp"].ToString());
                double dblAppP  = dblAppPI + dblAppPE + dblAppPH;
                lblPCRFinancialP.Text = "$" + dblAppP.ToString("N");

                double dblAppEI = GetFloat(dsResource.Tables[0].Rows[0]["appie"].ToString());
                double dblAppEE = GetFloat(dsResource.Tables[0].Rows[0]["appexe"].ToString());
                double dblAppEH = GetFloat(dsResource.Tables[0].Rows[0]["apphe"].ToString());
                double dblAppE  = dblAppEI + dblAppEE + dblAppEH;
                lblPCRFinancialE.Text = "$" + dblAppE.ToString("N");


                double dblAppCI = GetFloat(dsResource.Tables[0].Rows[0]["appic"].ToString());
                double dblAppCE = GetFloat(dsResource.Tables[0].Rows[0]["appexc"].ToString());
                double dblAppCH = GetFloat(dsResource.Tables[0].Rows[0]["apphc"].ToString());
                double dblAppC  = dblAppCI + dblAppCE + dblAppCH;
                lblPCRFinancialC.Text = "$" + dblAppC.ToString("N");


                txtPCRFinancialD.Text = ds.Tables[0].Rows[0]["fd"].ToString();
                txtPCRFinancialP.Text = ds.Tables[0].Rows[0]["fp"].ToString();
                txtPCRFinancialE.Text = ds.Tables[0].Rows[0]["fe"].ToString();
                txtPCRFinancialC.Text = ds.Tables[0].Rows[0]["fc"].ToString();

                chkPCRFinancialD.Checked = txtPCRFinancialD.Text != "0";
                chkPCRFinancialP.Checked = txtPCRFinancialP.Text != "0";
                chkPCRFinancialE.Checked = txtPCRFinancialE.Text != "0";
                chkPCRFinancialC.Checked = txtPCRFinancialC.Text != "0";

                chkReason.Checked          = ds.Tables[0].Rows[0]["reasons"].ToString() != "";
                divReason.Style["display"] = chkReason.Checked ? "inline" : "none";
                string[] strReasons = ds.Tables[0].Rows[0]["reasons"].ToString().Split(';');
                foreach (string str in strReasons)
                {
                    for (int ii = 0; ii < chkPCRReason.Items.Count; ii++)
                    {
                        if (chkPCRReason.Items[ii].Value == str)
                        {
                            chkPCRReason.Items[ii].Selected = true;
                            break;
                        }
                    }
                }
                txtScopeComments.Text     = ds.Tables[0].Rows[0]["scopecomments"].ToString();
                txtScheduleComments.Text  = ds.Tables[0].Rows[0]["schcomments"].ToString();
                txtFinancialComments.Text = ds.Tables[0].Rows[0]["fincomments"].ToString();

                int intStatus = Int32.Parse(ds.Tables[0].Rows[0]["status"].ToString());
                if (intStatus == 1)
                {
                    strStatus = "Approved";
                }
                else if (intStatus == -1)
                {
                    strStatus = "Denied";
                }
                hdnStatus.Value = strStatus.ToUpper();
            }

            chkScope.Attributes.Add("onclick", "ShowHideDivCheck('" + divScope.ClientID + "',this);");
            chkSchedule.Attributes.Add("onclick", "ShowHideDivCheck('" + divSchedule.ClientID + "',this);");
            chkFinancial.Attributes.Add("onclick", "ShowHideDivCheck('" + divFinancial.ClientID + "',this);");
            chkReason.Attributes.Add("onclick", "ShowHideDivCheck('" + divReason.ClientID + "',this);");
            btnUpdate.Attributes.Add("onclick", "return ValidateStatus('" + hdnStatus.Value + "') && ValidatePCR('" + chkScope.ClientID + "'" +
                                     ",'" + chkSchedule.ClientID + "'" +
                                     ",'" + chkPCRScheduleD.ClientID + "'" +
                                     ",'" + txtPCRScheduleDS.ClientID + "'" +
                                     ",'" + txtPCRScheduleDE.ClientID + "'" +
                                     ",'" + chkPCRScheduleP.ClientID + "'" +
                                     ",'" + txtPCRSchedulePS.ClientID + "'" +
                                     ",'" + txtPCRSchedulePE.ClientID + "'" +
                                     ",'" + chkPCRScheduleE.ClientID + "'" +
                                     ",'" + txtPCRScheduleES.ClientID + "'" +
                                     ",'" + txtPCRScheduleEE.ClientID + "'" +
                                     ",'" + chkPCRScheduleC.ClientID + "'" +
                                     ",'" + txtPCRScheduleCS.ClientID + "'" +
                                     ",'" + txtPCRScheduleCE.ClientID + "'" +
                                     ",'" + chkFinancial.ClientID + "'" +
                                     ",'" + chkPCRFinancialD.ClientID + "'" +
                                     ",'" + txtPCRFinancialD.ClientID + "'" +
                                     ",'" + chkPCRFinancialP.ClientID + "'" +
                                     ",'" + txtPCRFinancialP.ClientID + "'" +
                                     ",'" + chkPCRFinancialE.ClientID + "'" +
                                     ",'" + txtPCRFinancialE.ClientID + "'" +
                                     ",'" + chkPCRFinancialC.ClientID + "'" +
                                     ",'" + txtPCRFinancialC.ClientID + "'" +
                                     ");");
            imgPCRScheduleCE.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleCE.ClientID + "');");
            imgPCRScheduleCS.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleCS.ClientID + "');");
            imgPCRScheduleDE.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleDE.ClientID + "');");
            imgPCRScheduleDS.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleDS.ClientID + "');");
            imgPCRScheduleEE.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleEE.ClientID + "');");
            imgPCRScheduleES.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRScheduleES.ClientID + "');");
            imgPCRSchedulePE.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRSchedulePE.ClientID + "');");
            imgPCRSchedulePS.Attributes.Add("onclick", "return OpenCalendar('" + txtPCRSchedulePS.ClientID + "');");
            imgPCRFinancialC.Attributes.Add("onclick", "return OpenCalculator('" + txtPCRFinancialC.ClientID + "');");
            imgPCRFinancialD.Attributes.Add("onclick", "return OpenCalculator('" + txtPCRFinancialD.ClientID + "');");
            imgPCRFinancialE.Attributes.Add("onclick", "return OpenCalculator('" + txtPCRFinancialE.ClientID + "');");
            imgPCRFinancialP.Attributes.Add("onclick", "return OpenCalculator('" + txtPCRFinancialP.ClientID + "');");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            AuthenticateUser();
            intProfile  = Int32.Parse(Request.Cookies["profileid"].Value);
            oCustomized = new Customized(intProfile, dsn);
            oIcon       = new Icons(intProfile, dsn);
            oFunction   = new Functions(intProfile, dsn, intEnvironment);
            if (Request.QueryString["docid"] != null && Request.QueryString["docid"] != "")
            {
                Int32.TryParse(oFunction.decryptQueryString(Request.QueryString["docid"]), out intDocId);
            }
            int intApplication = 0;

            if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "")
            {
                intApplication = Int32.Parse(Request.Cookies["application"].Value);
            }

            if (intDocId > 0)
            {
                string strSecurity = oCustomized.GetDocumentRepositorySharesByIds(intDocId, "security");
                if (strSecurity == "")
                {
                    strSecurity = oCustomized.GetDocumentRepository(intDocId, "security");
                }
                string strOwner = oCustomized.GetDocumentRepositorySharesByIds(intDocId, "ownerid");
                if (strOwner == "")
                {
                    strOwner = oCustomized.GetDocumentRepository(intDocId, "profileid");
                }
                string strType         = oCustomized.GetDocumentRepository(intDocId, "type");
                string strPath         = oCustomized.GetDocumentRepository(intDocId, "path");
                string strName         = oCustomized.GetDocumentRepository(intDocId, "name");
                string strSize         = oCustomized.GetDocumentRepository(intDocId, "size");
                int    intIsDepartment = Int32.Parse(oCustomized.GetDocumentRepository(intDocId, "department"));
                int    intDepartment   = Int32.Parse(oCustomized.GetDocumentRepository(intDocId, "applicationid"));
                if (strSecurity == "1" || strSecurity == "10" || strOwner == intProfile.ToString() ||
                    (strSecurity == "-1" && intIsDepartment == 1 && intDepartment == intApplication)
                    )
                {
                    if (strType != "Folder" && new System.IO.FileInfo(strPath).Exists == true)
                    {
                        DataSet ds = oIcon.Get(strType.ToUpper());
                        if (ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["content_type"].ToString() != "")
                        {
                            Response.ContentType = ds.Tables[0].Rows[0]["content_type"].ToString();
                        }
                        else
                        {
                            Response.Redirect(strPath);
                        }
                        //Response.ContentType = "application/octet-stream";
                        Response.AppendHeader("content-disposition", "inline;filename=" + strName);
                        Response.AppendHeader("content-length", strSize);
                        Response.WriteFile(strPath);
                        Response.Flush();
                        Response.End();
                    }
                }
                else
                {
                    Response.Write("<script type=\"text/javascript\">alert('Access Denied (" + strSecurity.ToString() + "." + intIsDepartment.ToString() + "." + strOwner + "." + intProfile.ToString() + "." + intDepartment.ToString() + "." + intApplication.ToString() + ")!');window.close();</script>");
                }
            }
            else
            {
                Response.Write("<script type=\"text/javascript\">alert('Access Denied!');window.close();</script>");
            }
        }