Beispiel #1
0
        private bool MFWERPTransactionWERPInsertion(int ProcessId, out int countTransactionsInserted, out int countRejectedRecords)
        {
            bool blResult = false;

            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();
            werpUploadBo    = new WerpUploadsBo();

            countTransactionsInserted = 0;
            countRejectedRecords      = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);

            // WERP Insertion
            // WERP Equity Transation Insertion
            WerpEQUploadsBo werpEQUploadsBo = new WerpEQUploadsBo();
            string          packagePath     = Server.MapPath("\\UploadPackages\\EQTransactionUploadPackage\\EQTransactionUploadPackage\\EQTransactionUploadPackage\\UploadChecksOnEQTranStaging.dtsx");
            bool            WERPEQSecondStagingCheckResult = werpEQUploadsBo.WERPEQProcessDataInSecondStagingTrans(ProcessId, packagePath, configPath, adviserVo.advisorId);

            if (WERPEQSecondStagingCheckResult)
            {
                packagePath = Server.MapPath("\\UploadPackages\\EQTransactionUploadPackage\\EQTransactionUploadPackage\\EQTransactionUploadPackage\\UploadEQTranStagingToWerp.dtsx");
                bool WERPEQTranWerpResult = werpEQUploadsBo.WERPEQInsertTransDetails(ProcessId, packagePath, configPath); // EQ Trans XML File Type Id = 8);
                if (WERPEQTranWerpResult)
                {
                    processlogVo.IsInsertionToWERPComplete = 1;
                    processlogVo.NoOfTransactionInserted   = uploadsCommonBo.GetTransUploadCount(ProcessId, "WPEQ");
                    processlogVo.NoOfRejectedRecords       = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, "WPEQ");
                    processlogVo.EndTime = DateTime.Now;
                    blResult             = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                }
            }
            return(blResult);
        }
Beispiel #2
0
        public void BindddlRejectReason()
        {
            Dictionary <string, string> genDictIsRejected = new Dictionary <string, string>();

            uploadProcessLogVo = new UploadProcessLogVo();
            uploadsCommonBo    = new UploadCommonBo();
            DataSet ds = uploadsCommonBo.GetRejectReasonTrailList(2);

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    genDictIsRejected.Add(dr["WRR_RejectReasonDescription"].ToString(), dr["WRR_RejectReasonCode"].ToString());
                }

                if (ddlRejectReason != null)
                {
                    ddlRejectReason.DataSource     = genDictIsRejected;
                    ddlRejectReason.DataTextField  = "Key";
                    ddlRejectReason.DataValueField = "Value";
                    ddlRejectReason.DataBind();
                }
            }

            ddlRejectReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All", "0"));
        }
