protected void btnRoute_Click(object sender, EventArgs e) { if (strRoute == "CSRC") { foreach (string str in strChecks) { if (str != "") { if (Request.Form[hdnC.UniqueID] != "") { intCC = Int32.Parse(Request.Form[hdnC.UniqueID]); } oTPM.UpdateCSRCCC(intId, intCC); //intWorking = 39331; //intExecutive = 39331; intId = Int32.Parse(str); oTPM.AddCSRCDetail(intId, 1, intWorking, 0); oTPM.AddCSRCDetail(intId, 2, intExecutive, -10); //strBCC = oUser.GetFullName(intCC); if (Request.Form[hdnD.UniqueID] != "") { oTPM.AddCSRCDetail(intId, 3, Int32.Parse(Request.Form[hdnD.UniqueID]), -10); } oTPM.ApproveCSRC(intId, 1, 0, intCSRCPage, intWorkloadManager, oVariable.DocumentsFolder() + oTPM.GetCSRCPath(intId)); } } } else { foreach (string str in strChecks) { if (str != "") { if (Request.Form[hdnC.UniqueID] != "") { intCC = Int32.Parse(Request.Form[hdnC.UniqueID]); } oTPM.UpdatePCRCC(intId, intCC); //intWorking = 39331; //intExecutive = 39331; intId = Int32.Parse(str); oTPM.AddPCRDetail(intId, 1, intWorking, 0); oTPM.AddPCRDetail(intId, 2, intExecutive, -10); //strBCC = oUser.GetFullName(intCC); if (Request.Form[hdnD.UniqueID] != "") { oTPM.AddPCRDetail(intId, 3, Int32.Parse(Request.Form[hdnD.UniqueID]), -10); } oTPM.ApprovePCR(intId, 1, 0, intPCRPage, intWorkloadManager, oVariable.DocumentsFolder() + oTPM.GetPCRPath(intId)); } } } ClientScript.RegisterClientScriptBlock(typeof(Page), "redirect", "window.top.navigate(window.top.location);", true); }
protected void btnSubmit_Click(Object Sender, EventArgs e) { Button oButton = (Button)Sender; int intStep = Int32.Parse(lblStep.Text); int intDetailId = Int32.Parse(lblDetailId.Text); oTPM.UpdatePCRDetail(intDetailId, Int32.Parse(oButton.CommandArgument), txtComments.Text); //oTPM.ApprovePCR(intId, intStep + 1, Int32.Parse(oButton.CommandArgument), intPCRPage, intWorkloadManager, strBCC); oTPM.ApprovePCR(intId, intStep + 1, Int32.Parse(oButton.CommandArgument), intPCRPage, intWorkloadManager, Request.PhysicalApplicationPath + oTPM.GetPCRPath(intId)); Response.Redirect(oPage.GetFullLink(intPage) + "?id=" + lblId.Text + "&action=done"); }
protected void btnRoute_Click(object sender, EventArgs e) { strEMailIdsBCC = oFunction.GetGetEmailAlertsEmailIds("EMAILGRP_PROJECT"); if (strRoute == "CSRC") { foreach (string str in strChecks) { if (str != "") { if (Request.Form[hdnC.UniqueID] != "") { intCC = Int32.Parse(Request.Form[hdnC.UniqueID]); oTPM.UpdateCSRCCC(intId, intCC); } intId = Int32.Parse(str); oTPM.AddCSRCDetail(intId, 1, intWorking, 0); oTPM.AddCSRCDetail(intId, 2, intExecutive, -10); //strBCC = oUser.GetFullName(intCC); if (Request.Form[hdnD.UniqueID] != "") { oTPM.AddCSRCDetail(intId, 3, Int32.Parse(Request.Form[hdnD.UniqueID]), -10); } oTPM.ApproveCSRC(intId, 1, 0, intCSRCPage, intWorkloadManager, oVariable.DocumentsFolder() + oTPM.GetCSRCPath(intId)); } } } else if (strRoute == "PCR") { foreach (string str in strChecks) { if (str != "") { if (Request.Form[hdnC.UniqueID] != "") { intCC = Int32.Parse(Request.Form[hdnC.UniqueID]); oTPM.UpdatePCRCC(intId, intCC); } intId = Int32.Parse(str); oTPM.AddPCRDetail(intId, 1, intWorking, 0); oTPM.AddPCRDetail(intId, 2, intExecutive, -10); //strBCC = oUser.GetFullName(intCC); if (Request.Form[hdnD.UniqueID] != "") { oTPM.AddPCRDetail(intId, 3, Int32.Parse(Request.Form[hdnD.UniqueID]), -10); } oTPM.ApprovePCR(intId, 1, 0, intPCRPage, intWorkloadManager, oVariable.DocumentsFolder() + oTPM.GetPCRPath(intId)); } } } else { foreach (string str in strChecks) { if (str != "") { if (Request.Form[hdnC.UniqueID] != "") { intCC = Int32.Parse(Request.Form[hdnC.UniqueID]); } string strPath = oTPM.GetProjectClosurePDF(Int32.Parse(str)).Tables[0].Rows[0]["path"].ToString(); string strName = strPath.Substring(strPath.IndexOf("\\") + 1, strPath.IndexOf("_") - 8); oFunction.SendEmail("ClearView Project Closure Notification", oUser.GetName(intWorking), oUser.GetFullName(intCC), strEMailIdsBCC, "ClearView Project Closure Notification", "<p><b>This notification is sent to confirm the closure of Project \" " + strName + " \" . Click on the attachement to view the report.</b></p>", true, false, oVariable.DocumentsFolder() + strPath); oFunction.SendEmail("ClearView Project Closure Notification", oUser.GetName(intExecutive), oUser.GetFullName(intCC), strEMailIdsBCC, "ClearView Project Closure Notification", "<p><b>This notification is sent to confirm the closure of Project \" " + strName + " \" . Click on the attachement to view the report.</b></p>", true, false, oVariable.DocumentsFolder() + strPath); if (Request.Form[hdnD.UniqueID] != "") { oFunction.SendEmail("ClearView Project Closure Notification", oUser.GetName(Int32.Parse(Request.Form[hdnD.UniqueID])), oUser.GetFullName(intCC), strEMailIdsBCC, "ClearView Project Closure Notification", "<p><b>This notification is sent to confirm the closure of Project \" " + strName + " \" . Click on the attachement to view the report.</b></p>", true, false, oVariable.DocumentsFolder() + strPath); } } } } ClientScript.RegisterClientScriptBlock(typeof(Page), "redirect", "window.top.navigate(window.top.location);", true); }