protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/request_items.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"); } oRequestItem = new RequestItems(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oUser = new Users(intProfile, dsn); oPlatform = new Platforms(intProfile, dsn); if (!IsPostBack) { LoadList(); LoadApplications(0); btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnParent.ClientID + "','" + hdnOrder.ClientID + "&type=ITEMS" + "',false,400,400);"); btnImage.Attributes.Add("onclick", "return OpenWindow('IMAGEPATH','','" + txtImage.ClientID + "',false,500,550);"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this resource request item?');"); btnCancel.Attributes.Add("onclick", "return Cancel();"); btnParent.Attributes.Add("onclick", "return OpenWindow('APPLICATIONBROWSER','" + hdnParent.ClientID + "','&control=" + hdnParent.ClientID + "&controltext=" + lblParent.ClientID + "',false,400,600);"); btnTabs.Attributes.Add("onclick", "return OpenWindow('WORKLOAD_MGR_TAB','" + hdnId.ClientID + "','',false,400,400);"); btnTaskTabs.Attributes.Add("onclick", "return OpenWindow('WORKLOAD_MGR_TAB','" + hdnId.ClientID + "','&tab=TT',false,400,400);"); } }
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(); } oRequestItem = new RequestItems(intProfile, dsn); oApplication = new Applications(intProfile, dsn); 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 Item','" + txtName.ClientID + "');"); btnSave.Attributes.Add("onclick", "return Update('" + hdnId.ClientID + "','" + strControl + "','" + txtName.ClientID + "','" + strControlText + "');"); btnClose.Attributes.Add("onclick", "return HidePanel();"); LoadTree(); }
public void GetItemsKatalog(string connectionString, RequestItems req) { using (SqlConnection connection = new SqlConnection(connectionString)) { Items = new List <ITEM>(); string sqlExpression = @"SELECT itm.ID_ITEM, itm.NAME_ITEM, itm.NOTE_ITEM, itm.IMG_URL, kat.ID_KATEGOR FROM SPAVREMONT.ITEM itm JOIN SPAVREMONT.ITEM_KATEGOR itk ON itk.ID_ITEM=itm.ID_ITEM JOIN SPAVREMONT.KATEGOR kat ON itk.ID_KATEGOR=kat.ID_KATEGOR WHERE 1=1 AND kat.ID_KATEGOR='" + req.id_kategor + @"' "; connection.Open(); SqlCommand command = new SqlCommand(); command.CommandText = sqlExpression; command.Connection = connection; SqlDataReader reader = command.ExecuteReader(); if (reader.HasRows) // если есть данные { int itmID_ITEMIndex = reader.GetOrdinal("ID_ITEM"); int itmNAME_ITEMIndex = reader.GetOrdinal("NAME_ITEM"); int itmNOTE_ITEMIndex = reader.GetOrdinal("NOTE_ITEM"); int itmIMG_URLIndex = reader.GetOrdinal("IMG_URL"); int katID_KATEGORIndex = reader.GetOrdinal("ID_KATEGOR"); while (reader.Read()) // построчно считываем данные { ITEM Item = new ITEM { ID_ITEM = reader.GetString(itmID_ITEMIndex), IMG_URL = reader.GetString(itmIMG_URLIndex), NAME_ITEM = reader.GetString(itmNAME_ITEMIndex), NOTE_ITEM = reader.GetString(itmNOTE_ITEMIndex) }; //KATEGOR kategor = new KATEGOR //{ // ID_KATEGOR = reader.GetString(katID_KATEGORIndex) //}; Items.Add(Item); } } //return shops; } }
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); oRestart = new Restart(intProfile, dsn); oRequest = new Requests(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(); } btnNext.Attributes.Add("onclick", "return ValidateDropDown('" + ddlDevice.ClientID + "','Please select a device')" + ";"); } 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); oRequest = new Requests(0, dsn); oResourceRequest = new ResourceRequest(0, dsn); oRequestItem = new RequestItems(intProfile, dsn); oService = new Services(0, dsn); oUser = new Users(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oApplication = new Applications(intProfile, dsn); oProject = new Projects(intProfile, dsn); oProjectsPending = new ProjectsPending(intProfile, dsn, intEnvironment); oVariable = new Variables(intEnvironment); oPage = new Pages(intProfile, dsn); oServiceEditor = new ServiceEditor(intProfile, dsnServiceEditor); if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } if (Request.QueryString["rrid"] != null && Request.QueryString["rrid"] != "") { intRRId = Int32.Parse(Request.QueryString["rrid"]); } getReturningRequestDetails(); btnSave.Attributes.Add("onclick", "return ValidateText('" + txtComments.ClientID + "','Please enter comment for returning request') && AlertMessage('This action might take a few seconds to complete...\\n\\nPlease be patient and wait for the window to finish processing...') && ProcessButton(this);"); //btnSave.Attributes.Add("onclick", "parent.HidePanel();"); }
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); oGroupRequest = new GroupRequest(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oDomain = new Domains(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 + "');"); } if (Request.QueryString["g"] != null && Request.QueryString["g"] != "" && Request.QueryString["d"] != null && Request.QueryString["d"] != "") { if (!IsPostBack) { LoadObjects(); } btnNext.Attributes.Add("onclick", "return ValidateText('" + txtTo.ClientID + "','Please enter a group name')" + " && EnsureGroupScope('" + radDLG.ClientID + "','" + radGG.ClientID + "','" + radUG.ClientID + "')" + " && EnsureGroupType('" + radS.ClientID + "','" + radD.ClientID + "')" + ";"); } else { btnNext.Enabled = false; } btnContinue.Attributes.Add("onclick", "return ValidateText('" + txtFrom.ClientID + "','Please enter a group name')" + " && ValidateDropDown('" + ddlDomain.ClientID + "','Please select a domain')" + ";"); } btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');"); }
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();"); }
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?');"); }
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); } }
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 + "');"); }
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?');"); }
public object Any(RequestItems request) { if (!Request.Items.ContainsKey("_DataSetAtPreRequestFilters")) throw new InvalidOperationException("DataSetAtPreRequestFilters missing."); if (!Request.Items.ContainsKey("_DataSetAtRequestFilters")) throw new InvalidOperationException("DataSetAtRequestFilters data missing."); return new RequestItemsResponse { Result = "MissionSuccess" }; }
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?');"); }
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?');"); }
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?');"); }
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); oWorkstation = new Workstations(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oUser = new Users(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(); int intItem = Int32.Parse(lblItem.Text); int intService = Int32.Parse(lblService.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 + "');"); } if (Request.QueryString["n"] != null && Request.QueryString["n"] != "") { if (!IsPostBack) { LoadWorkstation(); } } else if (Request.QueryString["formid"] == null || Request.QueryString["formid"] == "") { btnNext.Enabled = false; } btnContinue.Attributes.Add("onclick", "return ValidateText('" + txtName.ClientID + "','Please enter a workstation name') && ProcessButton(this) && LoadWait();"); } btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');"); imgDate.Attributes.Add("onclick", "return ShowCalendar('" + txtDate.ClientID + "');"); }
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); oAccountRequest = new AccountRequest(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oDomain = new Domains(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 (Request.QueryString["invalid"] != null && Request.QueryString["invalid"] != "") { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">alert('The user account could not be found.\\n\\nPlease enter a valid account to continue.');<" + "/" + "script>"); } if (!IsPostBack) { LoadLists(); } LoadValues(); btnNext.Attributes.Add("onclick", "return ValidateText('" + txtUser.ClientID + "','Please enter a user ID')" + " && ValidateDropDown('" + ddlDomain.ClientID + "','Please select a domain')" + " && ValidateText('" + txtPassword1.ClientID + "','Please enter a password')" + " && ValidateText('" + txtPassword2.ClientID + "','Please confirm the password')" + " && EnsurePassword('" + txtPassword1.ClientID + "','" + txtPassword2.ClientID + "')" + " && ValidatePassword('" + txtPassword1.ClientID + "','Your password does not meet the following conditions\\n\\n- Must be at least 6 characters long\\n- Must contain at least one number')" + ";"); 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) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPage = new Pages(intProfile, dsn); oRequestItem = new RequestItems(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oGroupRequest = new GroupRequest(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oDomain = new Domains(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 (Request.QueryString["invalid"] != null && Request.QueryString["invalid"] != "") { Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "saved", "<script type=\"text/javascript\">alert('A group with this name already exists.\\n\\nPlease enter a valid group name to continue.');<" + "/" + "script>"); } 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 + "');"); } btnNext.Attributes.Add("onclick", "return ValidateText('" + txtGroup.ClientID + "','Please enter a group name')" + " && ValidateDropDown('" + ddlDomain.ClientID + "','Please select a domain')" + " && EnsureGroupScope('" + radDLG.ClientID + "','" + radGG.ClientID + "','" + radUG.ClientID + "')" + " && EnsureGroupType('" + radS.ClientID + "','" + radD.ClientID + "')" + ";"); } btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');"); }
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?');"); }
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?');"); }
/// <summary>Anies the given request.</summary> /// /// <exception cref="InvalidOperationException">Thrown when the requested operation is invalid.</exception> /// /// <param name="request">The request.</param> /// /// <returns>An object.</returns> public object Any(RequestItems request) { if (!Request.Items.ContainsKey("_DataSetAtPreRequestFilters")) { throw new InvalidOperationException("DataSetAtPreRequestFilters missing."); } if (!Request.Items.ContainsKey("_DataSetAtRequestFilters")) { throw new InvalidOperationException("DataSetAtRequestFilters data missing."); } return(new RequestItemsResponse { Result = "MissionSuccess" }); }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/services_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"); } oService = new Services(intProfile, dsn); oServiceEditor = new ServiceEditor(intProfile, dsn); oRequestItem = new RequestItems(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oUser = new Users(intProfile, dsn); if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intService = Int32.Parse(Request.QueryString["id"]); panView.Visible = true; if (!IsPostBack) { LoadServices(0); lblName.Text = oService.GetName(intService); int intItem = oService.GetItemId(intService); lblItem.Text = oRequestItem.GetItemName(intItem); lblApplication.Text = oApplication.GetName(oRequestItem.GetItemApplication(intItem)); DataSet ds = oService.GetUser(intService, -1); if (ds.Tables[0].Rows.Count > 0) { lblUser.Text = oUser.GetFullName(Int32.Parse(ds.Tables[0].Rows[0]["userid"].ToString())); } } } else { panAll.Visible = true; rptView.DataSource = oService.GetPending(); rptView.DataBind(); } btnSave.Attributes.Add("onclick", "return confirm('Are you sure you want to save this service?');"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service?');"); }
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?');"); }
// GET api/ItemsShop public string Get([FromQuery] RequestItems req) { string json = ""; if (req.id_kategor == null) { return("kategor is null"); } try { ResponseItems resp = new ResponseItems(); resp.GetItemsKatalog(Constants.connectDB, req); json = JsonConvert.SerializeObject(resp); //, Formatting.Indented } catch (Exception ex) { json += " err " + ex.Message; } return(json); }
protected void btnSubmit_Click(object sender, EventArgs e) { Models.InventoryModels.MaterialRequest materialRequest = new Models.InventoryModels.MaterialRequest(); materialRequest.Date = Convert.ToDateTime(txtDate.Text); materialRequest.Time = Convert.ToDateTime(txtTime.Text); materialRequest.Requester_Name = txtRequesterName.Text; materialRequest.Department_Id = Convert.ToInt32(ddlDepartment.SelectedItem.Value); materialRequest.Description = txtDescription.Text; materialRequest.Comment = txtReqComment.Text; List <RequestItems> reqItemsList = new List <RequestItems>(); for (int i = 0; i < GridView1.Rows.Count; i++) { RequestItems Items = new RequestItems(); Items.Item_Id = Convert.ToInt32(GridView1.Rows[i].Cells[0].Text); Items.To_Location = Convert.ToInt32(GridView1.Rows[i].Cells[3].Text); Items.Uom_Id = Convert.ToInt32(GridView1.Rows[i].Cells[2].Text); Items.Request_Quantity = Convert.ToDecimal(GridView1.Rows[i].Cells[4].Text); Items.Comment = GridView1.Rows[i].Cells[5].Text; reqItemsList.Add(Items); } materialRequest.RequestItemsList = reqItemsList; int Result = requestService.CreateRequest(materialRequest); if (Result > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Failed", "alert('Request Created');", true); ResetPage(); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Failed", "alert('Something went wrong');", true); } }
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?');"); }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); 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); oApplication = new Applications(intProfile, dsn); oAccountRequest = new AccountRequest(intProfile, dsn); oDelegate = new Delegates(intProfile, dsn); oService = new Services(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); } string strAttributes = ""; bool boolIncomplete = false; if (Request.QueryString["rrid"] != null && Request.QueryString["rrid"] != "") { intResourceWorkflow = Int32.Parse(Request.QueryString["rrid"]); int intResourceParent = oResourceRequest.GetWorkflowParent(intResourceWorkflow); DataSet ds = oResourceRequest.Get(intResourceParent); if (ds.Tables[0].Rows.Count > 0) { intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); intItem = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString()); intNumber = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString()); // Workflow start bool boolComplete = (oResourceRequest.GetWorkflow(intResourceWorkflow, "status") == "3"); int intUser = Int32.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "userid")); double dblAllocated = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated")); // Workflow end intService = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString()); 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 (oService.Get(intService, "sla") != "") { oFunction.ConfigureToolButton(btnSLA, "/images/tool_sla"); int intDays = oResourceRequest.GetSLA(intResourceParent); if (intDays < 1) { btnSLA.Style["border"] = "solid 2px #FF0000"; } else if (intDays < 3) { btnSLA.Style["border"] = "solid 2px #FF9999"; } btnSLA.Attributes.Add("onclick", "return OpenWindow('RESOURCE_REQUEST_SLA','?rrid=" + intResourceParent.ToString() + "');"); } else { btnSLA.ImageUrl = "/images/tool_sla_dbl.gif"; btnSLA.Enabled = false; } if (!IsPostBack) { if (intResourceWorkflow > 0) { ds = oRequest.Get(intRequest); if (ds.Tables[0].Rows.Count > 0) { ds = oAccountRequest.GetMaintenance(intRequest, intItem, intNumber); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["completed"].ToString() == "") { boolIncomplete = true; } else { lblComplete.Text = ds.Tables[0].Rows[0]["completed"].ToString(); panComplete.Visible = true; } lblRequestBy.Text = oUser.GetFullName(oRequest.GetUser(intRequest)); lblRequestOn.Text = DateTime.Parse(oRequest.Get(intRequest, "created")).ToLongDateString(); int intDomain = Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()); Domains oDomain = new Domains(intProfile, dsn); intDomain = Int32.Parse(oDomain.Get(intDomain, "environment")); AD oAD = new AD(intProfile, dsn, intDomain); DataSet dsParameters = oAccountRequest.GetMaintenanceParameters(intRequest, intItem, intNumber); switch (ds.Tables[0].Rows[0]["maintenance"].ToString()) { case "DISABLE": lblType.Text = "Account Disable"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "UNLOCK": lblType.Text = "Account Unlock"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "ENABLE": lblType.Text = "Account Enable"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "EMAIL": lblType.Text = "Email Enable an Account"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "MOVE": lblType.Text = "Account Move"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; strDetails += "<tr><td><b>New Location:</b></td><td>" + dsParameters.Tables[0].Rows[0]["value"].ToString() + "</td>"; break; case "PASSWORD": lblType.Text = "Account Password Change"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "COPY": lblType.Text = "Account Copy"; panPassword.Visible = true; strAttributes += "ValidateText('" + txtPassword.ClientID + "','Please enter a password') && "; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; panID.Visible = true; txtID.Text = dsParameters.Tables[0].Rows[0]["value"].ToString(); panFirst.Visible = true; txtFirst.Text = dsParameters.Tables[0].Rows[1]["value"].ToString(); panLast.Visible = true; txtLast.Text = dsParameters.Tables[0].Rows[2]["value"].ToString(); panGroups.Visible = true; string[] strGroups; char[] strSplit = { ';' }; strGroups = dsParameters.Tables[0].Rows[3]["value"].ToString().Split(strSplit); for (int ii = 0; ii < strGroups.Length; ii++) { if (strGroups[ii].Trim() != "") { ListItem oList = new ListItem(strGroups[ii].Trim()); chkGroups.Items.Add(oList); oList.Selected = true; } } break; case "DELETE": lblType.Text = "Account Deletion"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; break; case "RENAME": lblType.Text = "Account Rename"; strDetails += "<tr><td><b>Account:</b></td><td>" + ds.Tables[0].Rows[0]["username"].ToString() + " (" + oAD.GetUserFullName(ds.Tables[0].Rows[0]["username"].ToString()) + ")</td>"; strDetails += "<tr><td><b>Domain:</b></td><td>" + oDomain.Get(Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()), "name") + "</td>"; panID.Visible = true; txtID.Text = dsParameters.Tables[0].Rows[0]["value"].ToString(); panFirst.Visible = true; txtFirst.Text = dsParameters.Tables[0].Rows[1]["value"].ToString(); panLast.Visible = true; txtLast.Text = dsParameters.Tables[0].Rows[2]["value"].ToString(); break; default: lblType.Text = "Unavailable"; strDetails += "<tr><td colspan=\"2\"><b>Invalid Maintenance Code!</b></td>"; break; } panWorkload.Visible = true; } else { panDenied.Visible = true; } } else { panDenied.Visible = true; } } else { panDenied.Visible = true; } btnDenied.Attributes.Add("onclick", "return CloseWindow();"); oFunction.ConfigureToolButton(btnApprove, "/images/tool_approve"); oFunction.ConfigureToolButton(btnDeny, "/images/tool_deny"); if (boolIncomplete == true) { btnApprove.Attributes.Add("onclick", "return " + strAttributes + "confirm('Are you sure you want to APPROVE this request?');"); btnDeny.Attributes.Add("onclick", "return ValidateText('" + txtComments.ClientID + "','Please enter a reason') && confirm('Are you sure you want to DENY this request?');"); } else { btnApprove.Attributes.Add("onclick", "alert('This request has already been completed.\\n\\nIf this request continues to appear in your work queue, please contact a ClearView administrator.');return false;"); btnDeny.Attributes.Add("onclick", "alert('This request has already been completed.\\n\\nIf this request continues to appear in your work queue, please contact a ClearView administrator.');return false;"); } oFunction.ConfigureToolButton(btnPrint, "/images/tool_print"); btnPrint.Attributes.Add("onclick", "return PrintWindow();"); oFunction.ConfigureToolButton(btnClose, "/images/tool_close"); btnClose.Attributes.Add("onclick", "return ExitWindow();"); // 6/1/2009 - Load ReadOnly View if (oResourceRequest.CanUpdate(intProfile, intResourceWorkflow, false) == false) { oFunction.ConfigureToolButtonRO(btnApprove, btnDeny); //panDenied.Visible = true; } } } else { panDenied.Visible = true; } } else { panDenied.Visible = true; } }
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); oServer = new Servers(intProfile, dsn); oClass = new Classes(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oFunction = new Functions(intProfile, dsn, intEnvironment); oUser = new Users(intProfile, dsn); oDNS = new DNS(intProfile, dsn); Variables oVariableUser = new Variables(intEnvironment); if (intEnvironment < 3) { intEnvironment = 3; } oVariable = new Variables(intEnvironment); oSetting = new Settings(0, dsn); boolDNS_QIP = oSetting.IsDNS_QIP(); boolDNS_Bluecat = oSetting.IsDNS_Bluecat(); trQIP.Visible = boolDNS_QIP; 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(); int intItem = Int32.Parse(lblItem.Text); int intNumber = Int32.Parse(lblNumber.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 + "');"); } DataSet ds = oDNS.GetDNS(intRequest, intItem, intNumber); if (ds.Tables[0].Rows.Count > 0) { if (!IsPostBack) { LoadServer(ds.Tables[0].Rows[0]); } } else { panSearch.Visible = true; btnReset.Enabled = false; btnConfirm.Visible = false; btnNext.Visible = false; } btnContinue.Attributes.Add("onclick", "return EnsureDNS('" + txtSearchName.ClientID + "','" + txtSearchIP.ClientID + "','" + txtSearchAlias.ClientID + "')" + " && ProcessButton(this)" + ";"); btnReset.Attributes.Add("onclick", "return ProcessButton(this)" + ";"); } txtSearchName.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtSearchIP.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtSearchAlias.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnContinue.ClientID + "').click();return false;}} else {return true}; "); txtAlias.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnAdd.ClientID + "').click();return false;}} else {return true}; "); btnCancel1.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this service request?');"); }
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; } }
protected void Page_Load(object sender, EventArgs e) { RequestItems oRequestItem = new RequestItems(intProfile, dsn); RequestFields oRequestField = new RequestFields(intProfile, dsn); ServiceRequests oServiceRequest = new ServiceRequests(intProfile, dsn); Services oService = new Services(intProfile, dsn); int intRequest = Int32.Parse(Request.QueryString["rid"]); string strStatus = oServiceRequest.Get(intRequest, "checkout"); DataSet dsItems = oRequestItem.GetForms(intRequest); int intItem = 0; int intService = 0; int intNumber = 0; if (dsItems.Tables[0].Rows.Count > 0) { bool boolBreak = false; foreach (DataRow drItem in dsItems.Tables[0].Rows) { if (boolBreak == true) { break; } if (drItem["done"].ToString() == "0") { intItem = Int32.Parse(drItem["itemid"].ToString()); intService = Int32.Parse(drItem["serviceid"].ToString()); intNumber = Int32.Parse(drItem["number"].ToString()); boolBreak = true; } if (intItem > 0 && (strStatus == "1" || strStatus == "2")) { bool boolSuccess = true; string strResult = oService.GetName(intService) + " Completed"; string strError = oService.GetName(intService) + " Error"; // ********* BEGIN PROCESSING ************** AccountRequest oAccountRequest = new AccountRequest(intProfile, dsn); Requests oRequest = new Requests(intProfile, dsn); Users oUser = new Users(intProfile, dsn); DataSet ds = oAccountRequest.GetMaintenance(intRequest, intItem, intNumber); Domains oDomain = new Domains(intProfile, dsn); if (ds.Tables[0].Rows.Count > 0) { string strUser = ds.Tables[0].Rows[0]["username"].ToString(); int intDomain = Int32.Parse(ds.Tables[0].Rows[0]["domain"].ToString()); int intEnv = Int32.Parse(oDomain.Get(intDomain, "environment")); int intUser = oRequest.GetUser(intRequest); AD oAD = new AD(intProfile, dsn, intEnv); DirectoryEntry oEntry = oAD.UserSearch(strUser); if (oEntry == null) { strResult = ""; } else { if (oAD.IsLocked(oEntry) == true) { strResult = oAD.Unlock(oEntry); oRequest.AddResult(intRequest, intItem, intNumber, "Account Unlock", strResult, "Account " + strUser + " was successfully unlocked", intEnvironment, (oService.Get(intService, "notify_client") == "1"), oUser.GetName(intUser)); if (strResult == "") { strResult = "<p>Account " + strUser + " was unlocked</p>"; } } else { oRequest.AddResult(intRequest, intItem, intNumber, "Account Unlock", "", "Account " + strUser + " was not locked", intEnvironment, (oService.Get(intService, "notify_client") == "1"), oUser.GetName(intUser)); strResult = "<p>Account " + strUser + " was not locked</p>"; } } } if (strResult == "") { boolSuccess = false; } // ******** END PROCESSING ************** if (oService.Get(intService, "automate") == "1" && boolSuccess == true) { strDone += "<table border=\"0\"><tr><td><img src=\"/images/bigCheck.gif\" border=\"0\" align=\"absmiddle\"/></td><td class=\"biggerbold\">" + strResult + "</td></tr></table>"; } else { if (boolSuccess == false) { strDone += "<table border=\"0\"><tr><td><img src=\"/images/bigError.gif\" border=\"0\" align=\"absmiddle\"/></td><td class=\"biggerbold\">" + strError + "</td></tr></table>"; } else { strDone += "<table border=\"0\"><tr><td><img src=\"/images/bigCheck.gif\" border=\"0\" align=\"absmiddle\"/></td><td class=\"biggerbold\">" + oService.GetName(intService) + " Submitted</td></tr></table>"; } } oRequestItem.UpdateFormDone(intRequest, intItem, intNumber, 1); } } } }
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); oRequestField = new RequestFields(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); oApplication = new Applications(intProfile, dsn); oOnDemandTasks = new OnDemandTasks(intProfile, dsn); oDelegate = new Delegates(intProfile, dsn); oClass = new Classes(intProfile, dsn); oServer = new Servers(0, 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"] != "") { lblResourceWorkflow.Text = Request.QueryString["rrid"]; int intResourceWorkflow = Int32.Parse(Request.QueryString["rrid"]); int intResourceParent = oResourceRequest.GetWorkflowParent(intResourceWorkflow); DataSet ds = oResourceRequest.Get(intResourceParent); intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); intItem = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString()); intNumber = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString()); // Workflow start 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")); // Workflow end int intService = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString()); lblService.Text = oService.Get(intService, "name"); int intApp = oRequestItem.GetItemApplication(intItem); double dblUsed = oResourceRequest.GetWorkflowUsed(intResourceWorkflow); lblUpdated.Text = oResourceRequest.GetUpdated(intResourceParent); dblUsed = (dblUsed / dblAllocated) * 100; 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('Weekly Status has been Added');<" + "/" + "script>"); } intProject = oRequest.GetProjectNumber(intRequest); hdnTab.Value = "D"; panWorkload.Visible = true; LoadStatus(intResourceWorkflow); bool boolDone = LoadInformation(intResourceWorkflow); if (boolDone == true) { if (boolComplete == false) { oFunction.ConfigureToolButton(btnComplete, "/images/tool_complete"); btnComplete.Attributes.Add("onclick", "return ValidateDropDown('" + ddlSuccess.ClientID + "','Please select a status') && 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;"); } imgSuccess.ImageUrl = "/images/green_arrow.gif"; btnSave.ImageUrl = "/images/tool_save.gif"; btnSave.Enabled = false; } else { btnComplete.ImageUrl = "/images/tool_complete_dbl.gif"; btnComplete.Enabled = false; oFunction.ConfigureToolButton(btnSave, "/images/tool_save"); } 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 ValidateStatus('" + ddlStatus.ClientID + "','" + txtIssues.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; } }