Ejemplo n.º 1
0
        private void LoadRequest(int intItem, int intApp)
        {
            int intRequest   = Int32.Parse(Request.QueryString["rid"]);
            int intProject   = oRequest.GetProjectNumber(intRequest);
            int intLead      = 0;
            int intTechnical = 0;

            if (intProject > 0)
            {
                if (oProject.Get(intProject, "lead") != "")
                {
                    intLead = Int32.Parse(oProject.Get(intProject, "lead"));
                }
                if (oProject.Get(intProject, "technical") != "")
                {
                    intTechnical = Int32.Parse(oProject.Get(intProject, "technical"));
                }
            }
            else
            {
                try
                {
                    intLead      = Int32.Parse(oProjectsPending.GetRequest(intRequest, "lead"));
                    intTechnical = Int32.Parse(oProjectsPending.GetRequest(intRequest, "technical"));
                }
                catch { }
            }
            Users oUser = new Users(intProfile, dsn);

            if (intLead > 0)
            {
                txtManager.Text = oUser.GetFullName(intLead) + " (" + oUser.GetName(intLead) + ")";
            }
            if (intTechnical > 0)
            {
                txtEngineer.Text = oUser.GetFullName(intTechnical) + " (" + oUser.GetName(intTechnical) + ")";
            }
            hdnLead.Value      = intLead.ToString();
            hdnTechnical.Value = intTechnical.ToString();
            DataSet dsRequest = oCustomized.GetIISRequests(intRequest);

            if (dsRequest.Tables[0].Rows.Count > 0)
            {
                ddlReason.SelectedValue = dsRequest.Tables[0].Rows[0]["reason"].ToString();
                txtStatement.Text       = dsRequest.Tables[0].Rows[0]["statement"].ToString();
                txtStart.Text           = DateTime.Parse(dsRequest.Tables[0].Rows[0]["start_date"].ToString()).ToShortDateString();
                txtEnd.Text             = DateTime.Parse(dsRequest.Tables[0].Rows[0]["end_date"].ToString()).ToShortDateString();
                bool boolExpedite = (dsRequest.Tables[0].Rows[0]["expedite"].ToString() == "1");
                chkExpedite_Yes.Checked = boolExpedite;
                chkExpedite_No.Checked  = !boolExpedite;
            }
            btnNext.Attributes.Add("onclick", "return ValidateHidden0('" + hdnLead.ClientID + "','" + txtManager.ClientID + "','Please enter the LAN ID of your project coordinator')" +
                                   " && ValidateHidden0('" + hdnTechnical.ClientID + "','" + txtEngineer.ClientID + "','Please enter the LAN ID of your integration engineer')" +
                                   " && ValidateDropDown('" + ddlReason.ClientID + "','Please make a selection for the reason')" +
                                   " && 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')" +
                                   ";");
        }