Beispiel #3
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();
            int          countTransactionsInserted = 0;
            int          countRejectedRecords      = 0;
            string       error = "";
            int          processIdReprocessAll = 0;
            string       strErrorDesc          = "Please a select a processId";
            DropDownList ddl = (DropDownList)gvWERPTrans.HeaderRow.Cells[0].FindControl("ddlProcessId");
            string       val = ddl.SelectedValue;

            if (val == "Select")
            {
                Response.Write(@"<script language='javascript'>alert('The following errors have occurred: \n" + strErrorDesc + " .');</script>");
            }
            else
            {
                ProcessId = Convert.ToInt32(val);

                // BindGrid
                if (Request.QueryString["processId"] != null)
                {
                    ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
                    blResult  = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords);
                }
                else
                {
                    //DataSet ds = uploadsCommonBo.GetSuperAdminEquityTransactionStagingProcessId();
                    //foreach (DataRow dr in ds.Tables[0].Rows)
                    //{
                    //processIdReprocessAll = int.Parse(dr["ProcessId"].ToString());
                    processIdReprocessAll = ProcessId;
                    blResult = MFWERPTransactionWERPInsertion(processIdReprocessAll, out countTransactionsInserted, out countRejectedRecords);
                    //}
                }
                if (blResult == false)
                {
                    error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
                }

                if (blResult)
                {
                    // Success Message
                    //reprocessSucess.Style.Add("visible", "true");
                    msgReprocessComplete.Visible = true;
                    //lblError.Text = "Reprocess Done Successfully!";
                }
                else
                {
                    // Failure Message
                    //reprocessSucess.Visible = false;
                    msgReprocessincomplete.Visible = true;
                    //lblError.Text = "Reprocess Failure!";
                }

                BindEquityTransactionGrid(ProcessId);
            }
        }
        private void BindBranchDropDown()
        {
            try
            {
                UploadCommonBo uploadsCommonDao = new UploadCommonBo();
                DataSet        ds = uploadsCommonDao.GetAdviserBranchList(advisorVo.advisorId, "adviser");
                if (ds != null)
                {
                    ddlBranch.DataSource     = ds;
                    ddlBranch.DataValueField = ds.Tables[0].Columns["AB_BranchId"].ToString();
                    ddlBranch.DataTextField  = ds.Tables[0].Columns["AB_BranchName"].ToString();
                    ddlBranch.DataBind();
                }
                ddlBranch.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All", "All"));
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "RMCustomerAMCSchemewiseMIS.ascx:BindBranchDropDown()");

                object[] objects = new object[4];

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            //System.Threading.Thread.Sleep(5000);
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();
            UploadProcessLogVo processlogVo = new UploadProcessLogVo();
            string             error        = "";
            int processIdReprocessAll       = 0;

            int countTransactionsInserted = 0;
            int countRejectedRecords      = 0;


            if (Request.QueryString["processId"] != null)
            {
                ProcessId    = Int32.Parse(Request.QueryString["processId"].ToString());
                processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
                if (processlogVo.FileTypeId == 1 || processlogVo.FileTypeId == 3 || processlogVo.FileTypeId == 15 || processlogVo.FileTypeId == 17)
                {
                    blResult = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords, processlogVo.FileTypeId);
                }
            }
            else
            {
                DataSet ds = uploadsCommonBo.GetUploadDistinctProcessIdForAdviser(adviserVo.advisorId);

                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    processIdReprocessAll = int.Parse(dr["ProcessId"].ToString());
                    processlogVo          = uploadsCommonBo.GetProcessLogInfo(processIdReprocessAll);
                    if (processlogVo.FileTypeId == 1 || processlogVo.FileTypeId == 3 || processlogVo.FileTypeId == 15 || processlogVo.FileTypeId == 17)
                    {
                        blResult = MFWERPTransactionWERPInsertion(processIdReprocessAll, out countTransactionsInserted, out countRejectedRecords, processlogVo.FileTypeId);
                    }
                    if (blResult == false)
                    {
                        error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
                    }
                }
            }

            if (error == "")
            {
                // Success Message
                //trErrorMessage.Visible = true;
                //lblError.Text = "Reprocess Done Successfully!";
                msgReprocessComplete.Visible = true;
            }
            else
            {
                // Failure Message
                trErrorMessage.Visible         = true;
                msgReprocessincomplete.Visible = true;
                lblError.Text = "ErrorStatus:" + error;
            }

            BindEquityTransactionGrid(ProcessId);
            //used to display alert msg after completion of reprocessing
        }
        private void BindBranchDropDown(int id)
        {
            try
            {
                UploadCommonBo uploadCommonBo = new UploadCommonBo();
                DataSet        ds             = uploadCommonBo.GetAdviserBranchList(id, currentUserRole);

                ddlBMBranch.DataSource     = ds.Tables[0];
                ddlBMBranch.DataTextField  = "AB_BranchName";
                ddlBMBranch.DataValueField = "AB_BranchId";
                ddlBMBranch.DataBind();
                if (ds.Tables[0].Rows.Count > 1)
                {
                    ddlBMBranch.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All", id.ToString()));
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "BMDashBoard.ascx:BindBranchDropDown()");

                object[] objects = new object[4];

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        private void BindListBranch(int Id, string userType)
        {
            UploadCommonBo uploadCommonBo = new UploadCommonBo();
            DataSet        ds             = uploadCommonBo.GetAdviserBranchList(Id, userType);

            ddlAdviserBranchList.DataSource     = ds.Tables[0];
            ddlAdviserBranchList.DataTextField  = "AB_BranchName";
            ddlAdviserBranchList.DataValueField = "AB_BranchId";
            ddlAdviserBranchList.DataBind();
            ddlAdviserBranchList.Items.Insert(0, new ListItem("Select a Branch", "Select a Branch"));
        }
Beispiel #8
0
        /// <summary>
        /// Used to bind branches of the Branch dropdown
        /// </summary>
        /// <param name="advisorVo"></param>
        /// <param name="rmVo"></param>
        private void BindBranch(AdvisorVo advisorVo, RMVo rmVo)
        {
            AdvisorBranchBo advisorBranchBo  = new AdvisorBranchBo();
            UploadCommonBo  uploadsCommonDao = new UploadCommonBo();
            //DataSet ds = uploadsCommonDao.GetAdviserBranchList(advisorVo.advisorId, "adviser");
            DataSet ds = advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, advisorVo.advisorId, "A");

            if (ds != null)
            {
                ddlPickBranch.DataSource     = ds;
                ddlPickBranch.DataValueField = ds.Tables[0].Columns["AB_BranchId"].ToString();
                ddlPickBranch.DataTextField  = ds.Tables[0].Columns["AB_BranchName"].ToString();
                ddlPickBranch.DataBind();
            }
        }
Beispiel #9
0
        private void CustomerTrailCommissionTransactionDelete()
        {
            UploadCommonBo uploadsCommonBo = new UploadCommonBo();

            foreach (GridDataItem gvr in this.GVTrailTransactionRejects.Items)
            {
                if (((CheckBox)gvr.FindControl("ChkOne")).Checked == true)
                {
                    int selectedRow = gvr.ItemIndex + 1;
                    int StagingID   = int.Parse((GVTrailTransactionRejects.MasterTableView.DataKeyValues[selectedRow - 1]["CMFTCCS_Id"].ToString()));
                    uploadsCommonBo.DeleteMFTrailTransactionStaging(StagingID);
                    BindTrailCommissionRejectedGrid(processId);
                }
            }
        }
        private bool MFWERPSIPTransactionInsertion(int UploadProcessId)
        {
            bool blResult = false;

            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();
            CamsUploadsBo camsUploadsBo              = new CamsUploadsBo();
            bool          camsSIPCommonStagingChk    = false;
            bool          camsSIPCommonStagingToWERP = false;
            bool          updateProcessLog           = false;
            string        packagePath;
            string        fileType = "CA";


            processlogVo = uploadsCommonBo.GetProcessLogInfo(UploadProcessId);
            if (processlogVo.FileTypeId == 20)
            {
                fileType = "CA";
            }
            else if (processlogVo.FileTypeId == 26)
            {
                fileType = "WPT";
            }
            else if (processlogVo.FileTypeId == 27)
            {
                fileType = "KA";
            }
            packagePath = Server.MapPath("\\UploadPackages\\CAMSSystematicUploadPackageNew\\CAMSSystematicUploadPackageNew\\UploadSIPCommonStagingCheck.dtsx");

            camsSIPCommonStagingChk = camsUploadsBo.CamsSIPCommonStagingChk(UploadProcessId, packagePath, configPath, fileType);
            processlogVo.NoOfTransactionInserted = uploadsCommonBo.GetUploadSystematicInsertCount(UploadProcessId, fileType);

            updateProcessLog = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
            if (camsSIPCommonStagingChk)
            {
                packagePath = Server.MapPath("\\UploadPackages\\CAMSSystematicUploadPackageNew\\CAMSSystematicUploadPackageNew\\UploadSIPCommonStagingToWERP.dtsx");
                camsSIPCommonStagingToWERP = camsUploadsBo.CamsSIPCommonStagingToWERP(UploadProcessId, packagePath, configPath);

                if (camsSIPCommonStagingToWERP)
                {
                    processlogVo.IsInsertionToWERPComplete = 1;
                    processlogVo.EndTime             = DateTime.Now;
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetUploadSystematicRejectCount(UploadProcessId, fileType);
                    blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                }
            }
            return(blResult);
        }
Beispiel #11
0
        private bool MFWERPProfileWERPInsertion(int ProcessId, out int countCustCreated, out int countFolioCreated, out int countRejectedRecords)
        {
            bool blResult = false;

            werpMFUploadsBo = new WerpMFUploadsBo();
            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();

            countCustCreated     = 0;
            countFolioCreated    = 0;
            countRejectedRecords = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);

            // Doing a check on data in Staging and marking IsRejected flag
            string packagePath = Server.MapPath("\\UploadPackages\\WerpMFProfileUploadPackageNew\\WerpMFProfileUploadPackageNew\\UploadChecksWerpMFProfileStaging.dtsx");
            bool   werpMFProStagingCheckResult = werpMFUploadsBo.WerpMFProcessDataInStagingProfile(ProcessId, adviserVo.advisorId, packagePath, configPath);

            // Insert Customer Details into Customer Tables
            bool werpMFProCreateCustomerResult    = werpMFUploadsBo.WerpMFInsertCustomerDetails(adviserVo.advisorId, ProcessId, rmVo.RMId, out countCustCreated, out countFolioCreated);
            bool werpMFProCreateBankAccountResult = false;

            if (werpMFProCreateCustomerResult)
            {
                processlogVo.NoOfCustomerInserted += countCustCreated;
                processlogVo.NoOfAccountsInserted += countFolioCreated;
                //countRejectedRecords = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, Contants.UploadExternalTypeWerp);
                processlogVo.NoOfRejectedRecords = countRejectedRecords;

                // Insert Bank Account Details
                packagePath = Server.MapPath("\\UploadPackages\\WerpMFProfileUploadPackageNew\\WerpMFProfileUploadPackageNew\\UploadWerpMFProfileNewBankAccountCreation.dtsx");
                werpMFProCreateBankAccountResult = werpMFUploadsBo.WerpMFCreationOfNewBankAccounts(ProcessId, packagePath, configPath);
                if (werpMFProCreateBankAccountResult)
                {
                    processlogVo.IsInsertionToWERPComplete  = 1;
                    processlogVo.IsInsertionToXtrnlComplete = 2;
                    processlogVo.EndTime = DateTime.Now;
                    bool updateProcessLog = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);

                    if (updateProcessLog)
                    {
                        blResult = true;
                    }
                }
            }

            return(blResult);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionBo.CheckSession();
            btnReprocess.Attributes.Add("onclick", "setTimeout(\"UpdateImg('Image1','/Images/Wait.gif');\",50);");
            //ProcessId = 0;
            uploadsCommonBo = new UploadCommonBo();
            configPath      = Server.MapPath(ConfigurationManager.AppSettings["SSISConfigPath"].ToString());

            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }

            if (Request.QueryString["filetypeid"] != null)
            {
                filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
            }

            if (Session["userVo"] != null)
            {
            }
            else
            {
                Session.Clear();
                Session.Abandon();
                // If User Sessions are empty, load the login control
                Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loadcontrol('SessionExpired','');", true);
            }

            // Get Advisor Vo from Session
            //adviserVo = (AdvisorVo)Session[SessionContents.AdvisorVo];
            //adviserId = adviserVo.advisorId;
            //rmVo = (RMVo)Session[SessionContents.RmVo];
            //.GetProcessLogInfo(ProcessId);

            ManageFolioLink(ProcessId);
            if (!IsPostBack)
            {
                mypager.CurrentPage      = 1;
                hdnProcessIdFilter.Value = ProcessId.ToString();
                ProcessId = int.Parse(hdnProcessIdFilter.Value);
                // Bind Grid
                BindWerpProfileGrid(ProcessId);
            }
        }
