Ejemplo n.º 1
0
        protected void btnStatus_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&status=true");
        }
Ejemplo n.º 2
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            oResourceRequest.UpdateWorkflowName(intResourceWorkflow, txtCustom.Text, intProfile);
            switch (Request.Form[hdnTab.UniqueID])
            {
            case "S":
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=S&save=true");
                break;

            case "E":
                //oResourceRequest.UpdateAllocated(intResource, double.Parse(txtHours.Text));
                oResourceRequest.UpdateWorkflowHoursOverwrite(intResourceWorkflow, double.Parse(txtHours.Text));
                foreach (string strForm in Request.Form)
                {
                    if (strForm.StartsWith("HDN_") == true)
                    {
                        string strValue = strForm.Substring(4);
                        int    intID    = Int32.Parse(strValue.Substring(0, strValue.IndexOf("_")));
                        strValue = strValue.Substring(strValue.IndexOf("_") + 1);
                        string strType = strValue.Substring(0, strValue.IndexOf("_"));
                        strValue = strValue.Substring(strValue.IndexOf("_") + 1);
                        try
                        {
                            if (intUseLunSerial > 0)
                            {
                                if (strType == "L")
                                {
                                    oStorage.UpdateLunActual(intID, (Request.Form["HDN_" + intID.ToString() + "_L_SERIALNO"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE_QA"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE_TEST"]), (Request.Form["HDN_" + intID.ToString() + "_L_REPLICATED"] == "Yes" ? 1 : 0), (Request.Form["HDN_" + intID.ToString() + "_L_HIGH_AVAILABILITY"] == "Yes" ? 1 : 0));
                                }
                                else
                                {
                                    oStorage.UpdateMountPointActual(intID, (Request.Form["HDN_" + intID.ToString() + "_M_SERIALNO"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE_QA"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE_TEST"]), (Request.Form["HDN_" + intID.ToString() + "_M_REPLICATED"] == "Yes" ? 1 : 0), (Request.Form["HDN_" + intID.ToString() + "_M_HIGH_AVAILABILITY"] == "Yes" ? 1 : 0));
                                }
                            }
                            else
                            {
                                if (strType == "L")
                                {
                                    oStorage.UpdateLunActual(intID, "", double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE_QA"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_L_SIZE_TEST"]), (Request.Form["HDN_" + intID.ToString() + "_L_REPLICATED"] == "Yes" ? 1 : 0), (Request.Form["HDN_" + intID.ToString() + "_L_HIGH_AVAILABILITY"] == "Yes" ? 1 : 0));
                                }
                                else
                                {
                                    oStorage.UpdateMountPointActual(intID, "", double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE_QA"]), double.Parse(Request.Form["HDN_" + intID.ToString() + "_M_SIZE_TEST"]), (Request.Form["HDN_" + intID.ToString() + "_M_REPLICATED"] == "Yes" ? 1 : 0), (Request.Form["HDN_" + intID.ToString() + "_M_HIGH_AVAILABILITY"] == "Yes" ? 1 : 0));
                                }
                            }
                        }
                        catch { }
                    }
                }
                oOnDemandTasks.UpdateServerStorage(intRequest, intItem, intNumber, (chk1.Checked ? 1 : 0));
                Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&save=true");
                break;
            }
        }
Ejemplo n.º 3
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtComments.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                //CVT62149 Workload Manager Red Light Status =Hold
                if (ddlStatus.SelectedValue == "1") //Red
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 5, true);
                }
                else
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 2, true);
                }
            }


            double dblHours = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated"));
            double dblUsed  = oResourceRequest.GetWorkflowUsed(intResourceWorkflow);

            dblHours = (dblHours - dblUsed);
            if (dblHours > 0.00)
            {
                oResourceRequest.UpdateWorkflowHours(intResourceWorkflow, dblHours);
            }
            oResourceRequest.UpdateWorkflowName(intResourceWorkflow, txtCustom.Text, intProfile);
            oCustomized.UpdateStorage3rd(intRequest, intItem, intNumber, double.Parse(txtAmount.Text));
            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&save=true");
        }
