protected void btnFavorite_Click(Object Sender, EventArgs e) { int intRequest = 0; if (intRequest == 0) { intRequest = oRequest.Add(-1, intProfile); oServiceRequest.Add(intRequest, 1, -2); } string strHidden = Request.Form[hdnService.UniqueID]; while (strHidden != "") { string strField = strHidden.Substring(0, strHidden.IndexOf("&")); strHidden = strHidden.Substring(strHidden.IndexOf("&") + 1); string strFlag = strField.Substring(strField.IndexOf("_") + 1); strField = strField.Substring(0, strField.IndexOf("_")); if (strFlag == "1") { oService.AddSelected(intRequest, Int32.Parse(strField), 1); } } oServiceRequest.Update(intRequest, -1); Response.Redirect(oPage.GetFullLink(intViewRequest) + "?rid=" + intRequest.ToString()); }
public void AD_Mismatched_Accounts() { Requests oRequest = new Requests(0, dsn); Projects oProject = new Projects(0, dsn); ServiceRequests oServiceRequest = new ServiceRequests(0, dsn); int intRequest = 28815; if (oServiceRequest.Get(intRequest).Tables[0].Rows.Count == 0) { oServiceRequest.Add(intRequest, 1, 1); } double dblHours = 0.00; if (intEnvironment == 4) { dblHours += CompareDomainAccounts(2, 4, "X", 0, intRequest); dblHours += CompareDomainAccounts(3, 4, "X", 0, intRequest); } else { dblHours += CompareDomainAccounts(2, 3, "T", 0, intRequest); } double dblTime = 5.00 / 60.00; double dblDevices = dblHours / dblTime; dblDevices = Math.Round(dblDevices); int intDevices = Int32.Parse(dblDevices.ToString()); int intResource = oServiceRequest.AddRequest(intRequest, intRemediationItem, 0, intDevices, dblHours, 2, 1, dsnServiceEditor); oServiceRequest.NotifyTeamLead(intRemediationItem, intResource, intAssignPage, intViewPage, intEnvironment, "", dsnServiceEditor, dsnAsset, dsnIP, 0); }
protected void btnSave_Click(Object Sender, EventArgs e) { oVariables = new Variables(intEnvironment); string strVirtualPath = ""; if (fileUpload.FileName != "" && fileUpload.PostedFile != null) { string strExtension = fileUpload.FileName; string strType = strExtension.Substring(0, 3); strExtension = strExtension.Substring(strExtension.LastIndexOf(".")); string strFile = DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + "_" + intProfile.ToString() + strExtension; strVirtualPath = oVariables.UploadsFolder() + strFile; string strPath = oVariables.UploadsFolder() + strFile; fileUpload.PostedFile.SaveAs(strPath); } intRequest = oRequest.AddTask(0, intProfile, txtDescription.Text, DateTime.Now, DateTime.Now); intItemID = oService.GetItemId(intService); int intResource = oServiceRequest.AddRequest(intRequest, intItemID, intService, 0, 0.00, 2, 2, dsnServiceEditor); oServiceRequest.Update(intRequest, txtTitle.Text); oResourceRequest.UpdateName(intResource, txtTitle.Text); oServiceRequest.Add(intRequest, 1, 1); oCustomized.AddIssue(intRequest, txtTitle.Text, txtDescription.Text, Int32.Parse(drpModules.SelectedValue), Int32.Parse(txtNumUsers.Text == "" ? "0" : txtNumUsers.Text), txtURL.Text, strVirtualPath, intProfile, 0); if (oServiceRequest.NotifyApproval(intResource, intResourceRequestApprove, intEnvironment, "", dsnServiceEditor) == false) { oServiceRequest.NotifyTeamLead(intItemID, intResource, intAssignPage, intViewPage, intEnvironment, "", dsnServiceEditor, dsnAsset, dsnIP, 0); } Response.Redirect(oPage.GetFullLinkRelated(intPage)); }
protected void Page_Load(object sender, EventArgs e) { Services oService = new Services(intProfile, dsn); Requests oRequest = new Requests(intProfile, dsn); if (Int32.TryParse(Request.Cookies["profileid"].Value, out intProfile) == true) { int intService = 0; if (Int32.TryParse(Request.Cookies["sid"].Value, out intService) == true) { int intProject = 0; Int32.TryParse(Request.Cookies["pid"].Value, out intProject); int intRequest = 0; Int32.TryParse(Request.Cookies["rid"].Value, out intRequest); int intNewRequest = 0; if (intRequest == 0) { if (oService.Get(intService, "project") == "1" && intProject == 0) { Response.Write("Service " + oService.GetName(intService).ToUpper() + " requires a project. Please specify a projectid (pid=) or a requestid (rid=)"); } else { intNewRequest = oRequest.Add((intProject == 0 ? -1 : intProject), intProfile); } } else { DataSet dsR = oRequest.Get(intRequest); if (dsR.Tables[0].Rows.Count > 0) { intProject = Int32.Parse(dsR.Tables[0].Rows[0]["projectid"].ToString()); intNewRequest = oRequest.Add(intProject, intProfile); } } if (intNewRequest > 0) { string strQ = Request.QueryString["q"]; ServiceRequests oServiceRequest = new ServiceRequests(intProfile, dsn); RequestItems oRequestItem = new RequestItems(intProfile, dsn); Pages oPage = new Pages(intProfile, dsn); oServiceRequest.Add(intNewRequest, 1, 0); oService.AddSelected(intNewRequest, intService, 1); int intItem = oService.GetItemId(intService); oRequestItem.AddForm(intNewRequest, intItem, intService, 1); Response.Redirect(oPage.GetFullLink(intResourceRequest) + "?rid=" + intNewRequest.ToString() + "&q=" + strQ); } } } else { Response.Redirect("/redirect.aspx?referrer=" + Request.Url.PathAndQuery); } }
private void Start(bool _schedule) { intRequest = oForecast.GetRequestID(intID, true); oForecast.UpdateAnswer(intID, intRequest); oForecast.DeleteReset(intID); oServiceRequest.Add(intRequest, 1, 1); oForecast.UpdateAnswerExecuted(intID, DateTime.Now.ToString(), intProfile); oWorkstation.StartVirtual(intRequest, dsnRemote, dsnAsset, intEnvironment, dsnZeus); Response.Redirect(Request.Path + "?rid=" + intRequest); }
protected void btnSave_Click(Object Sender, EventArgs e) { intRequest = oRequest.Add(0, intProfile); int intItemID = oService.GetItemId(intService); int intResource = oServiceRequest.AddRequest(intRequest, intItemID, intService, 0, 0.00, (int)EnhancementStatus.UnderReview, 1, dsnServiceEditor); oServiceRequest.Update(intRequest, txtTitle.Text); oResourceRequest.UpdateName(intResource, txtTitle.Text); oServiceRequest.Add(intRequest, 1, 1); intID = oEnhancement.Add(txtTitle.Text, txtDescription.Text, Int32.Parse(ddlUsers.SelectedItem.Value), txtURL.Text, fileUpload, intEnvironment, Int32.Parse(radRelease1.SelectedItem.Value), Int32.Parse(radRelease2.SelectedItem.Value), intProfile, intResource); if (oServiceRequest.NotifyApproval(intResource, intResourceRequestApprove, intEnvironment, "", dsnServiceEditor) == false) { oServiceRequest.NotifyTeamLead(intItemID, intResource, intAssignPage, intViewPage, intEnvironment, "", dsnServiceEditor, dsnAsset, dsnIP, 0); } oEnhancement.AddLog(intID, 0, "Submitted Original Enhancement", intProfile, ""); Response.Redirect(oPage.GetFullLinkRelated(intPage)); }
protected void InitiateAddStorageWorkOrder() { ServiceDetails oServiceDetail = new ServiceDetails(intProfile, dsn); int intRequest = Int32.Parse(hdnRequestId.Value); int intServiceId = 0; intServiceId = Int32.Parse(ConfigurationManager.AppSettings["SERVICEID_ASSET_SHARED_ENV_ADD_STORAGE"]); string strServerTitle = "Inventory Management - Shared Environment Add Storage"; int intItemID = oService.GetItemId(intServiceId); int intNumber = 1; double dblServiceHours = oServiceDetail.GetHours(intServiceId, 1); int intResource = oServiceRequest.AddRequest(intRequest, intItemID, intServiceId, 1, dblServiceHours, 2, intNumber, dsnServiceEditor); oServiceRequest.Update(intRequest, strServerTitle); oResourceRequest.UpdateName(intResource, strServerTitle); oServiceRequest.Add(intRequest, 1, 1); }
protected void btnContinue_Click(Object Sender, EventArgs e) { DataSet dsToday = oForecast.GetAnswersDay(intWorkstationPlatform, intProfile, 1); int intQuantity = 0; foreach (DataRow drToday in dsToday.Tables[0].Rows) { intQuantity += Int32.Parse(drToday["quantity"].ToString()); } int intTotal = Int32.Parse(txtQuantity.Text) + intQuantity; if (intTotal <= intMaxWorkstationsPerDay) { // Add Answer int intAnswer = oForecast.AddAnswer(0, intWorkstationPlatform, 0, intProfile); oForecast.UpdateAnswerStep(intAnswer, 1, 1); int intRequest = oRequest.Add(0, intProfile); oServiceRequest.Add(intRequest, 1, 1); oForecast.UpdateAnswerService(intAnswer, intRequest); int intClass = 0; DataSet dsClasses = oClass.Gets(1); foreach (DataRow drClass in dsClasses.Tables[0].Rows) { if (drClass["prod"].ToString() == "1" && drClass["pnc"].ToString() != "1") { intClass = Int32.Parse(drClass["id"].ToString()); break; } } oForecast.UpdateAnswer(intAnswer, 0, 0, "", 0, Request.ServerVariables["REMOTE_HOST"], "", "", Int32.Parse(Request.Form[hdnParent.UniqueID]), intClass, 0, intCore, 0, 0, 0, Int32.Parse(txtQuantity.Text), 0); // Add Model oForecast.UpdateAnswerModel(intAnswer, intModelVirtual); oForecast.DeleteWorkstation(intAnswer); oForecast.AddWorkstation(intAnswer, Int32.Parse(ddlRam.SelectedItem.Value), Int32.Parse(ddlOS.SelectedItem.Value), 0, 0, Int32.Parse(ddlHardDrive.SelectedItem.Value), Int32.Parse(ddlCPU.SelectedItem.Value)); oForecast.UpdateAnswerStep(intAnswer, 1, 1); // Add Commitment Date oForecast.UpdateAnswer(intAnswer, DateTime.Today, intConfidence, intProfile); oForecast.UpdateAnswerStep(intAnswer, 1, 1); Response.Redirect(oPage.GetFullLink(intPage) + "?rid=" + intRequest.ToString()); } else { Response.Redirect(oPage.GetFullLink(intPage) + "?create=true&qty=" + intQuantity.ToString()); } }
private void Start(bool _schedule) { oForecast.UpdateAnswerChange(intID, txtChange.Text); intRequest = oForecast.GetRequestID(intID, true); oForecast.UpdateAnswer(intID, intRequest); oForecast.DeleteReset(intID); oServiceRequest.Add(intRequest, 1, 1); oForecast.UpdateAnswerExecuted(intID, DateTime.Now.ToString(), intProfile); int intModel = oForecast.GetModelAsset(intID); if (intModel == 0) { intModel = oForecast.GetModel(intID); } if (oForecast.CanAutoProvision(intID) == true) { // Only start the build for auto-provision enabled servers oServer.Start(intRequest); } else { // Else set the step = 999 DataSet dsServers = oServer.GetAnswer(intID); foreach (DataRow drServer in dsServers.Tables[0].Rows) { oServer.UpdateStep(Int32.Parse(drServer["id"].ToString()), 999); } } bool boolNotify = oForecast.NotifyImplementor(intID, intModel, intImplementorDistributed, intWorkstationPlatform, intImplementorMidrange, intEnvironment, intProfile, dsnAsset, dsnIP); if (_schedule == true) { Response.Redirect(Request.Path + "?rid=" + intRequest); } else if (oForecast.CanAutoProvision(intID) == true) { Response.Redirect(Request.Path + "?rid=" + intRequest + "¬ify=none"); } else { Response.Redirect(Request.Path + "?rid=" + intRequest + "¬ify=" + (boolNotify ? "true" : "false")); } }
private void Start(bool _schedule) { bool boolVMware = (lblVMware.Text == "1"); intRequest = oForecast.GetRequestID(intID, true); oForecast.UpdateAnswer(intID, intRequest); oForecast.DeleteReset(intID); oServiceRequest.Add(intRequest, 1, 1); oForecast.UpdateAnswerExecuted(intID, DateTime.Now.ToString(), intProfile); if (boolVMware == true) { oWorkstation.StartVirtual(intRequest); } else { oWorkstation.StartVirtual(intRequest, dsnRemote, dsnAsset, intEnvironment, dsnZeus); } int intModel = oForecast.GetModelAsset(intID); if (intModel == 0) { intModel = oForecast.GetModel(intID); } bool boolNotify = oForecast.NotifyImplementor(intID, intModel, intImplementorDistributed, intWorkstationPlatform, intImplementorMidrange, intEnvironment, intProfile, dsnAsset, dsnIP); if (_schedule == true) { Response.Redirect(Request.Path + "?rid=" + intRequest); } else if (oForecast.CanAutoProvision(intID) == true) { Response.Redirect(Request.Path + "?rid=" + intRequest + "¬ify=none"); } else { Response.Redirect(Request.Path + "?rid=" + intRequest + "¬ify=" + (boolNotify ? "true" : "false")); } }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/projects_pending.aspx"; Response.Cookies["loginreferrer"].Expires = DateTime.Now.AddDays(30); if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Response.Redirect("/admin/login.aspx"); } oProject = new Projects(intProfile, dsn); oProjectNumber = new ProjectNumber(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oRequestItem = new RequestItems(intProfile, dsn); oService = new Services(intProfile, dsn); oProjectPending = new ProjectsPending(intProfile, dsn, intEnvironment); oOrganization = new Organizations(intProfile, dsn); oDocument = new Documents(intProfile, dsn); oUser = new Users(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); if (!IsPostBack) { if (Request.QueryString["rid"] != null && Request.QueryString["rid"] != "") { // Process Service Requests int intRequest = Int32.Parse(Request.QueryString["rid"]); DataSet dsForm = oRequestItem.GetForms(intRequest); foreach (DataRow drForm in dsForm.Tables[0].Rows) { if (drForm["done"].ToString() == "0") { int intItem = Int32.Parse(drForm["itemid"].ToString()); int intNumber = Int32.Parse(drForm["number"].ToString()); int intService = Int32.Parse(drForm["serviceid"].ToString()); string strPath = oService.Get(intService, "cp_path"); if (strPath.Trim() == "") { // For now, bypass oRequestItem.UpdateFormDone(intRequest, intItem, intNumber, 1); } else { Control oControl = (Control)LoadControl(strPath); PHcp.Controls.Add(oControl); } } } panPH.Visible = true; } else if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { DataSet ds = oProjectPending.Get(Int32.Parse(Request.QueryString["id"])); int intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); if (Request.QueryString["pid"] != null && Request.QueryString["pid"] != "") { int intProject = Int32.Parse(Request.QueryString["pid"]); if (intProject > 0) { // Process Design Builder DataSet dsForecast = oForecast.GetRequest(intRequest); if (dsForecast.Tables[0].Rows.Count > 0) { int intForecast = Int32.Parse(dsForecast.Tables[0].Rows[0]["id"].ToString()); DataSet dsDesigns = oForecast.GetAnswers(intForecast); OnDemandTasks oOnDemandTasks = new OnDemandTasks(0, dsn); ResourceRequest oResourceRequest = new ResourceRequest(0, dsn); foreach (DataRow drDesign in dsDesigns.Tables[0].Rows) { int intDesign = Int32.Parse(drDesign["id"].ToString()); int intDesignRequest = 0; if (Int32.TryParse(oForecast.GetAnswer(intDesign, "requestid"), out intDesignRequest) == true) { if (intDesignRequest > 0) { // Update the REQUESTID in CV_FORECAST_ANSWERS with the new project correlation oRequest.Update(intDesignRequest, intProject); } } if (oForecast.CanAutoProvision(intDesign) == false) { // Need to add a builder int intImplementorD = 0; DataSet dsResourceD = oResourceRequest.GetProjectItem(intProject, intImplementorDistributed); if (dsResourceD.Tables[0].Rows.Count > 0) { intImplementorD = Int32.Parse(dsResourceD.Tables[0].Rows[0]["userid"].ToString()); } int intImplementorM = 0; DataSet dsResourceM = oResourceRequest.GetProjectItem(intProject, intImplementorMidrange); if (dsResourceM.Tables[0].Rows.Count > 0) { intImplementorM = Int32.Parse(dsResourceM.Tables[0].Rows[0]["userid"].ToString()); } if (oForecast.GetPlatformDistributedForecast(intDesign, intWorkstationPlatform) == true) { if (intImplementorD > 0) { int intNextNumber = oResourceRequest.GetNumber(intRequest); int intResourceParent = oResourceRequest.Add(intRequest, -1, -1, intNextNumber, "Provisioning Task (Distributed)", 0, 6.00, 2, 1, 1, 1); int intResourceWorkflow = oResourceRequest.AddWorkflow(intResourceParent, 0, "Provisioning Task (Distributed)", intImplementorD, 0, 6.00, 2, 0); oOnDemandTasks.AddPending(intDesign, intResourceWorkflow); oResourceRequest.UpdateAssignedBy(intResourceParent, -999); } else { // Submit for assignment if (oServiceRequest.Get(intRequest, "requestid") == "") { oServiceRequest.Add(intRequest, 1, 1); } int intResource = oServiceRequest.AddRequest(intRequest, intImplementorDistributed, intImplementorDistributedService, 0, 0.00, 2, 1, dsnServiceEditor); if (oServiceRequest.NotifyApproval(intResource, intResourceRequestApprove, intEnvironment, "", dsnServiceEditor) == false) { oServiceRequest.NotifyTeamLead(intImplementorDistributed, intResource, intAssignPage, intViewPage, intEnvironment, "", dsnServiceEditor, dsnAsset, dsnIP, 0); } } } if (oForecast.GetPlatformMidrangeForecast(intDesign) == true) { if (intImplementorM > 0) { int intNextNumber = oResourceRequest.GetNumber(intRequest); int intResourceParent = oResourceRequest.Add(intRequest, -1, -1, intNextNumber, "Provisioning Task (Midrange)", 0, 6.00, 2, 1, 1, 1); int intResourceWorkflow = oResourceRequest.AddWorkflow(intResourceParent, 0, "Provisioning Task (Midrange)", intImplementorM, 0, 6.00, 2, 0); oOnDemandTasks.AddPending(intDesign, intResourceWorkflow); oResourceRequest.UpdateAssignedBy(intResourceParent, -999); } else { // Submit for assignment if (oServiceRequest.Get(intRequest, "requestid") == "") { oServiceRequest.Add(intRequest, 1, 1); } int intResource = oServiceRequest.AddRequest(intRequest, intImplementorMidrange, intImplementorMidrangeService, 0, 0.00, 2, 1, dsnServiceEditor); if (oServiceRequest.NotifyApproval(intResource, intResourceRequestApprove, intEnvironment, "", dsnServiceEditor) == false) { oServiceRequest.NotifyTeamLead(intImplementorMidrange, intResource, intAssignPage, intViewPage, intEnvironment, "", dsnServiceEditor, dsnAsset, dsnIP, 0); } } } } } } } oRequest.Update(intRequest, intProject); oDocument.Update(intRequest, intProject); oProjectPending.Approve(Int32.Parse(Request.QueryString["id"])); if (intProject == 0) { oServiceRequest.Update(intRequest, ds.Tables[0].Rows[0]["name"].ToString()); } Response.Redirect(Request.Path + "?rid=" + intRequest.ToString()); } else { if (Request.QueryString["reject"] != null) { panReject.Visible = true; } else { strProject = LoadProject(0, ds.Tables[0].Rows[0], intRequest, true); btnView.Attributes.Add("onclick", "return ShowServiceRequests('" + intRequest.ToString() + "');"); btnViewDesigns.Attributes.Add("onclick", "return ShowDesigns('" + intRequest.ToString() + "');"); if (Request.QueryString["c"] != null && Request.QueryString["c"] != "") { panCompare.Visible = true; string[] strProjects; char[] strSplit = { ' ' }; strProjects = Request.QueryString["c"].Split(strSplit); bool boolOther = false; for (int jj = 0; jj < strProjects.Length; jj++) { if (strProjects[jj].Trim() != "") { TableRow oRow = new TableRow(); TableCell oCell = new TableCell(); oCell.Text = strProject; oRow.Cells.Add(oCell); oCell = new TableCell(); HyperLink oCheck = new HyperLink(); oCheck.ImageUrl = "/images/bigCheck.gif"; oCheck.ToolTip = "Click to Assign"; oCheck.NavigateUrl = Request.Path + "?id=" + Request.QueryString["id"] + "&pid=" + strProjects[jj]; oCheck.Attributes.Add("onclick", "return confirm('Are you sure you want to assign this project?');"); oCell.Controls.Add(oCheck); oRow.Cells.Add(oCell); oCell = new TableCell(); oCell.Text = LoadProject(Int32.Parse(strProjects[jj]), null, 0, false); if (boolOther == true) { oRow.Attributes.Add("bgcolor", "#EFEFEF"); } boolOther = !boolOther; oRow.Cells.Add(oCell); tblCompare.Rows.Add(oRow); } } } else { panView.Visible = true; LoadList(); } } } } else { panAll.Visible = true; DataSet ds = oProjectPending.Gets(); rptView.DataSource = ds; rptView.DataBind(); } } btnCreateProject.Attributes.Add("onclick", "return confirm('Are you sure you want to create this PROJECT?');"); btnCreateTask.Attributes.Add("onclick", "return confirm('Are you sure you want to create this TASK?');"); btnCreateTask.Enabled = false; btnRejectConfirm.Attributes.Add("onclick", "return confirm('Are you sure you want to reject this project / task?');"); }
protected void btnSubmit_Click(Object Sender, EventArgs e) { int intSegment = 0; if (Request.Form[hdnSegment.UniqueID] != "") { intSegment = Int32.Parse(Request.Form[hdnSegment.UniqueID]); } oUser = new Users(intProfile, dsn); if (ddlBaseDisc.SelectedItem.Text == "Base") { bool boolDuplicate = false; bool boolInvalid = false; DataSet dsRequest; if (txtClarityNumber.Text.Trim() != "") { if (txtClarityNumber.Text.Trim().ToUpper().StartsWith("CV")) { lblInvalid.Visible = true; boolInvalid = true; } ds = oProjectRequest.GetProjectNumber(txtClarityNumber.Text); if (ds.Tables[0].Rows.Count > 0) { lblDuplicate.Text = "A project request already exists with the clarity number <b>" + txtClarityNumber.Text + "</b>"; boolDuplicate = true; } } if (boolDuplicate == false) { ds = oProjectRequest.GetProjectName(txtProjectTask.Text); if (ds.Tables[0].Rows.Count > 0) { lblDuplicate.Text = "A project request already exists with the name <b>" + txtProjectTask.Text + "</b>"; boolDuplicate = true; } } if (boolInvalid == false) { if (boolDuplicate == false) { int intProject = oProject.Add(txtProjectTask.Text, ddlBaseDisc.SelectedItem.Text, txtClarityNumber.Text, intProfile, Int32.Parse(ddlOrganization.SelectedItem.Value), intSegment, 0); Response.Redirect(oPage.GetFullLink(intPage) + "?pid=" + intProject.ToString()); } else { int intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); int intProject = oRequest.GetProjectNumber(intRequest); lblDetails.Text = "<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\">"; lblDetails.Text += "<tr><td nowrap><b>Project Name:</b> </td><td width=\"100%\">" + oProject.Get(intProject, "name") + "</td></tr>"; dsRequest = oProjectRequest.GetProject(intProject); lblDetails.Text += "<tr><td nowrap><b>Working Sponsor:</b> </td><td width=\"100%\">" + oUser.GetFullName(Int32.Parse(dsRequest.Tables[0].Rows[0]["working"].ToString())) + "</td></tr>"; lblDetails.Text += "<tr><td nowrap><b>Executive Sponsor:</b> </td><td width=\"100%\">" + oUser.GetFullName(Int32.Parse(dsRequest.Tables[0].Rows[0]["executive"].ToString())) + "</td></tr>"; lblDetails.Text += "<tr><td colspan=\"2\"> </td></tr>"; lblDetails.Text += "<tr><td colspan=\"2\">Please contact the working or executive sponsor for details regarding this initiative.</td></tr>"; lblDetails.Text += "</table>"; panIntro.Visible = false; panDuplicate.Visible = true; } } } else { // Show Discretionary is not configured panIntro.Visible = false; panDiscretionary.Visible = true; lnkDiscretionary.NavigateUrl = oPage.GetFullLink(intResourceRequestPage); // Add A new service request int intProject = 0; if (txtClarityNumber.Text.Trim() != "") { ds = oProject.Get(txtClarityNumber.Text); if (ds.Tables[0].Rows.Count > 0) { intProject = Int32.Parse(ds.Tables[0].Rows[0]["projectid"].ToString()); } } if (intProject == 0) { ds = oProject.GetName(txtProjectTask.Text); if (ds.Tables[0].Rows.Count > 0) { intProject = Int32.Parse(ds.Tables[0].Rows[0]["projectid"].ToString()); } } if (intProject == 0) { intProject = oProject.Add(txtProjectTask.Text, ddlBaseDisc.SelectedItem.Text, txtClarityNumber.Text, intProfile, Int32.Parse(ddlOrganization.SelectedItem.Value), intSegment, 1); } if (intProject > 0) { int intRequest = oRequest.Add(intProject, intProfile); ServiceRequests oServiceRequest = new ServiceRequests(intProfile, dsn); oServiceRequest.Add(intRequest, 1, -2); Response.Redirect(oPage.GetFullLink(intResourceRequestPage) + "?rid=" + intRequest); } // Send to Service Request Page Response.Redirect(oPage.GetFullLink(intResourceRequestPage)); } }