Beispiel #13
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();

            int    countTransactionsInserted = 0;
            int    countRejectedRecords      = 0;
            string error = "";
            int    processIdReprocessAll = 0;

            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
                blResult  = TradeAccountStagingInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords);
            }
            else
            {
                DataSet ds = uploadsCommonBo.GetEquityTradeAccountStagingProcessId(adviserVo.advisorId);
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    processIdReprocessAll = int.Parse(dr["ProcessId"].ToString());
                    blResult = TradeAccountStagingInsertion(processIdReprocessAll, out countTransactionsInserted, out countRejectedRecords);
                }
            }
            if (blResult == false)
            {
                error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
            }

            if (blResult)
            {
                // Success Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Done Successfully!";
            }
            else
            {
                // Failure Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Failure!";
            }
            BindRejectedUploadsGrid(ProcessId);
        }
        //private void BindListBranch(int rmId, string userType)
        //{
        //    UploadCommonBo uploadCommonBo = new UploadCommonBo();
        //    //DataSet ds = uploadCommonBo.GetAdviserBranchList(rmId, userType);
        //    DataSet dsAssociatedBranch=advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, 0, "A");
        //    if (dsAssociatedBranch!=null && dsAssociatedBranch.Tables[0].Rows.Count > 0)
        //    {
        //        ddlAdviserBranchList.DataSource = dsAssociatedBranch.Tables[0];
        //        ddlAdviserBranchList.DataTextField = "AB_BranchName";
        //        ddlAdviserBranchList.DataValueField = "AB_BranchId";
        //        ddlAdviserBranchList.DataBind();
        //        ddlAdviserBranchList.Items.Insert(0, new ListItem("Select a Branch", "Select a Branch"));
        //    }
        //    else
        //    {
        //        ddlAdviserBranchList.Items.Insert(0, new ListItem("No Branches Available to Associate", "No Branches Available to Associate"));
        //        ddlAdviserBranchList_CompareValidator2.ValueToCompare = "No Branches Available to Associate";
        //        ddlAdviserBranchList_CompareValidator2.ErrorMessage = "Cannot Add Customer Without a Branch";
        //    }
        //}
        private void BindListBranch()
        {
            if (advisorVo.A_AgentCodeBased != 1)
            {
                UploadCommonBo uploadCommonBo = new UploadCommonBo();
                DataSet        ds             = uploadCommonBo.GetAdviserBranchList(advisorVo.advisorId, "adviser");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    ddlAdviserBranchList.DataSource     = ds.Tables[0];
                    ddlAdviserBranchList.DataTextField  = "AB_BranchName";
                    ddlAdviserBranchList.DataValueField = "AB_BranchId";
                    //ddlAdviserBranchList.SelectedValue = "1339";
                    ddlAdviserBranchList.DataBind();
                    ddlAdviserBranchList.Items.Insert(0, new ListItem("Select", "Select"));
                }
                else
                {
                    ddlAdviserBranchList.Items.Insert(0, new ListItem("No Branches Available to Associate", "No Branches Available to Associate"));
                    ddlAdviserBranchList_CompareValidator2.ValueToCompare = "No Branches Available to Associate";
                    ddlAdviserBranchList_CompareValidator2.ErrorMessage   = "Cannot Add Customer Without a Branch";
                }
            }
            else
            {
                DataSet   BMDs   = new DataSet();
                DataTable BMList = new DataTable();
                //BMList.Columns.Add("AB_BranchId");
                //BMList.Columns.Add("AB_BranchName");
                BMDs = advisorBranchBo.GetBMRoleForAgentBased(advisorVo.advisorId);

                if (BMDs.Tables[0].Rows.Count > 0)
                {
                    ddlAdviserBranchList.DataSource     = BMDs;
                    ddlAdviserBranchList.DataValueField = BMDs.Tables[0].Columns["AB_BranchId"].ToString();
                    ddlAdviserBranchList.DataTextField  = BMDs.Tables[0].Columns["AB_BranchName"].ToString();
                    ddlAdviserBranchList.DataBind();
                    ddlAdviserBranchList.Enabled = false;
                }
                else
                {
                    ddlAdviseRMList.Enabled = false;
                }
            }
        }
Beispiel #15
0
        //private void BindListBranch(int rmId, string userType)
        //{
        //    UploadCommonBo uploadCommonBo = new UploadCommonBo();
        //    //DataSet ds = uploadCommonBo.GetAdviserBranchList(rmId, userType);
        //    DataSet dsAssociatedBranch=advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, 0, "A");
        //    if (dsAssociatedBranch!=null && dsAssociatedBranch.Tables[0].Rows.Count > 0)
        //    {
        //        ddlAdviserBranchList.DataSource = dsAssociatedBranch.Tables[0];
        //        ddlAdviserBranchList.DataTextField = "AB_BranchName";
        //        ddlAdviserBranchList.DataValueField = "AB_BranchId";
        //        ddlAdviserBranchList.DataBind();
        //        ddlAdviserBranchList.Items.Insert(0, new ListItem("Select a Branch", "Select a Branch"));
        //    }
        //    else
        //    {
        //        ddlAdviserBranchList.Items.Insert(0, new ListItem("No Branches Available to Associate", "No Branches Available to Associate"));
        //        ddlAdviserBranchList_CompareValidator2.ValueToCompare = "No Branches Available to Associate";
        //        ddlAdviserBranchList_CompareValidator2.ErrorMessage = "Cannot Add Customer Without a Branch";
        //    }
        //}
        private void BindListBranch()
        {
            UploadCommonBo uploadCommonBo = new UploadCommonBo();
            DataSet        ds             = uploadCommonBo.GetAdviserBranchList(advisorVo.advisorId, "adviser");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                ddlAdviserBranchList.DataSource     = ds.Tables[0];
                ddlAdviserBranchList.DataTextField  = "AB_BranchName";
                ddlAdviserBranchList.DataValueField = "AB_BranchId";
                ddlAdviserBranchList.DataBind();
                ddlAdviserBranchList.Items.Insert(0, new ListItem("Select", "Select"));
            }
            else
            {
                ddlAdviserBranchList.Items.Insert(0, new ListItem("No Branches Available to Associate", "No Branches Available to Associate"));
                ddlAdviserBranchList_CompareValidator2.ValueToCompare = "No Branches Available to Associate";
                ddlAdviserBranchList_CompareValidator2.ErrorMessage   = "Cannot Add Customer Without a Branch";
            }
        }