Ejemplo n.º 4
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtIssues.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtIssues.Text);
            }
            oResourceRequest.UpdateWorkflowName(intResourceWorkflow, txtCustom.Text, intProfile);
            double dblHours = 0.00;

            dblHours += (chk1.Checked ? dbl1 : 0.00);
            dblHours += (chk2.Checked ? dbl2 : 0.00);
            dblHours += (chk3.Checked ? dbl3 : 0.00);
            dblHours += (chk4.Checked ? dbl4 : 0.00);
            double dblUsed = oResourceRequest.GetWorkflowUsed(intResourceWorkflow);

            dblHours = (dblHours - dblUsed);
            if (dblHours > 0.00)
            {
                oResourceRequest.UpdateWorkflowHours(intResourceWorkflow, dblHours);
            }
            oOnDemandTasks.UpdateVirtualII(intRequest, intItem, intNumber, (chk1.Checked ? 1 : 0), (chk3.Checked ? 1 : 0), (chk4.Checked ? 1 : 0), (chk5.Checked || boolMove == false ? 1 : 0), (chk6.Checked || boolMove == false ? 1 : 0), (chk7.Checked ? 1 : 0), (chk8.Checked ? 1 : 0), (chk9.Checked ? 1 : 0), (chk10.Checked ? 1 : 0), (chk11.Checked ? 1 : 0));
            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&save=true");
        }
Ejemplo n.º 5
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtComments.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                //CVT62149 Workload Manager Red Light Status =Hold
                if (ddlStatus.SelectedValue == "1") //Red
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 5, true);
                }
                else
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 2, true);
                }
            }
            double dblHours = 0.00;

            if (Request.Form["hdnHours"] != null && Request.Form["hdnHours"] != "")
            {
                dblHours = double.Parse(Request.Form["hdnHours"]);
            }
            double dblUsed = oResourceRequest.GetWorkflowUsed(intResourceWorkflow);

            dblHours = (dblHours - dblUsed);
            if (dblHours > 0.00)
            {
                oResourceRequest.UpdateWorkflowHours(intResourceWorkflow, dblHours);
            }
            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&save=true");
        }
Ejemplo n.º 6
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = 0;

            Int32.TryParse(lblStorage.Text, out intResourceWorkflow);
            if (intResourceWorkflow > 0)
            {
                // Auto-provisioning storage task.  Send to ClearView administrators.
                oResourceRequest.AddStatus(intResourceWorkflow, 1, txtComments.Text, intProfile);
                oResourceRequest.UpdateStatusOverallWorkflow(intRRId, (int)ResourceRequestStatus.OnHold);
                string strComments    = "";
                string strEMailIdsBCC = oFunction.GetGetEmailAlertsEmailIds("EMAILGRP_PROVISIONING_SUPPORT");
                if (txtComments.Text.Trim() != "")
                {
                    strComments = "<p>The following comments were added:<br/>" + txtComments.Text + "</p>";
                }
                oFunction.SendEmail("Auto-Provisioning Storage Task Returned", strEMailIdsBCC, "", "", "Auto-Provisioning Storage Task Returned", "<p><b>The following auto-provisioning storage task has been returned by " + oUser.GetFullName(intProfile) + "</b><p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p>" + strComments + "<p>Effective immediately, this request has been put ON HOLD.  You should set the status of this request (in Datapoint) back to ACTIVE once the issue has been resolved.</p><p><a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/frame/resource_request.aspx?rrid=" + intResourceWorkflow.ToString() + "\" target=\"_blank\">Click here to view this request.</a></p>", true, false);
                Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "reload", "<script type=\"text/javascript\">alert('This request has been returned');window.parent.close();<" + "/" + "script>");
            }
            else
            {
                updateStatus();
                Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "reload", "<script type=\"text/javascript\">if (window.opener == null) { RefreshOpeningWindow(true);parent.HidePanel();parent.close(); } else { window.close(); }<" + "/" + "script>");
            }
        }
        protected void btnStatus_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtComments.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                //CVT62149 Workload Manager Red Light Status =Hold
                if (ddlStatus.SelectedValue == "1") //Red
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 5, true);
                }
                else
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 2, true);
                }
            }

            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=S&status=true");
        }
