Beispiel #1
0
        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);
        }
Beispiel #2
0
        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.UpdateCSRCDetail(intDetailId, Int32.Parse(oButton.CommandArgument), txtComments.Text);
            //oTPM.ApproveCSRC(intId, intStep + 1, Int32.Parse(oButton.CommandArgument), intCSRCPage, intWorkloadManager, strBCC);
            oTPM.ApproveCSRC(intId, intStep + 1, Int32.Parse(oButton.CommandArgument), intCSRCPage, intWorkloadManager, Request.PhysicalApplicationPath + oTPM.GetCSRCPath(intId));
            Response.Redirect(oPage.GetFullLink(intPage) + "?id=" + lblId.Text + "&action=done");
        }
Beispiel #3
0
 protected void btnUpdate_Click(Object Sender, EventArgs e)
 {
     UpdatePDF(oTPM.GetCSRCPath(intId));
     if (Request.Form[hdnStatus.UniqueID] != "Pending")
     {
         oTPM.UpdateCSRC(intId, 0, 0);
         oTPM.UpdateCSRCDetail(intId, 1);
         oTPM.UpdateCSRCDetail(intId, 2);
         oTPM.ApproveCSRC(intId, 1, 0, intCSRCPage, intWorkloadManager, oVariable.DocumentsFolder() + oTPM.GetCSRCPath(intId));
     }
     else
     {
         oTPM.UpdateCSRC(intId, (chkDiscovery.Checked ? 1 : 0), (chkPlanning.Checked ? 1 : 0), (chkExecution.Checked ? 1 : 0), (chkClosing.Checked ? 1 : 0), txtCSRCSD.Text, txtCSRCED.Text, txtCSRCID.Text, txtCSRCExD.Text, txtCSRCHD.Text, txtCSRCSP.Text, txtCSRCEP.Text, txtCSRCIP.Text, txtCSRCExP.Text, txtCSRCHP.Text, txtCSRCSE.Text, txtCSRCEE.Text, txtCSRCIE.Text, txtCSRCExE.Text, txtCSRCHE.Text, txtCSRCSC.Text, txtCSRCEC.Text, txtCSRCIC.Text, txtCSRCExC.Text, txtCSRCHC.Text);
     }
     ClientScript.RegisterClientScriptBlock(typeof(Page), "redirect", "window.top.navigate(window.top.location);", true);
 }
        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);
        }