Beispiel #16
0
        protected void reprocess()
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();

            int countTransactionsInserted = 0;
            int countRejectedRecords      = 0;
            int filetypeId = 0;

            // BindGrid

            for (int i = 0; i < DistinctProcessId.Count; i++)
            {
                int ProcessId = Convert.ToInt32(DistinctProcessId[i].ToString());

                UploadProcessLogVo processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
                filetypeId = processlogVo.FileTypeId;
                if (processlogVo.FileTypeId == 1 || processlogVo.FileTypeId == 3 || processlogVo.FileTypeId == 15 || processlogVo.FileTypeId == 17)
                {
                    blResult = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords, processlogVo.FileTypeId);
                    // }

                    if (blResult)
                    {
                        // Success Message
                        lblMessage.Text = "Mapping and Reprocess Done Successfully!";
                    }
                    else
                    {
                        // Failure Message

                        lblMessage.Text = "Reprocess Failure!";
                    }
                }
                else
                {
                    //Karvy Reprocess
                }
            }
        }
        private void BindListBranch(int rmId, string userType)
        {
            UploadCommonBo uploadCommonBo = new UploadCommonBo();
            //DataSet ds = uploadCommonBo.GetAdviserBranchList(rmId, userType);
            DataSet dsAssociatedBranch = advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, 0, "A");

            if (dsAssociatedBranch != null && dsAssociatedBranch.Tables[0].Rows.Count > 0)
            {
                ddlAdviserBranchList.DataSource     = dsAssociatedBranch.Tables[0];
                ddlAdviserBranchList.DataTextField  = "AB_BranchName";
                ddlAdviserBranchList.DataValueField = "AB_BranchId";
                ddlAdviserBranchList.DataBind();
                ddlAdviserBranchList.Items.Insert(0, new ListItem("Select a Branch", "Select a Branch"));
            }
            else
            {
                ddlAdviserBranchList.Items.Insert(0, new ListItem("No Branches Available to Associate", "No Branches Available to Associate"));
                ddlAdviserBranchList_CompareValidator2.ValueToCompare = "No Branches Available to Associate";
                ddlAdviserBranchList_CompareValidator2.ErrorMessage   = "Cannot Add Customer Without a Branch";
            }
        }
Beispiel #18
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();

            int countTransactionsInserted = 0;
            int countRejectedRecords      = 0;

            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }

            //if (uploadsCommonBo.ResetRejectedFlagByProcess(ProcessId, 8))
            //{
            // start the reprocess from the staging onwards

            // WERP Insertion
            blResult = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords);
            //  }

            if (blResult)
            {
                // Success Message
                //reprocessSucess.Style.Add("visible", "true");
                msgReprocessComplete.Visible = true;
                //lblError.Text = "Reprocess Done Successfully!";
            }
            else
            {
                // Failure Message
                //reprocessSucess.Visible = false;
                msgReprocessincomplete.Visible = true;
                //lblError.Text = "Reprocess Failure!";
            }

            BindEquityTransactionGrid(ProcessId);
        }
Beispiel #19
0
        private bool TradeAccountStagingInsertion(int ProcessId, out int countTransactionsInserted, out int countRejectedRecords)
        {
            bool blResult = false;

            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();
            werpUploadBo    = new WerpUploadsBo();

            countTransactionsInserted = 0;
            countRejectedRecords      = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
            WerpEQUploadsBo werpEQUploadsBo = new WerpEQUploadsBo();
            // WERP Insertion
            string packagePath = Server.MapPath("\\UploadPackages\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\UploadChecksOnEQTradeStaging.dtsx");
            bool   WERPEQSecondStagingCheckResult = werpEQUploadsBo.WERPEQProcessDataInSecondStagingTradeAccount(ProcessId, packagePath, configPath, adviserVo.advisorId);

            if (WERPEQSecondStagingCheckResult)
            {
                packagePath = Server.MapPath("\\UploadPackages\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\UploadEQTradeStagingToWerp.dtsx");
                bool WERPEQTradeWerpResult = werpEQUploadsBo.WERPEQInsertTradeAccountDetails(ProcessId, packagePath, configPath);

                if (WERPEQTradeWerpResult)
                {
                    processlogVo.IsInsertionToWERPComplete = 1;
                    processlogVo.NoOfAccountsInserted      = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPEQ");
                    processlogVo.NoOfRejectedRecords       = uploadsCommonBo.GetAccountsUploadRejectCount(ProcessId, "WPEQ");
                    processlogVo.EndTime = DateTime.Now;
                    bool updateProcessLog = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);

                    if (updateProcessLog)
                    {
                        blResult = true;
                    }
                }
            }

            return(blResult);
        }
Beispiel #20
0
        public bool MFTrailTransactionInsertion(int UploadProcessId)
        {
            bool blResult = false;

            uploadProcessLogVo = new UploadProcessLogVo();
            uploadsCommonBo    = new UploadCommonBo();
            CamsUploadsBo camsUploadsBo = new CamsUploadsBo();
            bool          TempletonTrailCommonStagingChk     = false;
            bool          TempletonTrailCommonStagingToSetUp = false;
            bool          updateProcessLog = false;
            string        packagePath;


            uploadProcessLogVo = uploadsCommonBo.GetProcessLogInfo(UploadProcessId);

            packagePath = Server.MapPath("\\UploadPackages\\TrailCommisionUploadPackage\\TrailCommissionUpload\\TrailCommissionUpload\\callOnReprocess.dtsx");

            TempletonTrailCommonStagingChk             = uploadsCommonBo.TrailCommissionCommonStagingCheck(adviserId, UploadProcessId, packagePath, configPath);
            uploadProcessLogVo.NoOfTransactionInserted = uploadsCommonBo.GetUploadSystematicInsertCount(UploadProcessId, "TN");

            updateProcessLog = uploadsCommonBo.UpdateUploadProcessLog(uploadProcessLogVo);
            if (TempletonTrailCommonStagingChk)
            {
                packagePath = Server.MapPath("\\UploadPackages\\TrailCommisionUploadPackage\\TrailCommissionUpload\\TrailCommissionUpload\\commonStagingToTrailSetUp.dtsx");
                //TempletonTrailCommonStagingToSetUp = camsUploadsBo.CamsSIPCommonStagingToWERP(UploadProcessId, packagePath, configPath);
                TempletonTrailCommonStagingToSetUp = camsUploadsBo.TempletonTrailCommissionCommonStagingChk(UploadProcessId, packagePath, configPath, "TN", adviserId);


                if (TempletonTrailCommonStagingToSetUp)
                {
                    uploadProcessLogVo.IsInsertionToWERPComplete = 1;
                    uploadProcessLogVo.EndTime             = DateTime.Now;
                    uploadProcessLogVo.NoOfRejectedRecords = uploadsCommonBo.GetUploadSystematicRejectCount(UploadProcessId, "TN");
                    blResult = uploadsCommonBo.UpdateUploadProcessLog(uploadProcessLogVo);
                }
            }
            return(blResult);
        }
