protected void btnComplete_Click(Object Sender, EventArgs e) { int intResourceWorkflow = Int32.Parse(lblResourceWorkflow.Text); string strInvalid = ""; if (panForm.Visible == true) { strInvalid = oServiceEditor.SaveForm(Request, intRequest, intService, intNumber, true, intEnvironment, dsn); } if (strInvalid == "") { // All Required Fields have been completed int intResourceParent = oResourceRequest.GetWorkflowParent(intResourceWorkflow); if (oResourceRequest.Get(intResourceParent, "status") == ((int)ResourceRequestStatus.Closed).ToString() || oResourceRequest.GetWorkflow(intResourceWorkflow, "status") == ((int)ResourceRequestStatus.Closed).ToString()) { // already completed - nothing to do except close the window. } else { if (panNoSlider.Visible == true) { double dblAllocated = double.Parse(oResourceRequest.GetWorkflow(intResourceWorkflow, "allocated")); oResourceRequest.UpdateWorkflowHoursOverwrite(intResourceWorkflow, dblAllocated); } // Add a green / completed status if there are no updates, OR the last status is not green DataSet dsStatus = oResourceRequest.GetStatuss(intResourceWorkflow); if (dsStatus.Tables[0].Rows.Count == 0 || dsStatus.Tables[0].Rows[0]["status"].ToString() != "3") { oResourceRequest.AddStatus(intResourceWorkflow, (int)ResourceRequestStatus.Closed, "Completed", intProfile); } oResourceRequest.UpdateWorkflowStatus(intResourceWorkflow, (int)ResourceRequestStatus.Closed, true); string strCVT = "CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString(); oLog.AddEvent(intRequest.ToString(), strCVT, "Closed WM_Generic by " + oUser.GetFullNameWithLanID(intProfile), LoggingType.Debug); oResourceRequest.CloseWorkflow(intResourceWorkflow, intEnvironment, 0, dsnServiceEditor, true, intResourceRequestApprove, intAssignPage, intViewPage, dsnAsset, dsnIP, boolServiceReturned); // Send notification to list of completion users string strCompletion = oService.Get(intService, "notify_complete"); if (strCompletion != "") { string strLink = "<a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResourceParent.ToString()) + "\" target=\"_blank\">Click here to view this request.</a>"; oFunction.SendEmail("Service Request #CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString() + " Complete", strCompletion, "", "", "Service Request #CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString() + " Complete", "<p>This message is to notify you that the following service request has been completed...</p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p><p>You are receiving this message because you have been configured to receive a notification for all completed requests for the service <b>" + oService.GetName(intService) + "</b><p>" + strLink + "</p>", true, false); } //Send notification to users of associated tasks WMServiceTasks oWMServiceTasks = new WMServiceTasks(intProfile, dsn); DataSet DsWMAssociatedTasks = oWMServiceTasks.getWMServiceTasksStatusRequestWithRequest(intRequest); Customized oCustomized = new Customized(intProfile, dsn); if (DsWMAssociatedTasks.Tables[0].Rows.Count > 0) { foreach (DataRow drWMAssoicatedTasks in DsWMAssociatedTasks.Tables[0].Rows) { string strWMAssoicatedTasksUser = oUser.GetName(Int32.Parse(drWMAssoicatedTasks["createdBy"].ToString())); string strComment = ""; string strLink = "<p><a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(intResourceParent.ToString()) + "\" target=\"_blank\">Click here to view this request.</a></p>"; oFunction.SendEmail("Associated Request Completed CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString(), strWMAssoicatedTasksUser, "", "", "Associated Request Completed CVT" + intRequest.ToString() + "-" + intService.ToString() + "-" + intNumber.ToString(), "<p><b>The following associated service request has been completed!</b></br>" + strComment + "</p>" + strLink + "<p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p>", true, false); } } //End of Send notification to users of associated tasks if (intService == Int32.Parse(ConfigurationManager.AppSettings["SERVICEID_DECOMMISSION_SUPPORT"]) || intService == Int32.Parse(ConfigurationManager.AppSettings["SERVICEID_DESTROY_SUPPORT"]) || intService == Int32.Parse(ConfigurationManager.AppSettings["SERVICEID_DECOMMISSION_SUPPORT_WORKSTATION"]) || intService == Int32.Parse(ConfigurationManager.AppSettings["SERVICEID_DESTROY_SUPPORT_WORKSTATION"])) { Asset oAsset = new Asset(0, dsnAsset); oAsset.UpdateDecommissionFixed(intRequest, intNumber); } //If this service was returned then update the status of next service if (boolServiceReturned == true) { DataSet dsRR = oResourceRequest.GetRequestService(intRequest, intService, intNumber); if (dsRR.Tables[0].Rows.Count > 0) { int intRRId = Int32.Parse(dsRR.Tables[0].Rows[0]["parent"].ToString()); DataSet dsRRReturn = oResourceRequest.getResourceRequestReturn(intRRId, intService, intNumber, 1, 0); if (dsRRReturn.Tables[0].Rows.Count > 0) { int intNextRRId = Int32.Parse(dsRRReturn.Tables[0].Rows[0]["NextRRId"].ToString()); int intNextServiceId = Int32.Parse(dsRRReturn.Tables[0].Rows[0]["NextServiceId"].ToString()); int intNextNumber = Int32.Parse(dsRRReturn.Tables[0].Rows[0]["NextNumber"].ToString());; // Get all at that level to resume DataSet dsWorkflow = oServiceEditor.GetWorkflow(intRequest); // Get leveling int intLevel = 0; foreach (DataRow drWorkflow in dsWorkflow.Tables[0].Rows) { if (Int32.Parse(drWorkflow["serviceid"].ToString()) == intNextServiceId) { intLevel = Int32.Parse(drWorkflow["leveling"].ToString()); break; } } foreach (DataRow drWorkflow in dsWorkflow.Tables[0].Rows) { if (Int32.Parse(drWorkflow["leveling"].ToString()) == intLevel) { string strService = oService.GetName(Int32.Parse(drWorkflow["ServiceID"].ToString())); int intResourceRequestID = 0; if (Int32.TryParse(drWorkflow["ResourceID"].ToString(), out intResourceRequestID)) { oResourceRequest.UpdateStatusRequest(intResourceRequestID, 2); DataSet dsRRWF = oResourceRequest.GetWorkflowsParent(intResourceRequestID); foreach (DataRow dr in dsRRWF.Tables[0].Rows) { int intRRWFId = Int32.Parse(dr["id"].ToString()); int intRRWFUserId = Int32.Parse(dr["userid"].ToString()); oResourceRequest.UpdateWorkflowStatus(intRRWFId, 2, true); // Notify string strEMailIdsBCC = oFunction.GetGetEmailAlertsEmailIds("EMAILGRP_REQUEST_ASSIGNMENT"); string strDefault = oUser.GetApplicationUrl(intRRWFUserId, intViewPage); if (strDefault == "") { oFunction.SendEmail("Returned Request Completed: " + strService, oUser.GetName(intRRWFUserId), "", strEMailIdsBCC, "Returned Request Completed: " + strService, "<p><b>The following returned request has been completed by " + oUser.GetFullName(intProfile) + " and is now in your queue.</b></p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p>", true, false); } else { if (intProject > 0) { oFunction.SendEmail("Returned Request Completed: " + strService, oUser.GetName(intRRWFUserId), "", strEMailIdsBCC, "Returned Request Completed: " + strService, "<p><b>The following returned request has been completed by " + oUser.GetFullName(intProfile) + " and is now in your queue.</b></p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p><p><a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/" + strDefault + oPage.GetFullLink(intViewPage) + "?pid=" + intProject.ToString() + "\" target=\"_blank\">Click here to review your assignment.</a></p>", true, false); } else { oFunction.SendEmail("Returned Request Completed: " + strService, oUser.GetName(intRRWFUserId), "", strEMailIdsBCC, "Returned Request Completed: " + strService, "<p><b>The following returned request has been completed by " + oUser.GetFullName(intProfile) + " and is now in your queue.</b></p><p>" + oResourceRequest.GetWorkflowSummary(intResourceWorkflow, intEnvironment, dsnServiceEditor, dsnAsset, dsnIP) + "</p><p><a href=\"" + oVariable.URL() + "/redirect.aspx?referrer=/frame/resource_request.aspx?rrid=" + intResourceWorkflow.ToString() + "\" target=\"_blank\">Click here to review your assignment.</a></p>", true, false); } } } } } } //oResourceRequest.UpdateStatusRequest(intNextRRId, 2); //DataSet dsRRWF = oResourceRequest.GetWorkflowsParent(intNextRRId); //foreach (DataRow dr in dsRRWF.Tables[0].Rows) //{ // int intRRWFId = Int32.Parse(dr["id"].ToString()); // oResourceRequest.UpdateWorkflowStatus(intRRWFId, 2, true); //} } } oResourceRequest.updateResourceRequestReturnCompleted(Int32.Parse(lblReqReturnedId.Text)); } } Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "reload", "<script type=\"text/javascript\">RefreshOpeningWindow();window.close();<" + "/" + "script>"); } else { Response.Redirect(Request.Path + "?rrid=" + intResourceWorkflow.ToString() + "&div=E&require=true&required=" + oFunction.encryptQueryString(strInvalid)); } }
private wucWorkflowItem LoadWorkflow(int _requestid, int _serviceid, int _number, bool _workflow) { StringBuilder strReturn = new StringBuilder(); bool boolHasChildren = false; // Load Workflow services First! DataSet dsReceive = oService.GetWorkflowsReceive(_serviceid); foreach (DataRow drReceive in dsReceive.Tables[0].Rows) { int intWorkflowService = Int32.Parse(drReceive["serviceid"].ToString()); wucWorkflowItem _child = LoadWorkflow(RequestID, intWorkflowService, Number, true); strReturn.Append(_child.Html); if (_child.Children > 0) { boolHasChildren = true; } } // Now Load this service bool boolPending = false; //DataSet dsWorkflow = oResourceRequest.GetWorkflow(_requestid, _serviceid, _number); DataSet dsWorkflow = oServiceEditor.GetWorkflow(_requestid, _serviceid, _number); foreach (DataRow drWorkflow in dsWorkflow.Tables[0].Rows) { int intStatus = 0; Int32.TryParse(drWorkflow["status"].ToString(), out intStatus); int intResource = 0; Int32.TryParse(drWorkflow["userid"].ToString(), out intResource); int intRR = 0; Int32.TryParse(drWorkflow["resourceid"].ToString(), out intRR); string strStep = drWorkflow["step"].ToString(); string strComments = drWorkflow["comments"].ToString(); //if (strComments != "") // strComments = "Additional Comments:<br/>" + strComments; string strNotified = drWorkflow["created"].ToString(); string strWorkflowCompleted = strCompletedLast; string strCompleted = strCompletedLast = drWorkflow["completed"].ToString(); string strLabel = ""; string strFinish = "Completed"; string strHeader = ""; string strAdditional = ""; string strStatus = ""; string strPicture = ""; string strResource = ""; string strIcon = ""; bool boolActive = false; bool boolReturned = false; bool boolHide = false; bool boolComment = true; // only show comment gif for actual comments. switch (strStep) { case "REQUESTOR": strIcon = "/images/check_small.gif"; strNotified = ""; string strWorkflowTitle = oService.Get(_serviceid, "workflow_title"); if (dsReceive.Tables[0].Rows.Count > 0) { strHeader = "Workflow Generated"; intResource = -999; strComments = "<b>" + (strWorkflowTitle == "" ? oService.GetName(_serviceid) : strWorkflowTitle) + "</b> generated as part of a workflow"; boolComment = false; strCompleted = strWorkflowCompleted; strStatus = "Initiated"; strLabel = "Initiated By"; } else { strHeader = "Request Initiated"; strComments = "<b>" + (strWorkflowTitle == "" ? oService.GetName(_serviceid) : strWorkflowTitle) + "</b> submitted"; boolComment = false; strStatus = "Submitted"; strLabel = "Submitted By"; } strFinish = "Initiated On"; break; case "MANAGER_APPROVAL": case "SERVICE_APPROVAL": case "PLATFORM_APPROVAL": case "3RD_PARTY_APPROVAL": if (strStep == "MANAGER_APPROVAL") { strHeader = "Requestor's Manager Approval"; } else if (strStep == "SERVICE_APPROVAL") { strHeader = "Service Manager Approval"; } else if (strStep == "PLATFORM_APPROVAL") { strHeader = "Platform Manager Approval"; } else if (strStep == "3RD_PARTY_APPROVAL") { strHeader = "3rd Party Approval"; } switch (intStatus) { case 1: strIcon = "/images/check_small.gif"; strStatus = "Approved"; strFinish = "Approved"; break; case 0: strIcon = "/images/active.gif"; strStatus = "Pending Approval"; boolActive = true; boolPending = true; break; case -1: strIcon = "/images/cancel.gif"; strStatus = "Denied"; strFinish = "Denied"; break; } strLabel = "Approver"; break; case "RETURN": case "TECHNICIAN": strHeader = oService.GetName(_serviceid); strStatus = "In Progress"; if (strStep == "RETURN") { //strHeader = "Request Returned"; strLabel = "Resource"; strIcon = "/images/returned.gif"; strStatus = "Returned"; if (intStatus == 0) { boolReturned = true; } } else if (strStep == "TECHNICIAN") { //strHeader = "Resource Assigned"; strLabel = "Resource"; if (intStatus == (int)ResourceRequestStatus.Cancelled) { strIcon = "/images/cancel.gif"; strStatus = "Cancelled by Requestor"; strFinish = "Cancelled"; strCompleted = drWorkflow["modified"].ToString(); } else if (intStatus == (int)ResourceRequestStatus.OnHold) { strIcon = "/images/pending.gif"; strStatus = "On Hold"; } else if (intStatus == (int)ResourceRequestStatus.AwaitingResponse) { strIcon = "/images/delegate2.gif"; strStatus = "Awaiting Response"; } else if (strCompleted != "") { strIcon = "/images/check_small.gif"; strStatus = "Completed"; } //if (strIcon != "/images/ico_check.gif" && strComments.ToUpper() == "COMPLETED") // strComments = ""; } if (intRR > 0) { bool boolThis = false; DataSet dsRR = oResourceRequest.Get(intRR); if (dsRR.Tables[0].Rows.Count > 0) { DataRow drRR = dsRR.Tables[0].Rows[0]; int intRequest = 0; int intService = 0; int intNumber = 0; if (Int32.TryParse(drRR["requestid"].ToString(), out intRequest) && Int32.TryParse(drRR["serviceid"].ToString(), out intService) && Int32.TryParse(drRR["number"].ToString(), out intNumber)) { if (intRequest == RequestID && intService == ServiceID && intNumber == Number) { boolThis = true; } } } if (boolThis == false) { strAdditional = "<p><a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"OpenNewWindowMenu('/datapoint/service/resource.aspx?id=" + oFunction.encryptQueryString(drWorkflow["resourceid"].ToString()) + "', '800', '600');\">View Request Detail</a></p>"; } } break; case "MANAGER_ASSIGNMENT": strHeader = "Service Manager Assignment"; switch (intStatus) { case 1: if (strCompleted == "") { strIcon = "/images/active.gif"; strStatus = "Awaiting Assignment"; boolActive = true; } else { strIcon = "/images/check_small.gif"; strStatus = "Assigned to a Resource"; strFinish = "Assigned"; } break; case 0: if (boolPending == true) { // Still pending one or more approvals strIcon = "/images/pending.gif"; strStatus = "Awaiting Approval"; } else { strIcon = "/images/active.gif"; strStatus = "Awaiting Assignment"; boolActive = true; } break; case -1: strIcon = "/images/cancel.gif"; strStatus = "Rejected by service manager"; strFinish = "Rejected"; break; } strLabel = "Manager(s)"; break; } if (intResource == -999) { strResource = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"alert('ClearView is a system account which is used for automated tasks.');\">ClearView</a>"; strPicture = "/images/clearview.gif"; } else { if (strStep == "MANAGER_ASSIGNMENT" && intResource == 0) { // Pending assignment, intRR = SERVICEID DataSet dsManagers = oService.GetUser(intRR, 1); // get managers strResource = ""; foreach (DataRow drManager in dsManagers.Tables[0].Rows) { int intManager = Int32.Parse(drManager["userid"].ToString()); strResource += "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"OpenWindow('PROFILE','?userid=" + intManager.ToString() + "');\">" + oUser.GetFullName(intManager) + " (" + oUser.GetName(intManager) + ")</a><br/>"; } } else if (intResource > 0) { strResource = "<a href=\"javascript:void(0);\" class=\"lookup\" onclick=\"OpenWindow('PROFILE','?userid=" + intResource.ToString() + "');\">" + oUser.GetFullName(intResource) + " (" + oUser.GetName(intResource) + ")</a>"; } else { strResource = "---"; } if (intResource > 0) { strPicture = "/frame/picture.aspx?xid=" + oUser.GetName(intResource); } else if (intResource == -1) { strPicture = "/images/nobody.gif"; } else { strPicture = "/images/nophoto.gif"; } } if (boolHide == false) { if (intCount > 0) { strReturn.Append("<tr>"); strReturn.Append("<td align=\"center\">"); strReturn.Append("<img src=\"/images/down_arrow_black.gif\" border=\"0\" align=\"absmiddle\" />"); //strReturn.Append("<img src=\"/images/arrow_down.png\" border=\"0\" align=\"absmiddle\" />"); strReturn.Append("</td>"); strReturn.Append("</tr>"); } intCount++; strReturn.Append("<tr>"); //strReturn.Append("<td valign=\"top\"></td>"); strReturn.Append("<td style=\"border:solid 1px #CCC\">"); strReturn.Append("<table width=\"500\" cellpadding=\"0\" cellspacing=\"5\" border=\"0\"" + (boolReturned ? " style=\"background-color:#FCDAD4\"" : (boolActive ? " style=\"background-color:#FFFF99\"" : (intCount % 2 == 0 ? "" : " style=\"background-color:#E6E6E6\">")))); strReturn.Append("<tr>"); strReturn.Append("<td valign=\"top\" align=\"center\">"); strReturn.Append("<img src=\""); strReturn.Append(strPicture); strReturn.Append("\" align=\"absmiddle\" border=\"0\" style='height:90px;width:90px;border-width:0px;border:solid 1px #666666;' />"); strReturn.Append("</td>"); strReturn.Append("<td width=\"100%\" valign=\"top\">"); // Right side table strReturn.Append("<table cellpadding=\"3\" cellspacing=\"5\" border=\"0\">"); // Header strReturn.Append("<tr>"); strReturn.Append("<td colspan=\"2\" valign=\"top\" class=\"header\">" + strHeader + "</td>"); strReturn.Append("</tr>"); // Status if (strAdditional != "") { strReturn.Append("<tr>"); strReturn.Append("<td colspan=\"2\" valign=\"top\">" + strAdditional + "</td>"); strReturn.Append("</tr>"); } strReturn.Append("</table>"); strReturn.Append("<table cellpadding=\"0\" cellspacing=\"5\" border=\"0\">"); // Status strReturn.Append("<tr>"); strReturn.Append("<td nowrap><b>Status</b>:</td>"); strReturn.Append("<td width=\"100%\">"); strReturn.Append((strIcon == "" ? "" : "<img src=\"" + strIcon + "\" align=\"absmiddle\" border=\"0\" /> ") + strStatus); strReturn.Append("</td>"); strReturn.Append("</tr>"); // Submitted strReturn.Append("<tr>"); strReturn.Append("<td nowrap valign=\"top\"><b>" + strLabel + "</b>:</td>"); strReturn.Append("<td width=\"100%\">"); strReturn.Append(strResource); strReturn.Append("</td>"); strReturn.Append("</tr>"); // Notified if (strNotified != "") { strReturn.Append("<tr>"); strReturn.Append("<td nowrap><b>Notified</b>:</td>"); strReturn.Append("<td width=\"100%\">"); strReturn.Append(strNotified); strReturn.Append("</td>"); strReturn.Append("</tr>"); } // Completed strReturn.Append("<tr>"); strReturn.Append("<td nowrap><b>" + strFinish + "</b>:</td>"); strReturn.Append("<td width=\"100%\">"); strReturn.Append(strCompleted); strReturn.Append("</td>"); strReturn.Append("</tr>"); strReturn.Append("</table>"); strReturn.Append("</td>"); strReturn.Append("</tr>"); if (strComments != "") // added a comment { strReturn.Append("<tr>"); strReturn.Append("<td colspan=\"2\">"); strReturn.Append("<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\" border=\"0\">"); strReturn.Append("<tr>"); if (boolComment) { strReturn.Append("<td valign=\"top\"><img src=\"/images/comment.gif\" border=\"0\" /></td>"); } else { strReturn.Append("<td valign=\"top\"><img src=\"/images/biggerPlus.gif\" border=\"0\" /></td>"); } strReturn.Append("<td valign=\"top\" colspan=\"2\" width=\"100%\">" + strComments + "</td>"); strReturn.Append("</tr>"); strReturn.Append("</table>"); strReturn.Append("</td>"); strReturn.Append("</tr>"); } strReturn.Append("</table>"); strReturn.Append("</td>"); strReturn.Append("</tr>"); } } wucWorkflowItem _return = new wucWorkflowItem(); _return.Html = strReturn; _return.Children = dsWorkflow.Tables[0].Rows.Count; return(_return); }
private void getReturningRequestDetails() { //Get Current Request Details DataSet ds = oResourceRequest.Get(intRRId); if (ds.Tables[0].Rows.Count > 0) { intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); intService = Int32.Parse(ds.Tables[0].Rows[0]["serviceid"].ToString()); if (intService == intServiceStorage) { lblStorage.Text = Request.QueryString["rrwfid"]; } intItem = Int32.Parse(ds.Tables[0].Rows[0]["itemid"].ToString()); intNumber = Int32.Parse(ds.Tables[0].Rows[0]["number"].ToString()); intProject = Int32.Parse(oRequest.Get(intRequest, "projectid")); intRequester = Int32.Parse(oRequest.Get(intRequest, "userid")); //lblReturnToValue.Text = oUser.GetFullName(intRequester); } strEmailIdsCC = getProjectEmailIds(intProject, intRequest); DataSet dsWorkflow = oServiceEditor.GetWorkflow(intRequest); ddlReturnTo.Items.Add(new ListItem("Original Requestor" + " -> " + oUser.GetFullName(oRequest.GetUser(intRequest)), "0")); // Get leveling int intLevel = 0; foreach (DataRow drWorkflow in dsWorkflow.Tables[0].Rows) { if (Int32.Parse(drWorkflow["serviceid"].ToString()) == intService) { intLevel = Int32.Parse(drWorkflow["leveling"].ToString()); break; } } foreach (DataRow drWorkflow in dsWorkflow.Tables[0].Rows) { if (Int32.Parse(drWorkflow["leveling"].ToString()) < intLevel && drWorkflow["ResourceID"].ToString() != "") { ddlReturnTo.Items.Insert(0, new ListItem(drWorkflow["ServiceName"].ToString() + " -> " + drWorkflow["username"].ToString(), drWorkflow["ResourceID"].ToString())); } } // //check if this request came from another service request(service workflow) //List<WorkflowServices> lstBefore = oService.PreviousService(intRequest, intService, intNumber); //for (int ii = 0; ii < lstBefore.Count; ii++) //{ // if (lstBefore[ii].Completed != "") // { // intPreService = lstBefore[ii].ServiceID; // break; // } //} //if (intPreService > 0) //Request came from service workflow //{ // strService = oService.GetName(intPreService); // lblServiceToValue.Text = strService; // DataSet dsPreRR = oResourceRequest.GetRequestService(intRequest, intPreService, intNumber); // if (dsPreRR.Tables[0].Rows.Count > 0) // { // intPreRRId = Int32.Parse(dsPreRR.Tables[0].Rows[0]["parent"].ToString()); // intPreRRItem = Int32.Parse(dsPreRR.Tables[0].Rows[0]["itemid"].ToString()); // intPreNumber = Int32.Parse(dsPreRR.Tables[0].Rows[0]["number"].ToString()); // DataSet dsPreRRWF = oResourceRequest.GetWorkflowsParent(intPreRRId); // lblReturnToValue.Text = ""; // if (dsPreRRWF.Tables[0].Rows.Count > 0) // { // foreach (DataRow drWF in dsPreRRWF.Tables[0].Rows) // { // int intRRWFUserId = Int32.Parse(drWF["userid"].ToString()); // if (lblReturnToValue.Text!="") // lblReturnToValue.Text = lblReturnToValue.Text + "<br/>" + oUser.GetFullName(intRRWFUserId); // else // lblReturnToValue.Text = oUser.GetFullName(intRRWFUserId); // } // } // } //} //else // lblServiceToValue.Text = "Original Requestor"; // Check if it already exists //DataSet dsRRReturn = oResourceRequest.getResourceRequestReturn(intRequest, intService, intNumber, 1, 0); }