Example #1
0
        private void LoadInformation(int _request)
        {
            lblView.Text = oEnhancement.GetBody(intID, intEnvironment);
            if (intProject > 0)
            {
                lblName.Text   = oProject.Get(intProject, "name");
                lblNumber.Text = oProject.Get(intProject, "number");
                lblType.Text   = "Project";
            }
            else
            {
                lblName.Text   = oResourceRequest.GetWorkflow(_request, "name");
                lblNumber.Text = "CVT" + intRequest.ToString();
                lblType.Text   = "Task";
            }
            int intMenuTab = 0;

            if (Request.QueryString["menu_tab"] != null && Request.QueryString["menu_tab"] != "")
            {
                intMenuTab = Int32.Parse(Request.QueryString["menu_tab"]);
            }
            Tab oTab = new Tab(hdnTab.ClientID, intMenuTab, "divMenu1", true, false);

            oTab.AddTab("Enhancement Details", "");
            oTab.AddTab("Execution", "");


            int     intStep = 1;
            DataSet dsSteps = oEnhancement.GetSteps(intID, 0, 0);

            if (dsSteps.Tables[0].Rows.Count > 0)
            {
                intStep = Int32.Parse(dsSteps.Tables[0].Rows[0]["step"].ToString());
            }

            intStep = LoadStep(1, intStep, img1, null, tr1, tr1Done, lbl1, dsSteps);
            intStep = LoadStep(2, intStep, img2, tr2Wait, tr2, tr2Done, lbl2, dsSteps);
            intStep = LoadStep(3, intStep, img3, tr3Wait, tr3, tr3Done, lbl3, dsSteps);
            intStep = LoadStep(4, intStep, img4, tr4Wait, tr4, tr4Done, lbl4, dsSteps);
            intStep = LoadStep(5, intStep, img5, tr5Wait, tr5, tr5Done, lbl5, dsSteps);
            intStep = LoadStep(6, intStep, img6, tr6Wait, tr6, tr6Done, lbl6, dsSteps);

            DataSet dsDocuments = oEnhancement.GetDocuments(intID);

            // Step # 1
            switch (intStep)
            {
            case 1:
                btnSave.Attributes.Add("onclick", "return (document.getElementById('" + chk1.ClientID + "').checked == true)" +
                                       " || (document.getElementById('" + chk1.ClientID + "').checked == false" +
                                       " && ValidateText('" + filFunctional.ClientID + "','Select a functional requirement document')" +
                                       " && ValidateNumber0('" + txtDays.ClientID + "','Enter a valid number for the estimated date range')" +
                                       " && ValidateRadioList('" + radEstimate.ClientID + "','Make a selection for your estimated release date')" +
                                       ") && ProcessControlButton() && LoadWait()" +
                                       ";");
                break;

            case 2:
                rptApprovers.DataSource = oEnhancement.GetApprovalResults(intID, intStep);
                rptApprovers.DataBind();
                lblApprovers.Visible = (rptApprovers.Items.Count == 0);
                btnApprovalGroup.Attributes.Add("onclick", "return OpenWindow('ENHANCEMENT_APPROVAL_GROUPS','?enhancementid=" + intID.ToString() + "&step=" + intStep.ToString() + "');");
                break;

            case 3:
                if (dsDocuments.Tables[0].Rows.Count > 0)
                {
                    lblEstimate.Text = dsDocuments.Tables[0].Rows[0]["release"].ToString();
                }
                ;
                radEstimateYes.Attributes.Add("onclick", "ShowHideDiv('" + divEstimate.ClientID + "','none');");
                radEstimateNo.Attributes.Add("onclick", "ShowHideDiv('" + divEstimate.ClientID + "','inline');");
                btnSave.Attributes.Add("onclick", "return ValidateRadioButtons('" + radEstimateYes.ClientID + "','" + radEstimateNo.ClientID + "','Select whether or not the estimated release date is OK')" +
                                       " && (document.getElementById('" + radEstimateYes.ClientID + "').checked == true || (document.getElementById('" + radEstimateNo.ClientID + "').checked == true && ValidateRadioList('" + radRelease.ClientID + "','Make a selection for your estimated release date')))" +
                                       " && ProcessControlButton() && LoadWait()" +
                                       ";");
                break;
            }

            strMessages = oEnhancement.GetMessages(intID, false, "#E1FFE1");
            oTab.AddTab("Message Thread (" + oEnhancement.GetMessages(intID).Tables[0].Rows.Count.ToString() + ")", "");

            rptDocuments.DataSource = dsDocuments;
            rptDocuments.DataBind();
            lblDocuments.Visible = (rptDocuments.Items.Count == 0);
            foreach (RepeaterItem ri in rptDocuments.Items)
            {
                LinkButton _delete = (LinkButton)ri.FindControl("btnDeleteDocument");
                _delete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this document?');");
            }
            oTab.AddTab("Functional Requirements Documentation (" + rptDocuments.Items.Count.ToString() + ")", "");
            oTab.AddTab("Log (" + oEnhancement.LoadLog(intID, rptLog, lblLog) + ")", "");
            oTab.AddTab("Release Notes", "");
            strMenuTab1 = oTab.GetTabs();
        }