Beispiel #21
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();

            int countTransactionsInserted = 0;
            int countRejectedRecords      = 0;

            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }

            //if (uploadsCommonBo.ResetRejectedFlagByProcess(ProcessId, 13))
            //{
            //    // Start the Reprocess from the staging onwards

            // WERP Insertion
            blResult = TradeAccountStagingInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords);
            // }

            if (blResult)
            {
                // Success Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Done Successfully!";
            }
            else
            {
                // Failure Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Failure!";
            }

            BindRejectedUploadsGrid(ProcessId);
        }
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();
            xmlPath         = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString();
            string error                 = "";
            int    countCustCreated      = 0;
            int    countFolioCreated     = 0;
            int    countRejectedRecords  = 0;
            int    processIdReprocessAll = 0;
            string strErrorDesc          = "Please a select a processId";

            DropDownList ddl = (DropDownList)gvWERPProfileReject.HeaderRow.Cells[0].FindControl("ddlProcessId");
            string       val = ddl.SelectedValue;

            if (val == "Select")
            {
                Response.Write(@"<script language='javascript'>alert('The following errors have occurred: \n" + strErrorDesc + " .');</script>");
            }


            else
            {
                ProcessId = Convert.ToInt32(val);
                if (Request.QueryString["filetypeid"] != null)
                {
                    filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
                }
                if (Request.QueryString["processId"] != null)
                {
                    ProcessId    = Int32.Parse(Request.QueryString["processId"].ToString());
                    processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
                    if (processlogVo.FileTypeId == 7)
                    {
                        source = "WP";
                    }
                    else if (processlogVo.FileTypeId == 4)
                    {
                        source = "KA";
                    }
                    else if (processlogVo.FileTypeId == 2)
                    {
                        source = "CA";
                    }
                    else if (processlogVo.FileTypeId == 16)
                    {
                        source = "TN";
                    }
                    else if (processlogVo.FileTypeId == 18)
                    {
                        source = "DT";
                    }
                    else if (processlogVo.FileTypeId == 21)
                    {
                        source = "SU";
                    }
                    if (processlogVo.FileTypeId == 7 || processlogVo.FileTypeId == 4 || processlogVo.FileTypeId == 2 || processlogVo.FileTypeId == 16 || processlogVo.FileTypeId == 18 || processlogVo.FileTypeId == 21)
                    {
                        StandardProfileUploadBo standardProfileUploadBo = new StandardProfileUploadBo();
                        //Checks in Profile Staging
                        string packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadsCommonProfileChecksInProfileStaging.dtsx");
                        bool   karvyProCommonChecksResult = standardProfileUploadBo.StdCommonProfileChecks(ProcessId, processlogVo.AdviserId, packagePath, configPath);
                        if (karvyProCommonChecksResult)
                        {
                            // Insert Customer Details into WERP Tables

                            bool stdProCreateCustomerResult = standardProfileUploadBo.StdInsertCustomerDetails(processlogVo.AdviserId, ProcessId, processlogVo.RmId, processlogVo.BranchId, xmlPath, out countCustCreated);
                            if (stdProCreateCustomerResult)
                            {
                                //Create new Bank Accounts
                                packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadCreateNewBankAccount.dtsx");
                                bool stdProCreateBankAccountResult = standardProfileUploadBo.StdCreationOfNewBankAccounts(ProcessId, packagePath, configPath, adviserVo.advisorId);
                                if (stdProCreateBankAccountResult)
                                {
                                    processlogVo.IsInsertionToWERPComplete = 1;
                                    processlogVo.EndTime                = DateTime.Now;
                                    processlogVo.NoOfRejectedRecords    = uploadsCommonBo.GetUploadProfileRejectCount(ProcessId, source);
                                    processlogVo.NoOfCustomerInserted   = processlogVo.NoOfCustomerInserted + countCustCreated;
                                    processlogVo.NoOfCustomerDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfCustomerInserted - processlogVo.NoOfRejectedRecords;
                                    processlogVo.NoOfInputRejects       = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, source);
                                    blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                                    if (blResult)
                                    {
                                        bool stdProCommonDeleteResult = standardProfileUploadBo.StdDeleteCommonStaging(ProcessId);
                                    }
                                }
                            }
                        }
                    }
                }

                else
                {
                    DataSet ds = uploadsCommonBo.GetWERPUploadDetailsForProcessId(ProcessId);
                    //DataSet ds = uploadsCommonBo.GetWERPUploadProcessId();
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        rmId                  = int.Parse(dr["AR_RMId"].ToString());
                        adviserId             = int.Parse(dr["A_AdviserId"].ToString());
                        processIdReprocessAll = ProcessId;
                        processlogVo          = uploadsCommonBo.GetProcessLogInfo(processIdReprocessAll);
                        if (processlogVo.FileTypeId == 7)
                        {
                            source = "WP";
                        }
                        else if (processlogVo.FileTypeId == 4)
                        {
                            source = "KA";
                        }
                        else if (processlogVo.FileTypeId == 2)
                        {
                            source = "CA";
                        }
                        else if (processlogVo.FileTypeId == 16)
                        {
                            source = "TN";
                        }
                        else if (processlogVo.FileTypeId == 18)
                        {
                            source = "DT";
                        }
                        else if (processlogVo.FileTypeId == 21)
                        {
                            source = "SU";
                        }

                        if (processlogVo.FileTypeId == 7 || processlogVo.FileTypeId == 4 || processlogVo.FileTypeId == 2 || processlogVo.FileTypeId == 16 || processlogVo.FileTypeId == 18 || processlogVo.FileTypeId == 21)
                        {
                            StandardProfileUploadBo standardProfileUploadBo = new StandardProfileUploadBo();
                            //Checks in Profile Staging
                            string packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadsCommonProfileChecksInProfileStaging.dtsx");
                            bool   karvyProCommonChecksResult = standardProfileUploadBo.StdCommonProfileChecks(processIdReprocessAll, adviserId, packagePath, configPath);
                            if (karvyProCommonChecksResult)
                            {
                                // Insert Customer Details into WERP Tables

                                bool stdProCreateCustomerResult = standardProfileUploadBo.StdInsertCustomerDetails(adviserId, processIdReprocessAll, rmId, processlogVo.BranchId, xmlPath, out countCustCreated);
                                if (stdProCreateCustomerResult)
                                {
                                    //Create new Bank Accounts
                                    packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadCreateNewBankAccount.dtsx");
                                    bool stdProCreateBankAccountResult = standardProfileUploadBo.StdCreationOfNewBankAccounts(processIdReprocessAll, packagePath, configPath, adviserVo.advisorId);
                                    if (stdProCreateBankAccountResult)
                                    {
                                        processlogVo.IsInsertionToWERPComplete = 1;
                                        processlogVo.EndTime                = DateTime.Now;
                                        processlogVo.NoOfRejectedRecords    = uploadsCommonBo.GetUploadProfileRejectCount(processIdReprocessAll, source);
                                        processlogVo.NoOfCustomerInserted   = processlogVo.NoOfCustomerInserted + countCustCreated;
                                        processlogVo.NoOfCustomerDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfCustomerInserted - processlogVo.NoOfRejectedRecords;
                                        processlogVo.NoOfInputRejects       = uploadsCommonBo.GetUploadProfileInputRejectCount(processIdReprocessAll, source);
                                        blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                                        if (blResult)
                                        {
                                            bool stdProCommonDeleteResult = standardProfileUploadBo.StdDeleteCommonStaging(processIdReprocessAll);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if (blResult == false)
                {
                    error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
                }
                if (blResult)
                {
                    // Success Message
                    //trErrorMessage.Visible = true;
                    //lblError.Text = "Reprocess Done Successfully!";
                    msgReprocessComplete.Visible = true;
                }
                else
                {
                    // Failure Message
                    msgReprocessincomplete.Visible = true;
                }

                BindWerpProfileGrid(ProcessId);
            }
        }
        protected void btnProbableInsert_Click(object sender, EventArgs e)
        {
            bool   result       = true;
            bool   blResult     = true;
            string gvStagingIds = "";

            uploadsCommonBo = new UploadCommonBo();
            processlogVo    = uploadsCommonBo.GetProcessLogInfo(ProcessId);

            int fileTypeId = processlogVo.FileTypeId;

            rejectedRecordsBo = new RejectedRecordsBo();
            foreach (GridDataItem gvRow in gvWERPTrans.MasterTableView.Items)
            //foreach (GridViewRow gvRow in gvWERPTrans.Rows)
            {
                CheckBox ChkBxItem = (CheckBox)gvRow.FindControl("chkId");
                if (ChkBxItem.Checked)
                {
                    gvStagingIds += gvWERPTrans.MasterTableView.DataKeyValues[gvRow.RowIndex]["CMFTSId"].ToString() + ",";
                }
            }
            result = rejectedRecordsBo.InsertProbableDuplicatesRejectedTransaction(gvStagingIds);
            if (result)
            {
                // Success Message
                processlogVo.IsInsertionToWERPComplete = 1;
                processlogVo.NoOfTransactionInserted   = uploadsCommonBo.GetTransUploadCount(ProcessId, "WPMF");

                processlogVo.EndTime = DateTime.Now;

                if (fileTypeId == 1)
                {
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeCAMS);
                }
                else if (fileTypeId == 3)
                {
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeKarvy);
                }
                else if (fileTypeId == 15)
                {
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeTemp);
                }
                else if (fileTypeId == 17)
                {
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeDeutsche);
                }
                else if (filetypeId == 25)
                {
                    processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, "SU");
                }
                blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);

                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('Records Inserted Successfully');", true);
            }
            else
            {
                // Failure Message
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('Please Select Probable Duplicate Records');", true);
            }

            BindEquityTransactionGrid(ProcessId);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionBo.CheckSession();
            btnReprocess.Attributes.Add("onclick", "setTimeout(\"UpdateImg('Image1','/Images/Wait.gif');\",50);");
            //ProcessId = 0;
            uploadsCommonBo = new UploadCommonBo();
            configPath      = Server.MapPath(ConfigurationManager.AppSettings["SSISConfigPath"].ToString());

            adviserVo = (AdvisorVo)Session[SessionContents.AdvisorVo];
            rmVo      = (RMVo)Session[SessionContents.RmVo];

            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }

            if (Request.QueryString["filetypeid"] != null)
            {
                filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
                LinkInputRejects.Visible = true;
            }
            else
            {
                LinkInputRejects.Visible = false;
            }

            if (Session["userVo"] != null)
            {
            }
            else
            {
                Session.Clear();
                Session.Abandon();
                // If User Sessions are empty, load the login control
                Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loadcontrol('SessionExpired','');", true);
            }

            if (adviserVo.advisorId == 1000)
            {
                if (ddlAdviser.SelectedValue != "Select" && ddlAdviser.SelectedValue != "")
                {
                    adviserId = Convert.ToInt32(ddlAdviser.SelectedValue.ToString());
                    if (hfRmId.Value != "")
                    {
                        rmId = Convert.ToInt32(hfRmId.Value);
                    }
                    trGridView.Visible = true;

                    Panel2.ScrollBars           = ScrollBars.Horizontal;
                    Session["adviserId_Upload"] = adviserId;
                }
                else
                {
                    trReprocess.Visible = false;
                    trGridView.Visible  = false;
                    Panel2.ScrollBars   = ScrollBars.None;
                    // Panel2.Visible = false;
                    adviserId = 1000;
                    //rmId = rmVo.RMId;
                }
            }
            else
            {
                trReprocess.Visible = true;
                trGridView.Visible  = true;
                Panel2.ScrollBars   = ScrollBars.Horizontal;
                //Panel2.Visible = true;
                trAdviserSelection.Visible = false;
                adviserId = adviserVo.advisorId;
            }

            // Get Advisor Vo from Session

            //.GetProcessLogInfo(ProcessId);

            ManageFolioLink(ProcessId);
            if (!IsPostBack)
            {
                if (adviserId != 1000)
                {
                    mypager.CurrentPage      = 1;
                    hdnProcessIdFilter.Value = ProcessId.ToString();
                    ProcessId = int.Parse(hdnProcessIdFilter.Value);
                    // Bind Grid
                    BindWerpProfileGrid(ProcessId);
                }
                else
                {
                    BindAdviserDropDownList();
                }
            }
        }
        private bool MFWERPTransactionWERPInsertion(int ProcessId, out int countTransactionsInserted, out int countRejectedRecords, int fileTypeId)
        {
            bool blResult = false;

            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();
            werpUploadBo    = new WerpUploadsBo();

            countTransactionsInserted = 0;
            countRejectedRecords      = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);

            //CAMS and KARVY Reprocess
            string packagePath       = Server.MapPath("\\UploadPackages\\MFTransactionCommonUploadPackage\\MFTransactionCommonUploadPackage\\MFTransactionCommonUploadPackage\\ChecksCommonUploadPackage.dtsx");
            bool   CommonTransChecks = false;

            if (fileTypeId == 1)
            {
                bool camsDatatranslationCheckResult = uploadsCommonBo.UploadsCAMSDataTranslationForReprocess(ProcessId);
                if (camsDatatranslationCheckResult)
                {
                    CommonTransChecks = uploadsCommonBo.TransCommonChecks(adviserVo.advisorId, ProcessId, packagePath, configPath, "CA", "CAMS");
                }
            }
            else if (fileTypeId == 3)
            {
                bool karvyDataTranslationCheck = uploadsCommonBo.UploadsKarvyDataTranslationForReprocess(ProcessId);
                if (karvyDataTranslationCheck)
                {
                    CommonTransChecks = uploadsCommonBo.TransCommonChecks(adviserVo.advisorId, ProcessId, packagePath, configPath, "KA", "Karvy");
                }
            }
            else if (fileTypeId == 15)
            {
                bool TempletonDataTranslationCheck = uploadsCommonBo.UploadsTempletonDataTranslationForReprocess(ProcessId);
                if (TempletonDataTranslationCheck)
                {
                    CommonTransChecks = uploadsCommonBo.TransCommonChecks(adviserVo.advisorId, ProcessId, packagePath, configPath, "TN", "Templeton");
                }
            }
            else if (fileTypeId == 17)
            {
                bool DeutscheDataTranslationCheck = uploadsCommonBo.UploadsDeutscheDataTranslationForReprocess(ProcessId);
                if (DeutscheDataTranslationCheck)
                {
                    CommonTransChecks = uploadsCommonBo.TransCommonChecks(adviserVo.advisorId, ProcessId, packagePath, configPath, "DT", "Deutsche");
                }
            }


            if (CommonTransChecks)
            {
                packagePath = Server.MapPath("\\UploadPackages\\MFTransactionCommonUploadPackage\\MFTransactionCommonUploadPackage\\MFTransactionCommonUploadPackage\\InsertTransactionIntoWERP.dtsx");
                bool insertTransWERP = uploadsCommonBo.InsertTransToWERP(ProcessId, packagePath, configPath);
                if (insertTransWERP)
                {
                    processlogVo.IsInsertionToWERPComplete = 1;
                    processlogVo.NoOfTransactionInserted   = uploadsCommonBo.GetTransUploadCount(ProcessId, "WPMF");

                    processlogVo.EndTime = DateTime.Now;

                    if (fileTypeId == 1)
                    {
                        processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeCAMS);
                    }
                    else if (fileTypeId == 3)
                    {
                        processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeKarvy);
                    }
                    else if (fileTypeId == 15)
                    {
                        processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeTemp);
                    }
                    else if (fileTypeId == 17)
                    {
                        processlogVo.NoOfRejectedRecords = uploadsCommonBo.GetTransUploadRejectCount(ProcessId, Contants.UploadExternalTypeDeutsche);
                    }
                    blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                }
            }
            return(blResult);
        }
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool                    blResult                = false;
            UploadCommonBo          uploadsCommonBo         = new UploadCommonBo();
            UploadProcessLogVo      processlogVo            = new UploadProcessLogVo();
            UploadProcessLogVo      TempprocesslogVo        = new UploadProcessLogVo();
            StandardProfileUploadBo standardProfileUploadBo = new StandardProfileUploadBo();
            StandardFolioUploadBo   standardFolioUploadBo   = new StandardFolioUploadBo();
            CamsUploadsBo           camsUploadsBo           = new CamsUploadsBo();
            string                  strErrorDesc            = "Please a select a processId";
            DropDownList            ddl = (DropDownList)gvCAMSProfileReject.HeaderRow.Cells[0].FindControl("ddlProcessId");
            string                  val = ddl.SelectedValue;

            if (val == "Select")
            {
                Response.Write(@"<script language='javascript'>alert('The following errors have occurred: \n" + strErrorDesc + " .');</script>");
            }
            else
            {
                ProcessId = Convert.ToInt32(val);
                // BindGrid
                if (Request.QueryString["processId"] != null)
                {
                    ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
                }
                if (Request.QueryString["filetypeid"] != null)
                {
                    filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
                }

                processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
                if (uploadsCommonBo.ResetRejectedFlagByProcess(ProcessId, 9))
                {
                    //Folio Chks in Std Folio Staging
                    string packagePath = Server.MapPath("\\UploadPackages\\StandardFolioUploadPackageNew\\StandardFolioUploadPackageNew\\UploadsCommonFolioChecksInFolioStaging.dtsx");
                    bool   camsFolioStagingChkResult = standardFolioUploadBo.StdFolioChksInFolioStaging(packagePath, processlogVo.AdviserId, ProcessId, configPath);
                    if (camsFolioStagingChkResult)
                    {
                        //Folio Chks in Std Folio Staging
                        packagePath = Server.MapPath("\\UploadPackages\\StandardFolioUploadPackageNew\\StandardFolioUploadPackageNew\\UploadStdFolioFromFolioStagingToWerpTable.dtsx");
                        bool camsFolioWerpInsertionResult = standardFolioUploadBo.StdCustomerFolioCreation(packagePath, processlogVo.AdviserId, ProcessId, configPath);
                        if (camsFolioWerpInsertionResult)
                        {
                            processlogVo.IsInsertionToWERPComplete = 1;
                            processlogVo.EndTime = DateTime.Now;
                            if (processlogVo.FileTypeId == 2)
                            {
                                processlogVo.IsInsertionToWERPComplete = 1;
                                processlogVo.EndTime               = DateTime.Now;
                                processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "CA");
                                processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                                processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "CA");
                                processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                            }
                            else if (processlogVo.FileTypeId == 4)
                            {
                                processlogVo.IsInsertionToWERPComplete = 1;
                                processlogVo.EndTime               = DateTime.Now;
                                processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "KA");
                                processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                                processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "KA");
                                processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                            }
                            else if (processlogVo.FileTypeId == 16)
                            {
                                processlogVo.IsInsertionToWERPComplete = 1;
                                processlogVo.EndTime               = DateTime.Now;
                                processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "TN");
                                processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                                processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "TN");
                                processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                                blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                            }
                            else if (processlogVo.FileTypeId == 18)
                            {
                                processlogVo.IsInsertionToWERPComplete = 1;
                                processlogVo.EndTime               = DateTime.Now;
                                processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "DT");
                                processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                                processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "DT");
                                processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                                blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                            }
                            blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                            if (blResult)
                            {
                                bool stdFolioCommonDeleteResult = standardFolioUploadBo.StdDeleteCommonStaging(ProcessId);
                            }
                        }
                    }
                }

                if (blResult)
                {
                    // Success Message
                    trErrorMessage.Visible = true;
                    lblError.Text          = "Reprocess Done Successfully!";
                }
                else
                {
                    // Failure Message
                    trErrorMessage.Visible = true;
                    lblError.Text          = "Reprocess Failure!";
                }

                BindGrid(ProcessId);
            }
        }