Ejemplo n.º 8
0
        protected void btnSave_Click(Object Sender, EventArgs e)
        {
            int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int intResourceParent   = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtComments.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                //CVT62149 Workload Manager Red Light Status =Hold
                if (ddlStatus.SelectedValue == "1") //Red
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 5, true);
                }
                else
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 2, true);
                }
            }


            double dblHours = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated"));
            double dblUsed  = oResourceRequest.GetWorkflowUsed(intResourceWorkflow);

            dblHours = (dblHours - dblUsed);
            if (dblHours > 0.00)
            {
                oResourceRequest.UpdateWorkflowHours(intResourceWorkflow, dblHours);
            }
            oResourceRequest.UpdateWorkflowName(intResourceWorkflow, txtCustom.Text, intProfile);
            string _sql                    = "";
            string _version                = "";
            int    _dba                    = 0;
            string _cluster_group_new      = "";
            string _cluster_group_existing = "";
            int    _tsm                    = 0;
            string _networkname            = "";
            string _ipaddress              = "";
            string _newdriveletter         = "";
            string _newmountpoint          = "";
            string _increase               = "";
            string _filesystem             = "";
            string _client_amount          = "";

            if (ddlCluster.SelectedIndex == 1)
            {
                // CLUSTER = YES
                if (ddlClusterYesSQLGroup.SelectedIndex == 1)
                {
                    // GROUP = NEW
                    _cluster_group_new = ddlClusterYesSQLGroup.SelectedItem.Value;
                    _tsm         = (chkClusterYesGroupNewTSM.Checked ? 1 : 0);
                    _networkname = (chkClusterYesGroupNewNetwork.Checked ? txtClusterYesGroupNewNetwork.Text : "");
                    _ipaddress   = (chkClusterYesGroupNewIP.Checked ? txtClusterYesGroupNewIP.Text : "");
                }
                else
                {
                    _cluster_group_existing = txtClusterYesGroupExisting.Text;
                    _increase   = ddlClusterYesGroupExisting.SelectedItem.Value;
                    _filesystem = txtClusterYesGroupExistingFileSystem.Text;
                }
            }
            else
            {
                // CLUSTER = NO
                _increase   = ddlClusterNo.SelectedItem.Value;
                _filesystem = txtClusterNo.Text;
            }
            _client_amount = txtAdditionalClient.Text;
            oCustomized.AddStorage3rd(intRequest, intItem, intNumber, txtServerName.Text, ddlOS.SelectedItem.Value, ddlMaintenance.SelectedItem.Value, ddlCurrent.SelectedItem.Value, ddlType.SelectedItem.Value, ddlDR.SelectedItem.Value, ddlPerformance.SelectedItem.Value, ddlChange.SelectedItem.Value, ddlCluster.SelectedItem.Value, _sql, _version, _dba, _cluster_group_new, _tsm, _networkname, _ipaddress, _cluster_group_existing, 0, 0, _newdriveletter, _newmountpoint, _increase, txtDescription.Text, Int32.Parse(ddlClass.SelectedItem.Value), Int32.Parse(Request.Form[hdnEnvironment.UniqueID]), Int32.Parse(Request.Form[hdnLocation.UniqueID]), ddlFabric.SelectedItem.Value, ddlReplicated.SelectedItem.Value, 0, ddlType2.SelectedItem.Value, ddlExpand.SelectedItem.Value, double.Parse(txtAdditional.Text), Request.Form[hdnLUNs.UniqueID], txtWWW.Text, txtUID.Text, txtNode.Text, txtEnclosureName.Text, txtEnclosureSlot.Text, txtReplicatedServerName.Text, txtReplicatedWWW.Text, txtReplicatedEnclosureName.Text, txtReplicatedEnclosureSlot.Text, 0.00, Int32.Parse(lblMidrange.Text), intProfile, DateTime.Parse(lblDate.Text), _filesystem, _client_amount);
            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&save=true");
        }
