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?');"); }