Beispiel #27
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            //System.Threading.Thread.Sleep(5000);
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();
            UploadProcessLogVo processlogVo    = new UploadProcessLogVo();
            string             error           = "";
            int          processIdReprocessAll = 0;
            string       strErrorDesc          = "Please a select a processId";
            DropDownList ddl = (DropDownList)gvSIPReject.HeaderRow.Cells[0].FindControl("ddlProcessId");
            string       val = ddl.SelectedValue;

            if (val == "Select")
            {
                Response.Write(@"<script language='javascript'>alert('The following errors have occurred: \n" + strErrorDesc + " .');</script>");
            }
            else
            {
                processId = Convert.ToInt32(val);

                if (Request.QueryString["processId"] != null)
                {
                    processId    = Int32.Parse(Request.QueryString["processId"].ToString());
                    processlogVo = uploadsCommonBo.GetProcessLogInfo(processId);

                    blResult = MFWERPSIPTransactionInsertion(processId);
                }

                else
                {
                    DataSet ds = uploadsCommonBo.GetSuperAdminSIPUploadRejectDistinctDetailsForProcessId(processId);
                    //DataSet ds = uploadsCommonBo.GetSuperAdminSIPUploadRejectDistinctProcessIdForAdviser();
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        //processIdReprocessAll = int.Parse(dr["WUPL_ProcessId"].ToString());
                        processIdReprocessAll = processId;
                        processlogVo          = uploadsCommonBo.GetProcessLogInfo(processIdReprocessAll);

                        blResult = MFWERPSIPTransactionInsertion(processIdReprocessAll);

                        if (blResult == false)
                        {
                            error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
                        }
                    }
                }

                if (error == "")
                {
                    // Success Message
                    //trErrorMessage.Visible = true;
                    //lblError.Text = "Reprocess Done Successfully!";
                    msgReprocessComplete.Visible = true;
                }
                else
                {
                    // Failure Message
                    trErrorMessage.Visible         = true;
                    msgReprocessincomplete.Visible = true;
                    lblError.Text = "ErrorStatus:" + error;
                }

                BindRejectedSIPGrid(processId);
            }
        }