Ejemplo n.º 9
0
        protected void btnStatus_Click(Object Sender, EventArgs e)
        {
            int     intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text);
            int     intStatusLatest     = 0;
            DataSet dsLatest            = oResourceRequest.GetStatusLatest(intResourceWorkflow);

            if (dsLatest.Tables[0].Rows.Count > 0)
            {
                Int32.TryParse(dsLatest.Tables[0].Rows[0]["status"].ToString(), out intStatusLatest);
            }
            int intResourceParent = oResourceRequest.GetWorkflowParent(intResourceWorkflow);

            if (ddlStatus.SelectedIndex > -1 && txtComments.Text.Trim() != "")
            {
                oResourceRequest.AddStatus(intResourceWorkflow, Int32.Parse(ddlStatus.SelectedItem.Value), txtComments.Text, intProfile);
                string strNotifyClient = "";
                //CVT62149 Workload Manager Red Light Status =Hold
                if (ddlStatus.SelectedValue == "1") // Red
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 5, true);
                    strNotifyClient = (oService.Get(intService, "notify_red") == "1" ? "On Hold" : "");
                }
                else
                {
                    oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, 2, true);
                    if (ddlStatus.SelectedValue == "2") // Yellow
                    {
                        strNotifyClient = (oService.Get(intService, "notify_yellow") == "1" ? "Alert" : "");
                    }
                    else
                    {
                        strNotifyClient = ((intStatusLatest == 1 || intStatusLatest == 2) && oService.Get(intService, "notify_green") == "1" ? "Resume" : "");
                    }
                }

                if (strNotifyClient != "")
                {
                    // Notify the client of the status change.
                    int    intRequestor = oRequest.GetUser(intRequest);
                    string strComment   = txtComments.Text.Trim();
                    if (strComment != "")
                    {
                        string strBodyComment = "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"3\" border=\"0\" align=\"center\" style=\"border:solid 1px #CCCCCC;" + oVariable.DefaultFontStyle() + "\">";
                        strBodyComment += "<tr bgcolor=\"#EEEEEE\"><td><span style=\"" + oVariable.DefaultFontStyleHeader() + "\">" + oUser.GetFullName(intProfile) + "</span>&nbsp;&nbsp;[" + DateTime.Now.ToString() + "]:</td></tr>";
                        strBodyComment += "<tr><td>" + oFunction.FormatText(strComment) + "</td></tr>";
                        strBodyComment += "</table>";
                        strComment      = strBodyComment;
                    }
                    string strLink    = "<a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResourceParent.ToString()) + "\" target=\"_blank\">Click here to view this request.</a>";
                    string strHeading = "Great news! All previous issues have been resolved and the progression of this task has resumed.";
                    if (strNotifyClient == "On Hold")
                    {
                        strHeading = "An issue has been encountered that is preventing this task from being completed. The request has been placed <b>ON HOLD</b>.";
                    }
                    else if (strNotifyClient == "Alert")
                    {
                        strHeading = "Minor issues have been encountered that are slowing down the progression of this task.  Although still being processed, the service level agreement (SLA) may be exceeded.";
                    }
                    oFunction.SendEmail("Service Request #CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString() + " Notification", oUser.GetName(intRequestor), "", oUser.GetName(intProfile), "Service Request #CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString() + " Notification *" + strNotifyClient + "*", "<p>" + strHeading + "</p><p>" + strComment + "</p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p><p>" + strLink + "</p>", true, false);
                }

                //Send notification to users of associated tasks
                WMServiceTasks oWMServiceTasks     = new WMServiceTasks(intProfile, dsn);
                DataSet        DsWMAssociatedTasks = oWMServiceTasks.getWMServiceTasksStatusRequestWithRequest(intRequest);
                Customized     oCustomized         = new Customized(intProfile, dsn);

                if (DsWMAssociatedTasks.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow drWMAssoicatedTasks in DsWMAssociatedTasks.Tables[0].Rows)
                    {
                        string strWMAssoicatedTasksUser = oUser.GetName(Int32.Parse(drWMAssoicatedTasks["createdBy"].ToString()));
                        string strComment = txtComments.Text.Trim();
                        string strLink    = "<p><a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResourceParent.ToString()) + "\" target=\"_blank\">Click here to view this request.</a></p>";
                        oFunction.SendEmail("Associated Request Updated CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString(), strWMAssoicatedTasksUser, "", "", "Associated Request Updated CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString(), "<p><b>The following associated service request has been updated with following comments...</b></br>" + strComment + "</p>" + strLink + "<p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p>", true, false);
                    }
                }
                //End of Send notification to users of associated tasks
            }

            Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=S&status=true");
        }