protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e) { int userId = 0; int customerId = 0; customerId = Convert.ToInt32(e.CommandArgument); UserVo userVo = (UserVo)Session["userVo"]; userId = userVo.UserId; CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo(); CustomerAccountBo customerBo = new CustomerAccountBo(); GridView gv = (GridView)sender; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); bool isSucess = rejectedTransactionsBo.MapEquityToCustomer(transactionStagingId, customerId, userId); if (isSucess) { gvCustomers.Visible = false; lblMessage.Visible = true; lblMessage.Text = "Customer is mapped"; lblMessage.CssClass = "SuccessMsg"; tblSearch.Visible = false; } else { lblMessage.Visible = true; lblMessage.Text = "An error occurred while mapping."; } }
protected void chkUseDummyPan_CheckedChanged(object sender, EventArgs e) { //if (rbtnNo.Checked == true) //{ // txtPanNumber.Enabled = true; // txtPanNumber.Text = string.Empty; //} //else if (rbtnYes.Checked == true) //{ if (chkUseDummyPan.Checked == true) { int adviserId = advisorVo.advisorId; int createdBy = advisorVo.advisorId; int modifiedBy = advisorVo.advisorId; int dummyPan = 0; //DateTime modifiedOn = DateTime.Now; //DateTime createdOn = DateTime.Now; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); dummyPan = rejectedTransactionsBo.GetNewDummyPan(adviserId, createdBy, modifiedBy, out dummyPan); txtPanNumber.Text = "WERPAN" + dummyPan.ToString(); txtPanNumber.Enabled = false; } else { txtPanNumber.Enabled = true; txtPanNumber.Text = string.Empty; } }
protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e) { int i; int userId = 0; int customerId = 0; bool isSucess = true; customerId = Convert.ToInt32(e.CommandArgument); UserVo userVo = (UserVo)Session["userVo"]; userId = userVo.UserId; CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo(); CustomerAccountBo customerBo = new CustomerAccountBo(); GridView gv = (GridView)sender; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); string transactionId = Convert.ToString(Request.Params["id"]); string[] testArray = transactionId.Split('~'); for (i = 0; i < testArray.Length; i++) { transactionStagingId = int.Parse(testArray[i]); isSucess = rejectedTransactionsBo.MapEquityToCustomer(transactionStagingId, customerId, userId); } if (isSucess) { gvCustomers.Visible = false; lblMessage.Visible = true; lblMessage.Text = "Customer is mapped"; lblMessage.CssClass = "SuccessMsg"; tblSearch.Visible = false; } else { lblMessage.Visible = true; lblMessage.Text = "An error occurred while mapping."; } }
protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e) { int userId = 0; int customerId = 0; customerId = Convert.ToInt32(e.CommandArgument); UserVo userVo = (UserVo)Session["userVo"]; userId = userVo.UserId; bool insertioncomplete = true; CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo(); CustomerAccountBo customerBo = new CustomerAccountBo(); GridView gv = (GridView)sender; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); try { insertioncomplete = MapfoliotoCustomer(customerId); } catch (Exception ex) { insertioncomplete = false; } if (insertioncomplete) { gvCustomers.Visible = false; lblMessage.Visible = true; lblMessage.Text = "Customer is mapped"; lblMessage.CssClass = "SuccessMsg"; tblSearch.Visible = false; reprocess(); } else { lblMessage.Visible = true; lblMessage.Text = "An error occurred while mapping."; } }
private bool MapfoliotoCustomer(int customerId) { bool result = true; UserVo userVo = (UserVo)Session["userVo"]; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); int userId = userVo.UserId; for (int i = 0; i < Stagingtableid.Count; i++) { try { MFTransactionStagingId = Convert.ToInt32(Stagingtableid[i]); result = rejectedTransactionsBo.MapFolioToCustomer(MFTransactionStagingId, customerId, userId); } catch (Exception ex) { result = false; } } return(result); }
private bool MapfoliotoCustomer(int customerId) { int i; string[] testArrayFolio = new string[0]; string[] testArray = new string[0]; string[] testArraySIPFolio = new string[0]; string[] testArrayTrailFolio = new string[0]; bool result = true; UserVo userVo = (UserVo)Session["userVo"]; RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); string folioId = Convert.ToString(Request.Params["Folioid"]); if (folioId != null) { testArrayFolio = folioId.Split('~'); } string transactionId = Convert.ToString(Request.Params["id"]); if (transactionId != null) { testArray = transactionId.Split('~'); } string SIPFolioid = Convert.ToString(Request.Params["SIPFolioid"]); if (SIPFolioid != null) { testArraySIPFolio = SIPFolioid.Split('~'); } string TrailFolioid = Convert.ToString(Request.Params["TrailFolioid"]); if (TrailFolioid != null) { testArrayTrailFolio = TrailFolioid.Split('~'); } int userId = userVo.UserId; if (transactionId != null) { for (i = 0; i < testArray.Length; i++) { MFTransactionStagingId = int.Parse(testArray[i]); result = rejectedTransactionsBo.MapFolioToCustomer(MFTransactionStagingId, customerId, userId); } } if (folioId != null) { for (i = 0; i < testArrayFolio.Length; i++) { MFFolioStagingId = int.Parse(testArrayFolio[i]); result = rejectedTransactionsBo.MapRejectedFoliosToCustomer(MFFolioStagingId, customerId, userId); } } if (TrailFolioid != null) { for (i = 0; i < testArrayTrailFolio.Length; i++) { MFTrailFolioStagingid = int.Parse(testArrayTrailFolio[i]); result = rejectedTransactionsBo.MapRejectedTrailFoliosToCustomer(MFTrailFolioStagingid, customerId, userId); } } if (SIPFolioid != null) { for (i = 0; i < testArray.Length; i++) { MFSIPFolioStagingId = int.Parse(testArraySIPFolio[i]); result = rejectedTransactionsBo.MapRejectedSIPFoliosToCustomer(MFSIPFolioStagingId, customerId, userId); } } //MFTransactionStagingId = Convert.ToInt32(Request.Params["id"]); //result = rejectedTransactionsBo.MapFolioToCustomer(MFTransactionStagingId, customerId, userId); //for (int i = 0; i < Stagingtableid.Count; i++) //{ // try // { // MFTransactionStagingId = Convert.ToInt32(Stagingtableid[i]); // result = rejectedTransactionsBo.MapFolioToCustomer(MFTransactionStagingId, customerId, userId); // } // catch (Exception ex) // { // result = false; // } //} return(result); }
protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e) { int i; int userId = 0; int customerId = 0; string[] testArrayFolio = new string[0]; string[] testArray = new string[0]; string[] testArraySIPFolio = new string[0]; string[] testArrayTrailFolio = new string[0]; customerId = Convert.ToInt32(e.CommandArgument); UserVo userVo = (UserVo)Session["userVo"]; userId = userVo.UserId; bool insertioncomplete = true; CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo(); CustomerAccountBo customerBo = new CustomerAccountBo(); GridView gv = (GridView)sender; //string transactionId = Convert.ToString(Request.Params["id"]); //string folioId = Convert.ToString(Request.Params["Folioid"]); //string[] testArrayFolio = folioId.Split('~'); //string[] testArray = transactionId.Split('~'); string folioId = Convert.ToString(Request.Params["Folioid"]); if (folioId != null) { testArrayFolio = folioId.Split('~'); } string transactionId = Convert.ToString(Request.Params["id"]); if (transactionId != null) { testArray = transactionId.Split('~'); } string SIPFolioid = Convert.ToString(Request.Params["SIPFolioid"]); if (SIPFolioid != null) { testArraySIPFolio = SIPFolioid.Split('~'); } string TrailFolioid = Convert.ToString(Request.Params["TrailFolioid"]); if (TrailFolioid != null) { testArrayTrailFolio = TrailFolioid.Split('~'); } RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo(); try { if (transactionId != null) { for (i = 0; i < testArray.Length; i++) { MFTransactionStagingId = int.Parse(testArray[i]); insertioncomplete = rejectedTransactionsBo.MapFolioToCustomer(MFTransactionStagingId, customerId, userId); } } if (SIPFolioid != null) { for (i = 0; i < testArraySIPFolio.Length; i++) { MFSIPFolioStagingId = int.Parse(testArraySIPFolio[i]); insertioncomplete = rejectedTransactionsBo.MapRejectedSIPFoliosToCustomer(MFSIPFolioStagingId, customerId, userId); } } if (folioId != null) { for (i = 0; i < testArrayFolio.Length; i++) { MFFolioStagingId = int.Parse(testArrayFolio[i]); insertioncomplete = rejectedTransactionsBo.MapRejectedFoliosToCustomer(MFFolioStagingId, customerId, userId); } } if (TrailFolioid != null) { for (i = 0; i < testArrayTrailFolio.Length; i++) { MFTrailFolioStagingid = int.Parse(testArrayTrailFolio[i]); insertioncomplete = rejectedTransactionsBo.MapRejectedTrailFoliosToCustomer(MFTrailFolioStagingid, customerId, userId); } } } catch (Exception ex) { insertioncomplete = false; } if (insertioncomplete) { ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "mykey", "ClosePopUp();", true); divMapToCustomer.Visible = false; lblMessage.Visible = true; lblMessage.Text = "Customer is mapped"; lblMessage.CssClass = "SuccessMsg"; tblSearch.Visible = false; //reprocess(); } else { lblMessage.Visible = true; lblMessage.Text = "An error occurred while mapping."; } }