Beispiel #28
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();

            int    countTransactionsInserted = 0;
            int    countRejectedRecords      = 0;
            string error = "";
            int    processIdReprocessAll = 0;

            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
                blResult  = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords);
            }
            else
            {
                #region removed coz its taking all the processids
                //DataSet ds = uploadsCommonBo.GetEquityTransactionStagingProcessId(adviserVo.advisorId);
                #endregion

                string StagingID = string.Empty;

                foreach (GridDataItem gvr in this.gvWERPTrans.Items)
                {
                    if (((CheckBox)gvr.FindControl("chkBxWPTrans")).Checked == true)
                    {
                        StagingID += Convert.ToString(gvWERPTrans.MasterTableView.DataKeyValues[gvr.ItemIndex]["ProcessId"]) + "~";
                    }
                }

                string[] a = StagingID.Split('~');


                foreach (string word in a)


                //foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    if (word != "")
                    {
                        //processIdReprocessAll = int.Parse(dr["ProcessId"].ToString());
                        processIdReprocessAll = int.Parse(word);
                        blResult = MFWERPTransactionWERPInsertion(processIdReprocessAll, out countTransactionsInserted, out countRejectedRecords);
                    }
                }
            }
            if (blResult == false)
            {
                error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";";
            }

            if (blResult == true)
            {
                NeedSource();
                gvWERPTrans.MasterTableView.Rebind();
                msgReprocessComplete.Visible = true;
                msgDelete.Visible            = false;
            }
            else
            {
                // Failure Message
                //reprocessSucess.Visible = false;
                msgReprocessincomplete.Visible = true;
                //lblError.Text = "Reprocess Failure!";
            }

            BindEquityTransactionGrid(ProcessId);
        }
Beispiel #29
0
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool blResult = false;

            uploadsCommonBo = new UploadCommonBo();
            xmlPath         = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString();

            int countCustCreated     = 0;
            int countFolioCreated    = 0;
            int countRejectedRecords = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
            if (processlogVo.FileTypeId == 7)
            {
                source = "WP";
            }
            else if (processlogVo.FileTypeId == 4)
            {
                source = "KA";
            }
            else if (processlogVo.FileTypeId == 2)
            {
                source = "CA";
            }
            else if (processlogVo.FileTypeId == 16)
            {
                source = "TN";
            }
            else if (processlogVo.FileTypeId == 18)
            {
                source = "DT";
            }

            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }
            if (Request.QueryString["filetypeid"] != null)
            {
                filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
            }


            StandardProfileUploadBo standardProfileUploadBo = new StandardProfileUploadBo();
            //Checks in Profile Staging
            string packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadsCommonProfileChecksInProfileStaging.dtsx");
            bool   karvyProCommonChecksResult = standardProfileUploadBo.StdCommonProfileChecks(ProcessId, adviserVo.advisorId, packagePath, configPath);

            if (karvyProCommonChecksResult)
            {
                // Insert Customer Details into WERP Tables

                bool stdProCreateCustomerResult = standardProfileUploadBo.StdInsertCustomerDetails(adviserVo.advisorId, ProcessId, rmVo.RMId, processlogVo.BranchId, xmlPath, out countCustCreated);
                if (stdProCreateCustomerResult)
                {
                    //Create new Bank Accounts
                    packagePath = Server.MapPath("\\UploadPackages\\StandardProfileUploadPackageNew\\StandardProfileUploadPackageNew\\UploadCreateNewBankAccount.dtsx");
                    bool stdProCreateBankAccountResult = standardProfileUploadBo.StdCreationOfNewBankAccounts(ProcessId, packagePath, configPath);
                    if (stdProCreateBankAccountResult)
                    {
                        processlogVo.IsInsertionToWERPComplete = 1;
                        processlogVo.EndTime                = DateTime.Now;
                        processlogVo.NoOfRejectedRecords    = uploadsCommonBo.GetUploadProfileRejectCount(ProcessId, source);
                        processlogVo.NoOfCustomerInserted   = processlogVo.NoOfCustomerInserted + countCustCreated;
                        processlogVo.NoOfCustomerDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfCustomerInserted - processlogVo.NoOfRejectedRecords;
                        processlogVo.NoOfInputRejects       = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, source);
                        blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                        if (blResult)
                        {
                            bool stdProCommonDeleteResult = standardProfileUploadBo.StdDeleteCommonStaging(ProcessId);
                        }
                    }
                }
            }


            if (blResult)
            {
                // Success Message
                //trErrorMessage.Visible = true;
                //lblError.Text = "Reprocess Done Successfully!";
                msgReprocessComplete.Visible = true;
            }
            else
            {
                // Failure Message
                msgReprocessincomplete.Visible = true;
            }

            BindWerpProfileGrid(ProcessId);
        }
        protected void btnReprocess_Click(object sender, EventArgs e)
        {
            bool                    blResult                = false;
            UploadCommonBo          uploadsCommonBo         = new UploadCommonBo();
            UploadProcessLogVo      processlogVo            = new UploadProcessLogVo();
            UploadProcessLogVo      TempprocesslogVo        = new UploadProcessLogVo();
            StandardProfileUploadBo standardProfileUploadBo = new StandardProfileUploadBo();
            StandardFolioUploadBo   standardFolioUploadBo   = new StandardFolioUploadBo();
            CamsUploadsBo           camsUploadsBo           = new CamsUploadsBo();
            int countCustCreated = 0;

            //int countFolioCreated = 0;
            //int countRejectedRecords = 0;

            // processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);


            // BindGrid
            if (Request.QueryString["processId"] != null)
            {
                ProcessId = Int32.Parse(Request.QueryString["processId"].ToString());
            }
            if (Request.QueryString["filetypeid"] != null)
            {
                filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString());
            }

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
            if (uploadsCommonBo.ResetRejectedFlagByProcess(ProcessId, 9))
            {
                //Folio Chks in Std Folio Staging
                string packagePath = Server.MapPath("\\UploadPackages\\StandardFolioUploadPackageNew\\StandardFolioUploadPackageNew\\UploadsCommonFolioChecksInFolioStaging.dtsx");
                bool   camsFolioStagingChkResult = standardFolioUploadBo.StdFolioChksInFolioStaging(packagePath, adviserVo.advisorId, ProcessId, configPath);
                if (camsFolioStagingChkResult)
                {
                    //Folio Chks in Std Folio Staging
                    packagePath = Server.MapPath("\\UploadPackages\\StandardFolioUploadPackageNew\\StandardFolioUploadPackageNew\\UploadStdFolioFromFolioStagingToWerpTable.dtsx");
                    bool camsFolioWerpInsertionResult = standardFolioUploadBo.StdCustomerFolioCreation(packagePath, adviserVo.advisorId, ProcessId, configPath);
                    if (camsFolioWerpInsertionResult)
                    {
                        processlogVo.IsInsertionToWERPComplete = 1;
                        processlogVo.EndTime = DateTime.Now;
                        if (processlogVo.FileTypeId == 2)
                        {
                            processlogVo.IsInsertionToWERPComplete = 1;
                            processlogVo.EndTime               = DateTime.Now;
                            processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "CA");
                            processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                            processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "CA");
                            processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                        }
                        else if (processlogVo.FileTypeId == 4)
                        {
                            processlogVo.IsInsertionToWERPComplete = 1;
                            processlogVo.EndTime               = DateTime.Now;
                            processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "KA");
                            processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                            processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "KA");
                            processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                        }
                        else if (processlogVo.FileTypeId == 16)
                        {
                            processlogVo.IsInsertionToWERPComplete = 1;
                            processlogVo.EndTime               = DateTime.Now;
                            processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "TN");
                            processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                            processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "TN");
                            processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                            blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                        }
                        else if (processlogVo.FileTypeId == 18)
                        {
                            processlogVo.IsInsertionToWERPComplete = 1;
                            processlogVo.EndTime               = DateTime.Now;
                            processlogVo.NoOfRejectedRecords   = uploadsCommonBo.GetProfileUploadRejectCount(ProcessId, "DT");
                            processlogVo.NoOfAccountsInserted  = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPMF");
                            processlogVo.NoOfInputRejects      = uploadsCommonBo.GetUploadProfileInputRejectCount(ProcessId, "DT");
                            processlogVo.NoOfAccountDuplicates = processlogVo.NoOfTotalRecords - processlogVo.NoOfAccountsInserted - processlogVo.NoOfRejectedRecords;
                            blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                        }
                        blResult = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);
                        if (blResult)
                        {
                            bool stdFolioCommonDeleteResult = standardFolioUploadBo.StdDeleteCommonStaging(ProcessId);
                        }
                    }
                }
            }

            if (blResult)
            {
                // Success Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Done Successfully!";
            }
            else
            {
                // Failure Message
                trErrorMessage.Visible = true;
                lblError.Text          = "Reprocess Failure!";
            }

            BindGrid(ProcessId);
        }