protected void Page_Load(object sender, EventArgs e) { //advisorVo = (AdvisorVo)Session["advisorVo"]; RMVo rmVo = new RMVo(); AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); GeneralConfigurationVo generalconfigurationvo = new GeneralConfigurationVo(); string url = HttpContext.Current.Request.Url.AbsoluteUri; //tdTermsCondition.Visible = false; try { lblDate.Text = DateTime.Now.ToLongDateString(); //imgLeftPlaceHolder.Style.Add("display", "none"); imgCenterPlaceholder.Style.Add("display", "none"); imgRightPlaceholder.Style.Add("display", "none"); imgIFABanner.Style.Add("display", "none"); if (Session[SessionContents.SAC_HostGeneralDetails] != null) { generalconfigurationvo = (GeneralConfigurationVo)Session[SessionContents.SAC_HostGeneralDetails]; if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.HostLogoPlacement)) { if (generalconfigurationvo.HostLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); } else if (generalconfigurationvo.HostLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); } else if (generalconfigurationvo.HostLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); } if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["Website_Logo"].ToString())) { imgLeftPlaceHolder.Src = ConfigurationManager.AppSettings["Website_Logo"].ToString(); } } } if (Session["userVo"] != null) { userVo = (UserVo)(Session["userVo"]); rmVo = (RMVo)(Session[SessionContents.RmVo]); //tdTermsCondition.Visible = true; if (userVo.UserType == "Advisor") { //tdGodaddySeal.Visible = true; } else { //tdTermsCondition.Visible = false; } if ((!IsPostBack) && (userVo.UserType == "Customer")) { //tdTermsCondition.Visible = false; tdDemo.Visible = false; tdHelp.Visible = false; lnkDemo.Visible = false; lnkHelp.Visible = false; } lblUserName.Text = "Welcome " + " " + userVo.FirstName + " " + userVo.LastName; if (userVo.PermisionList != null && userVo.RoleList.Contains("Ops") && userVo.PermisionList.Count() > 0) { lblPermissionList.Visible = true; foreach (string PName in userVo.PermisionList) { lblPermissionList.Text += PName + ","; } lblPermissionList.Text = lblPermissionList.Text.TrimEnd(','); } lblSignOut.Text = "SignOut"; LinkButtonSignIn.Text = ""; imgSessionOut.Visible = false; if (Session[SessionContents.LogoPath] != null) { logoPath = (Session[SessionContents.LogoPath].ToString()); } else { if (Session["advisorVo"] != null) { logoPath = "Images/" + ((AdvisorVo)Session["advisorVo"]).LogoPath; } } if (Session[SessionContents.BranchLogoPath] != null) { branchLogoPath = (Session[SessionContents.BranchLogoPath].ToString()); } else { if (rmVo != null) { branchLogoPath = "Images/" + (advisorBranchBo.GetBranch(advisorBranchBo.GetBranchId(rmVo.RMId))).LogoPath; } } if (!IsPostBack) { if (!string.IsNullOrEmpty(generalconfigurationvo.AdviserLogoPlacement)) { if (logoPath != "Images/" && logoPath != "") { if (generalconfigurationvo.AdviserLogoPlacement == "TopLeftCorner") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopRightCorner") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = logoPath; } else if (generalconfigurationvo.AdviserLogoPlacement == "TopCenter") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = logoPath; } } } if (imgLeftPlaceHolder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgCenterPlaceholder.Style.Add("display", "block"); imgCenterPlaceholder.Src = branchLogoPath; } } else if (imgCenterPlaceholder.Src != "" && imgRightPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgLeftPlaceHolder.Style.Add("display", "block"); imgLeftPlaceHolder.Src = branchLogoPath; } } else if (imgLeftPlaceHolder.Src != "" && imgCenterPlaceholder.Src != "") { if (branchLogoPath != "Images/" && branchLogoPath != "") { imgRightPlaceholder.Style.Add("display", "block"); imgRightPlaceholder.Src = branchLogoPath; } } } if (advisorPreferenceVo.IsBannerEnabled) { imgPlaceholders.Visible = false; tblIFALongBanner.Visible = true; if (!string.IsNullOrEmpty(advisorPreferenceVo.BannerImageName)) { imgIFABanner.Style.Add("display", "block"); imgIFABanner.Src = "Images/" + advisorPreferenceVo.BannerImageName; } else { imgIFABanner.Style.Add("display", "none"); } } else { tblIFALongBanner.Visible = false; } //if (logoPath != "Images/") //{ // AdvisorLogo.Src = logoPath; //} //if (branchLogoPath != "Images/") //{ // BranchLogo.Src = branchLogoPath; //} CustomerVo customerVo = new CustomerVo(); customerVo = (CustomerVo)(Session["CustomerVo"]); } else { if (!IsPostBack) { if (Request.QueryString["UserId"] != null) { string userId = Request.QueryString["UserId"].ToString(); Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','" + userId + "','');", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "pageloadscript", "loginloadcontrolfromDefault('Userlogin','','');", true); } } } } //if (AdvisorLogo.Src == "") //{ // AdvisorLogo.Style.Add("display", "none"); //} //if (BranchLogo.Src == "") //{ // BranchLogo.Style.Add("display", "none"); //} if (userVo.UserType != "Advisor") { MenuItemCollection items = AdvisorMenu.Items; foreach (MenuItem item in items) { if (item.Value == @"Transact/Business online") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Repository") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Info links") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Price List") { item.Text = ""; item.SeparatorImageUrl = null; } if (item.Value == @"Calculators") { item.Text = ""; item.SeparatorImageUrl = null; } } tdDemo.Visible = false; tdHelp.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "Default.aspx:PageLoad()"); object[] objects = new object[1]; objects[0] = userVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void btnGenerate_Click(object sender, EventArgs e) { AdvisorPreferenceVo advisorPreferenceVo = new AdvisorPreferenceVo(); advisorVo = (AdvisorVo)Session["advisorVo"]; if (Session["AdvisorPreferenceVo"] != null) { advisorPreferenceVo = (AdvisorPreferenceVo)Session["AdvisorPreferenceVo"]; } int selectedRecords = 0; string statusMessage = string.Empty; advisorVo = (AdvisorVo)Session["advisorVo"]; string logoPath = string.Empty; int count = 0; foreach (GridDataItem gvRow in gvAssoMgt.Items) { CheckBox chk = (CheckBox)gvRow.FindControl("cbRecons"); if (chk.Checked) { count++; } if (count > 1) { chk.Checked = false; } } try { foreach (GridDataItem gdi in gvAssoMgt.Items) { if (((CheckBox)gdi.FindControl("cbRecons")).Checked == true) { selectedRecords++; int selectedRow = gdi.ItemIndex + 1; int userId = int.Parse((gvAssoMgt.MasterTableView.DataKeyValues[selectedRow - 1]["U_userId"].ToString())); Emailer emailer = new Emailer(); EmailMessage email = new EmailMessage(); string hassedPassword = string.Empty; string saltValue = string.Empty; encryption = new OneWayEncryption(); Random r = new Random(); userVo = userBo.GetUserDetails(userId); string password = r.Next(20000, 100000).ToString(); encryption.GetHashAndSaltString(password, out hassedPassword, out saltValue); userVo.Password = hassedPassword; userVo.PasswordSaltValue = saltValue; userVo.OriginalPassword = password; userVo.IsTempPassword = 1; userBo.UpdateUser(userVo); string userName = userVo.FirstName + " " + userVo.MiddleName + " " + userVo.LastName; email.GetResetPasswordMail(userVo.LoginId, password, userName); email.Subject = email.Subject.Replace("WealthERP", advisorVo.OrganizationName); email.Subject = email.Subject.Replace("MoneyTouch", advisorVo.OrganizationName); //email.Body = email.Body.Replace("[ORGANIZATION]", advisorVo.OrganizationName); email.Body = email.Body.Replace("[CUSTOMER_NAME]", userVo.FirstName); if (ConfigurationSettings.AppSettings["HostName"].ToString() == "Wealtherp") { email.Body = email.Body.Replace("[WEBSITE]", advisorPreferenceVo.WebSiteDomainName); } else if (ConfigurationSettings.AppSettings["HostName"].ToString() == "Citrus") { email.Body = email.Body.Replace("[WEBSITE]", advisorPreferenceVo.WebSiteDomainName); } email.Body = email.Body.Replace("[CONTACTPERSON]", advisorVo.ContactPersonFirstName + " " + advisorVo.ContactPersonMiddleName + " " + advisorVo.ContactPersonLastName); if (!string.IsNullOrEmpty(advisorVo.Designation)) { email.Body = email.Body.Replace("[DESIGNATION]", advisorVo.Designation.Trim()); } else { email.Body = email.Body.Replace("[DESIGNATION]", string.Empty); } //if (!string.IsNullOrEmpty(advisorVo.Phone1Number.ToString())) // email.Body = email.Body.Replace("[PHONE]", advisorVo.Phone1Std.ToString().Trim() + "-" + advisorVo.Phone1Number.ToString().Trim()); //else // email.Body = email.Body.Replace("[PHONE]", string.Empty); if (!string.IsNullOrEmpty(advisorVo.Email)) { email.Body = email.Body.Replace("[EMAIL]", advisorVo.Email.Trim()); } else { email.Body = email.Body.Replace("[EMAIL]", string.Empty); } email.Body = email.Body.Replace("[LOGO]", "<img src='cid:HDIImage' alt='Logo'>"); System.Net.Mail.AlternateView htmlView; System.Net.Mail.AlternateView plainTextView = System.Net.Mail.AlternateView.CreateAlternateViewFromString("Text view", null, "text/plain"); //System.Net.Mail.AlternateView htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(hidBody.Value.Trim() + "<image src=cid:HDIImage>", null, "text/html"); htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString("<html><body " + "style='font-family:Tahoma, Arial; font-size: 10pt;'><p>" + email.Body + "</p></body></html>", null, "text/html"); //Add image to HTML version if (advisorVo != null) { logoPath = "~/Images/" + advisorVo.LogoPath; } if (!File.Exists(Server.MapPath(logoPath))) { logoPath = "~/Images/spacer.png"; } //System.Net.Mail.LinkedResource imageResource = new System.Net.Mail.LinkedResource(Server.MapPath("~/Images/") + @"\3DSYRW_4009.JPG", "image/jpeg"); System.Net.Mail.LinkedResource imageResource = new System.Net.Mail.LinkedResource(Server.MapPath(logoPath), "image/jpeg"); imageResource.ContentId = "HDIImage"; htmlView.LinkedResources.Add(imageResource); email.AlternateViews.Add(plainTextView); email.AlternateViews.Add(htmlView); email.To.Add(userVo.Email); AdviserStaffSMTPBo adviserStaffSMTPBo = new AdviserStaffSMTPBo(); AdviserStaffSMTPVo adviserStaffSMTPVo = adviserStaffSMTPBo.GetSMTPCredentials(rmVo.RMId); if (adviserStaffSMTPVo.HostServer != null && adviserStaffSMTPVo.HostServer != string.Empty) { emailer.isDefaultCredentials = !Convert.ToBoolean(adviserStaffSMTPVo.IsAuthenticationRequired); if (!String.IsNullOrEmpty(adviserStaffSMTPVo.Password)) { emailer.smtpPassword = Encryption.Decrypt(adviserStaffSMTPVo.Password); } emailer.smtpPort = int.Parse(adviserStaffSMTPVo.Port); emailer.smtpServer = adviserStaffSMTPVo.HostServer; emailer.smtpUserName = adviserStaffSMTPVo.Email; if (Convert.ToBoolean(adviserStaffSMTPVo.IsAuthenticationRequired)) { if (ConfigurationSettings.AppSettings["HostName"].ToString() == "Wealtherp") { email.From = new MailAddress(emailer.smtpUserName, advisorVo.OrganizationName); } else if (ConfigurationSettings.AppSettings["HostName"].ToString() == "MoneyTouch") { email.From = new MailAddress(emailer.smtpUserName, advisorVo.OrganizationName); } } } bool isMailSent = false; if (userBo.UpdateUser(userVo)) { isMailSent = emailer.SendMail(email); } if (isMailSent) { statusMessage = "Credentials have been reset and sent to selected user"; tblMessage.Visible = true; ErrorMessage.Visible = false; SuccessMsg.InnerText = statusMessage; SuccessMsg.Visible = true; } else { statusMessage = "An error occurred while sending mail to selected user"; tblMessage.Visible = true; ErrorMessage.Visible = true; ErrorMessage.InnerText = statusMessage; SuccessMsg.Visible = false; } } } ErrorMessage.Visible = false; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "RMCustomerUserDetails.ascx:btnGenerate_Click()"); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindBranchAssociation() { DataSet ds; //DataTable dt; DataTable dtList; //DataRow dr; DataRow drList; AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); try { if (Session["CurrentrmVo"] != null) { rmVo = (RMVo)Session["CurrentrmVo"]; } else { rmVo = (RMVo)Session["rmVo"]; } if (Session["advisorVo"] != null) { ds = advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, advisorVo.advisorId, "A"); } else { ds = advisorBranchBo.GetRMBranchAssociation(rmVo.RMId, 0, "A"); } if (ds != null) { _commondatasetdestination = ds; //dt = new DataTable(); //dt.Columns.Add("BranchId"); //dt.Columns.Add("RMId"); //dt.Columns.Add("Branch Name"); //dt.Columns.Add("Branch Code"); dtList = new DataTable(); dtList.Columns.Add("Branch"); dtList.Columns.Add("BranchId"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { //dr = dt.NewRow(); //dr["BranchId"] = ds.Tables[0].Rows[i]["AB_BranchId"].ToString(); //dr["RMId"] = ds.Tables[0].Rows[i]["AR_RMId"].ToString(); //dr["Branch Code"] = ds.Tables[0].Rows[i]["AB_BranchCode"].ToString(); //dr["Branch Name"] = ds.Tables[0].Rows[i]["AB_BranchName"].ToString(); drList = dtList.NewRow(); drList["Branch"] = ((ds.Tables[0].Rows[i]["AB_BranchName"].ToString()) + "," + (ds.Tables[0].Rows[i]["AB_BranchCode"].ToString())); drList["BranchId"] = ds.Tables[0].Rows[i]["AB_BranchId"].ToString(); //dt.Rows.Add(dr); dtList.Rows.Add(drList); hdnExistingBranches.Value += drList["BranchId"].ToString() + ","; } Session["AssociatedBranch"] = dtList; //gvBranchList.DataSource = dt; //gvBranchList.DataBind(); //gvBranchList.Visible = true; // Show binded contents in List box associatedBranch.DataSource = dtList; associatedBranch.DataTextField = "Branch"; associatedBranch.DataValueField = "BranchId"; associatedBranch.DataBind(); if (chkExternalStaff.Checked == true) { setBranchList("Y"); } else { setBranchList("N"); } } else { if (chkExternalStaff.Checked == true) { setBranchList("Y"); } else { setBranchList("N"); } //gvBranchList.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "ViewRMDetails.ascx.cs:BindBranchAssociation()"); object[] objects = new object[2]; objects[0] = rmVo; objects[1] = advisorVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public bool Validation() { bool result = true; double res; try { if (txtFax.Text != string.Empty) { if (!Double.TryParse(txtFax.Text, out res) || !Double.TryParse(txtFaxSTD.Text, out res) || !Double.TryParse(txtFaxISD.Text, out res)) { lblFax.CssClass = "Error"; result = false; } } if (txtPhoneNumber1.Text != string.Empty) { if (!Double.TryParse(txtISD1.Text, out res) || !Double.TryParse(txtPhoneNumber1.Text, out res) || !Double.TryParse(txtSTD1.Text, out res)) { lblPhone1.CssClass = "Error"; result = false; } } if (txtPhoneNumber2.Text != string.Empty) { if (!Double.TryParse(txtSTD2.Text, out res) || !Double.TryParse(txtPhoneNumber2.Text, out res) || !Double.TryParse(txtISD2.Text, out res)) { lblPhone2.CssClass = "Error"; result = false; } } if (!ChkMailId(txtEmail.Text.ToString())) { result = false; lblEmail.CssClass = "Error"; } else { result = true; lblEmail.CssClass = "FieldName"; } if (txtFirstName.Text.ToString() == "") { //lblContactName.CssClass = "Error"; lblFirst.CssClass = "Error"; result = false; } //if (txtPhoneNumber1.Text == "") //{ // lblPhone1.CssClass = "Error"; // result = false; //} //if (txtSTD1.Text == " ") //{ // lblSTD.CssClass = "Error"; // result = false; //} if (txtAddressLine1.Text == "") { lblLine1.CssClass = "Error"; result = false; } if (txtOrganizationName.Text == "") { lblOrganizationName.CssClass = "Error"; result = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "EditAdvisorProfile.ascx:Validation()"); object[] objects = new object[1]; objects[0] = result; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(result); }
protected void btnSubmit_Click(object sender, EventArgs e) { RMVo newRmVo = new RMVo(); int isd2 = 0; int std2 = 0; int phone2 = 0; int fisd = 0; int fstd = 0; int fphone = 0; try { if (Validation()) { string multibranch = ""; if (rbtnNo.Checked) { multibranch = "No"; } else { multibranch = "yes"; } advisorVo.UserId = userVo.UserId; newRmVo.UserId = userVo.UserId; newRmVo.FirstName = txtFirstName.Text.Trim().ToString(); newRmVo.MiddleName = txtMiddleName.Text.Trim().ToString(); newRmVo.LastName = txtLastName.Text.Trim().ToString(); newRmVo.RMId = rmVo.RMId; path = Server.MapPath("Images") + "\\"; if (logoChange.HasFile) { string[] fileName = logoChange.FileName.Split('.'); advisorVo.LogoPath = advisorVo.OrganizationName + "_" + fileName[0] + ".png"; //advisorBranchVo.LogoPath = advisorVo.advisorId + "_" + txtBranchCode.Text.ToString() + ".jpg"; HttpPostedFile myFile = logoChange.PostedFile; UploadImage(path, myFile, advisorVo.LogoPath); } advisorVo.AddressLine1 = txtAddressLine1.Text.Trim().ToString(); advisorVo.AddressLine2 = txtAddressLine2.Text.Trim().ToString(); advisorVo.AddressLine3 = txtAddressLine3.Text.Trim().ToString(); advisorVo.Designation = textDesignation.Text.Trim().ToString(); if (ddlBusinessType.SelectedIndex != 0) { advisorVo.BusinessCode = ddlBusinessType.SelectedItem.Value.ToString(); } else { advisorVo.BusinessCode = null; } advisorVo.City = txtCity.Text.Trim(); advisorVo.ContactPersonFirstName = txtFirstName.Text.Trim().ToString(); advisorVo.ContactPersonLastName = txtLastName.Text.Trim().ToString(); advisorVo.ContactPersonMiddleName = txtMiddleName.Text.Trim().ToString(); if (!string.IsNullOrEmpty(txtCountry.Text.Trim())) { advisorVo.Country = txtCountry.Text.Trim(); } advisorVo.Email = txtEmail.Text.Trim().ToString(); if (!string.IsNullOrEmpty(txtwebsite.Text.Trim().ToString())) { advisorVo.Website = txtwebsite.Text.Trim().ToString(); } if (!string.IsNullOrEmpty(txtMobileNumber.Text.Trim().ToString())) { advisorVo.MobileNumber = long.Parse(txtMobileNumber.Text.Trim().ToString()); } else { advisorVo.MobileNumber = 0; } newRmVo.Email = txtEmail.Text.Trim().ToString(); advisorVo.Website = txtwebsite.Text.Trim().ToString(); if (txtFax.Text.Trim() == "") { advisorVo.Fax = 0; newRmVo.Fax = 0; } else { int.TryParse(txtFax.Text.ToString(), out fphone); advisorVo.Fax = fphone; newRmVo.Fax = fphone; } if (txtFaxISD.Text.Trim() == "") { advisorVo.FaxIsd = 0; newRmVo.FaxIsd = 0; } else { int.TryParse(txtFaxISD.Text.ToString(), out fisd); advisorVo.FaxIsd = fisd; newRmVo.FaxIsd = fisd; } if (txtFaxSTD.Text.Trim() == "") { advisorVo.FaxStd = 0; newRmVo.FaxStd = 0; } else { int.TryParse(txtFaxSTD.Text.ToString(), out fstd); advisorVo.FaxStd = fstd; newRmVo.FaxStd = fstd; } if (txtMobileNumber.Text.Trim() != string.Empty) { advisorVo.MobileNumber = Convert.ToInt64(txtMobileNumber.Text.Trim().ToString()); newRmVo.Mobile = Convert.ToInt64(txtMobileNumber.Text.Trim().ToString()); } else { advisorVo.MobileNumber = 0; newRmVo.Mobile = 0; } if (rbtnNo.Checked) { advisorVo.MultiBranch = 0; } else { advisorVo.MultiBranch = 1; } if (rbtnAssModelTypeNo.Checked) { advisorVo.Associates = 0; } else { advisorVo.Associates = 1; } advisorVo.OrganizationName = txtOrganizationName.Text.Trim().ToString(); if (txtISD1.Text.Trim() == "") { advisorVo.Phone1Isd = 0; newRmVo.OfficePhoneDirectIsd = 0; } else { advisorVo.Phone1Isd = int.Parse(txtISD1.Text.Trim().ToString()); newRmVo.OfficePhoneDirectIsd = int.Parse(txtISD1.Text.Trim().ToString()); } if (txtPhoneNumber1.Text.Trim() != string.Empty) { advisorVo.Phone1Number = int.Parse(txtPhoneNumber1.Text.Trim().ToString()); newRmVo.OfficePhoneDirectNumber = int.Parse(txtPhoneNumber1.Text.Trim().ToString()); } else { advisorVo.Phone1Number = 0; newRmVo.OfficePhoneDirectNumber = 0; } if (txtSTD1.Text.Trim() != string.Empty) { advisorVo.Phone1Std = int.Parse(txtSTD1.Text.Trim().ToString()); newRmVo.OfficePhoneDirectStd = int.Parse(txtSTD1.Text.Trim().ToString()); } else { advisorVo.Phone1Std = 0; newRmVo.OfficePhoneDirectStd = 0; } if (txtISD2.Text.Trim() == string.Empty) { advisorVo.Phone2Isd = 0; newRmVo.OfficePhoneExtIsd = 0; } else { int.TryParse(txtISD2.Text.ToString(), out isd2); advisorVo.Phone2Isd = isd2; newRmVo.OfficePhoneExtIsd = isd2; } if (txtPhoneNumber2.Text.Trim() != "") { int.TryParse(txtPhoneNumber2.Text.ToString(), out std2); advisorVo.Phone2Number = std2; newRmVo.OfficePhoneExtNumber = std2; } else { advisorVo.Phone2Number = 0; newRmVo.OfficePhoneExtNumber = 0; } if (txtPinCode.Text.Trim() != string.Empty) { advisorVo.PinCode = int.Parse(txtPinCode.Text.Trim().ToString()); } else { advisorVo.PinCode = 0; } if (txtSTD2.Text.Trim() == "") { advisorVo.Phone2Std = 0; newRmVo.OfficePhoneExtStd = 0; } else { int.TryParse(txtSTD2.Text.ToString(), out std2); advisorVo.Phone2Std = std2; newRmVo.OfficePhoneExtStd = std2; } if (ddlState.SelectedIndex != 0) { advisorVo.State = ddlState.SelectedValue.ToString(); } else { advisorVo.State = null; } Session["advisorVo"] = (AdvisorVo)advisorVo; //userVo.Email = txtEmail.Text.Trim().ToString(); //userVo.FirstName = txtFirstName.Text.Trim().ToString(); //userVo.LastName = txtLastName.Text.Trim().ToString(); //userVo.MiddleName = txtMiddleName.Text.Trim().ToString(); //userVo.UserId = advisorVo.UserId; // Updating Adviser , User and RM advisorBo.UpdateAdvisorUser(advisorVo); //userBo.UpdateUser(userVo); //advisorStaffBo.UpdateStaff(newRmVo); rbtnYes.Enabled = false; rbtnNo.Enabled = false; txtCity.Enabled = false; ddlBusinessType.Enabled = false; ddlState.Enabled = false; txtAddressLine1.Enabled = false; txtAddressLine2.Enabled = false; txtAddressLine3.Enabled = false; txtEmail.Enabled = false; txtFax.Enabled = false; txtFaxISD.Enabled = false; txtFaxSTD.Enabled = false; txtFirstName.Enabled = false; txtISD1.Enabled = false; txtISD2.Enabled = false; txtLastName.Enabled = false; txtMiddleName.Enabled = false; txtMobileNumber.Enabled = false; txtOrganizationName.Enabled = false; txtPhoneNumber1.Enabled = false; txtPhoneNumber2.Enabled = false; txtPinCode.Enabled = false; txtSTD1.Enabled = false; txtSTD2.Enabled = false; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdvisorProfile','none');", true); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "adviserpaneleftttttt", "loadlinks('AdvisorLeftPane','login');", true); } else { } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "EditAdvisorProfile.ascx:btnSubmit_Click()"); object[] objects = new object[4]; objects[0] = advisorVo; objects[1] = advisorBo; objects[2] = userVo; objects[3] = userBo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
/// <summary> /// Modified this function to add a new column(No. of customers) to the Branch AUM grid /// </summary> private void LoadAdminBranchPerformance() { List <AdvisorBranchVo> branchList = new List <AdvisorBranchVo>(); AdvisorBranchBo advisorBranchBo = new AdvisorBranchBo(); DataTable dt = new DataTable(); DataRow drResult = null; DataRow dr = null; int Count = 0; mfTotal = 0; total = 0; try { ds = assetBo.GetAdviserBranchMF_EQ_In_AggregateCurrentValues(advisorVo.advisorId, out Count, mypager.CurrentPage, out total); lblTotalRows.Text = hdnRecordCount.Value = Count.ToString(); if (ds.Tables[0].Rows.Count > 0) { lblGT.Visible = true; lblGTT.Visible = true; dt.Columns.Add("Branch Id"); dt.Columns.Add("Branch Name"); dt.Columns.Add("Branch Code"); //dt.Columns.Add("Equity"); dt.Columns.Add("Equity"); dt.Columns.Add("MF"); dt.Columns.Add("Insurance"); dt.Columns.Add("NoOfCustomers"); //dt.Columns.Add(new DataColumn("Equity", typeof(decimal))); //dt.Columns.Add(new DataColumn("MF", typeof(decimal))); //dt.Columns.Add(new DataColumn("Insurance", typeof(decimal))); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr = dt.NewRow(); drResult = ds.Tables[0].Rows[i]; dr[0] = drResult["A_AdviserId"].ToString(); dr[1] = drResult["AB_BranchName"].ToString(); dr[2] = drResult["AB_BranchCode"].ToString(); if (Convert.ToDecimal(drResult["EquityAggr"].ToString()) == 0) { dr[3] = "0"; } else { dr[3] = decimal.Parse(drResult["EquityAggr"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } eqTotal = eqTotal + Convert.ToDecimal(drResult["EquityAggr"].ToString()); if (Convert.ToDecimal(drResult["MFAggr"].ToString()) == 0) { dr[4] = "0"; } else { dr[4] = decimal.Parse(drResult["MFAggr"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } mfTotal = mfTotal + Convert.ToDecimal(drResult["MFAggr"].ToString()); if (Convert.ToDecimal(drResult["InsuranceAggr"].ToString()) == 0) { dr[5] = "0"; } else { dr[5] = decimal.Parse(drResult["InsuranceAggr"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } insuranceTotal = insuranceTotal + Convert.ToDecimal(drResult["InsuranceAggr"].ToString()); dr[6] = drResult["NoOfCustomers"].ToString(); customerTotal = customerTotal + Int32.Parse(drResult["NoOfCustomers"].ToString()); dt.Rows.Add(dr); } gvrAdminBranchPerform.DataSource = dt; gvrAdminBranchPerform.DataBind(); gvrAdminBranchPerform.Visible = true; GetPageCount(); } else { lblGT.Visible = false; lblGTT.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "IFAAdminMainDashboard.ascx:LoadAdminBranchPerformance()"); object[] objects = new object[3]; objects[0] = advisorVo; objects[1] = branchList; objects[2] = ds; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
//protected void chkMFEQ_CheckedChanged(object sender, EventArgs e) //{ // if (chkMf.Checked == false && chkEquity.Checked == false) // { // chkBroker.Enabled = false; // chkSubbroker.Enabled = false; // chkRemissary.Enabled = false; // chkIntermediary.Enabled = false; // chkCash.Enabled = false; // chkDerivative.Enabled = false; // } // else if (chkMf.Checked == false && chkEquity.Checked == true) // { // chkDerivative.Enabled = true; // chkCash.Enabled = true; // chkBroker.Enabled = true; // chkSubbroker.Enabled = true; // chkRemissary.Enabled = true; // chkIntermediary.Enabled = false; // } // else if (chkMf.Checked == true && chkEquity.Checked == false) // { // chkDerivative.Enabled = false; // chkCash.Enabled = false; // chkBroker.Enabled = false; // chkSubbroker.Enabled = false; // chkRemissary.Enabled = false; // chkIntermediary.Enabled = true; // } // else if (chkMf.Checked == true && chkEquity.Checked == true) // { // chkBroker.Enabled = true; // chkSubbroker.Enabled = true; // chkRemissary.Enabled = true; // chkIntermediary.Enabled = true; // chkCash.Enabled = true; // chkDerivative.Enabled = true; // } //} protected void btnAddLOB_Click(object sender, EventArgs e) { AdvisorLOBBo AdvisorLOBBo = new AdvisorLOBBo(); try { Session["LOBId"] = "lob"; Session["mf1"] = null; Session["equityBrokerCash1"] = null; Session["equityBrokerDerivative1"] = null; Session["equitySubBrokerCash1"] = null; Session["equitySubBrokerDerivative1"] = null; Session["equityRemissaryCash1"] = null; Session["equityRemissaryDerivative1"] = null; Session["pmsBrokerCash1"] = null; Session["pmsBrokerDerivative1"] = null; Session["pmsSubBrokerCash1"] = null; Session["pmsSubBrokerDerivative1"] = null; Session["pmsRemissaryCash1"] = null; Session["pmsRemissaryDerivative1"] = null; Session["commBrokerCash1"] = null; Session["commBrokerDerivative1"] = null; Session["commSubBrokerCash1"] = null; Session["commSubBrokerDerivative1"] = null; Session["commRemissaryCash1"] = null; Session["commRemissaryDerivative1"] = null; Session["insuranceAgent1"] = null; Session["postalSavingsAgent1"] = null; Session["realEstateAgent1"] = null; Session["liabilitiesAgent1"] = null; Session["fixedIncomeAgent1"] = null; if (chkMf.Checked == true && chkIntermediary.Checked == true) { if (!AdvisorLOBBo.CheckLOBExistence(advisorVo.advisorId, "LMIT")) { Session["mf1"] = "mf"; } else { chkMf.Checked = false; chkIntermediary.Checked = false; chkIntermediary.Visible = false; lblErrorMsg.Visible = true; } } if (chkInsurance.Checked && chkInsuranceAgent.Checked) { Session["insuranceAgent1"] = "insuranceAgent"; } if (chkPostalSavings.Checked && chkPostalAgent.Checked) { Session["postalSavingsAgent1"] = "postalSavingsAgent"; } if (chkRealEstate.Checked && chkRealEstateAgent.Checked) { Session["realEstateAgent1"] = "realEstateAgent"; } if (chkLiabilities.Checked && chkLiabilitiesAgent.Checked) { Session["liabilitiesAgent1"] = "liabilitiesAgent"; } if (chkFixedIncome.Checked && chkFIAgent.Checked) { Session["fixedIncomeAgent1"] = "fixedIncomeAgent"; } if (chkEquity.Checked == true) { if (chkBroker.Checked == true) { if (chkCash.Checked == true) { Session["equityBrokerCash1"] = "equityBrokerCash"; } if (chkDerivative.Checked == true) { Session["equityBrokerDerivative1"] = "equityBrokerDerivative"; } } if (chkSubbroker.Checked == true) { if (chkCash.Checked == true) { Session["equitySubBrokerCash1"] = "equitySubBrokerCash"; } if (chkDerivative.Checked == true) { Session["equitySubBrokerDerivative1"] = "equitySubBrokerDerivaitve"; } } if (chkRemissary.Checked == true) { if (chkCash.Checked == true) { Session["equityRemissaryCash1"] = "equityRemissaryCash"; } if (chkDerivative.Checked == true) { Session["equityRemissaryDerivative1"] = "equityRemissaryDerivative"; } } } if (chkPMS.Checked) { if (chkPMSBroker.Checked) { if (chkPMSCash.Checked) { Session["pmsBrokerCash1"] = "pmsBrokerCash"; } if (chkPMSDerivative.Checked) { Session["pmsBrokerDerivative1"] = "pmsBrokerDerivative"; } } if (chkPMSSubBroker.Checked) { if (chkPMSCash.Checked) { Session["pmsSubBrokerCash1"] = "pmsSubBrokerCash"; } if (chkPMSDerivative.Checked) { Session["pmsSubBrokerDerivative1"] = "pmsSubBrokerDerivative"; } } if (chkPMSRemissary.Checked) { if (chkPMSCash.Checked) { Session["pmsRemissaryCash1"] = "pmsRemissaryCash"; } if (chkPMSDerivative.Checked) { Session["pmsRemissaryDerivative1"] = "pmsRemissaryDerivative"; } } } if (chkCommodities.Checked) { if (chkCommBroker.Checked) { if (chkCommCash.Checked) { Session["commBrokerCash1"] = "commBrokerCash"; } if (chkCommDerivative.Checked) { Session["commBrokerDerivative1"] = "commBrokerDerivative"; } } if (chkCommSubBroker.Checked) { if (chkCommCash.Checked) { Session["commSubBrokerCash1"] = "commSubBrokerCash"; } if (chkCommDerivative.Checked) { Session["commSubBrokerDerivative1"] = "commSubBrokerDerivative"; } } if (chkCommRemissary.Checked) { if (chkCommCash.Checked) { Session["commRemissaryCash1"] = "commRemissaryCash"; } if (chkCommDerivative.Checked) { Session["commRemissaryDerivative1"] = "commRemissaryDerivative"; } } } if (Session["mf1"] != null || Session["equityBrokerCash1"] != null || Session["equityBrokerDerivative1"] != null || Session["equitySubBrokerCash1"] != null || Session["equitySubBrokerDerivative1"] != null || Session["equityRemissaryCash1"] != null || Session["equityRemissaryDerivative1"] != null || Session["pmsBrokerCash1"] != null || Session["pmsBrokerDerivative1"] != null || Session["pmsSubBrokerCash1"] != null || Session["pmsSubBrokerDerivative1"] != null || Session["pmsRemissaryCash1"] != null || Session["pmsRemissaryDerivative1"] != null || Session["commBrokerCash1"] != null || Session["commBrokerDerivative1"] != null || Session["commSubBrokerCash1"] != null || Session["commSubBrokerDerivative1"] != null || Session["commRemissaryCash1"] != null || Session["commRemissaryDerivative1"] != null || Session["insuranceAgent1"] != null || Session["postalSavingsAgent1"] != null || Session["realEstateAgent1"] != null || Session["liabilitiesAgent1"] != null || Session["fixedIncomeAgent1"] != null) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('LOB','none');", true); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AddLOB.ascx:chkEquity_CheckedChanged()"); object[] objects = new object[1]; objects[0] = null; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public DataSet GetAMCwiseMISForAdviser(int adviserid, int branchid, int rmid, DateTime valuationDate, string AMCSearchVal) { Database db; DbCommand getLoanMICmd; DataSet AMCSchemewiseMIS = null; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getLoanMICmd = db.GetStoredProcCommand("SP_GetAMCwiseMISForAdviser"); db.AddInParameter(getLoanMICmd, "@A_AdviserId", DbType.Int32, adviserid); if (branchid != 0) { db.AddInParameter(getLoanMICmd, "@AB_BranchId", DbType.Int32, branchid); } else { db.AddInParameter(getLoanMICmd, "@AB_BranchId", DbType.Int32, DBNull.Value); } if (rmid != 0) { db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, rmid); } else { db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, DBNull.Value); } db.AddInParameter(getLoanMICmd, "@Valuation_Date", DbType.DateTime, valuationDate); if (AMCSearchVal != "") { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, AMCSearchVal); } else { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, DBNull.Value); } AMCSchemewiseMIS = db.ExecuteDataSet(getLoanMICmd); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorMFDao.cs:GetAMCwiseMISForAdviser()"); object[] objects = new object[3]; objects[0] = rmid; objects[1] = valuationDate; objects[2] = AMCSearchVal; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(AMCSchemewiseMIS); }
/* For BMMIS for Scheeme wise */ public DataSet GetMISForBM(int rmid, int branchID, int branchHeadId, int XWise, int all, DateTime valuationDate, int amcCode, int schemeplanid, int CurrentPage, string AMCSearchVal, string SchemeSearchVal, string CustomerName, string FolioNum, string CategoryFilterVal, out int Count, int AllPageExportCount) { Database db; DbCommand getLoanMICmd; DataSet AMCSchemewiseMIS = null; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getLoanMICmd = db.GetStoredProcCommand("SP_GetAllAMCwiseMISforBM"); db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, rmid); db.AddInParameter(getLoanMICmd, "@BranchId", DbType.Int32, branchID); db.AddInParameter(getLoanMICmd, "@BranchHeadId", DbType.Int32, branchHeadId); db.AddInParameter(getLoanMICmd, "@all", DbType.Int32, all); db.AddInParameter(getLoanMICmd, "@Valuation_Date", DbType.DateTime, valuationDate); if (amcCode != 0) { db.AddInParameter(getLoanMICmd, "@AMCCode", DbType.Int32, amcCode); } else { db.AddInParameter(getLoanMICmd, "@AMCCode", DbType.Int32, DBNull.Value); } if (schemeplanid != 0) { db.AddInParameter(getLoanMICmd, "@SchemePlanCode", DbType.Int32, schemeplanid); } else { db.AddInParameter(getLoanMICmd, "@SchemePlanCode", DbType.Int32, DBNull.Value); } db.AddInParameter(getLoanMICmd, "@currentPage", DbType.Int32, CurrentPage); db.AddInParameter(getLoanMICmd, "@XWise", DbType.Int32, XWise); if (AMCSearchVal != "") { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, AMCSearchVal); } else { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, DBNull.Value); } if (!string.IsNullOrEmpty(SchemeSearchVal.Trim())) { db.AddInParameter(getLoanMICmd, "@SchemeSearchVal", DbType.String, SchemeSearchVal); } else { db.AddInParameter(getLoanMICmd, "@SchemeSearchVal", DbType.String, DBNull.Value); } if (!string.IsNullOrEmpty(CustomerName.Trim())) { db.AddInParameter(getLoanMICmd, "@CustomerName", DbType.String, CustomerName); } else { db.AddInParameter(getLoanMICmd, "@CustomerName", DbType.String, DBNull.Value); } if (!string.IsNullOrEmpty(FolioNum.Trim())) { db.AddInParameter(getLoanMICmd, "@FolioNum", DbType.String, FolioNum); } else { db.AddInParameter(getLoanMICmd, "@FolioNum", DbType.String, DBNull.Value); } if (!string.IsNullOrEmpty(CategoryFilterVal.Trim())) { db.AddInParameter(getLoanMICmd, "@CategoryFilterVal", DbType.String, CategoryFilterVal); } else { db.AddInParameter(getLoanMICmd, "@CategoryFilterVal", DbType.String, DBNull.Value); } if (AllPageExportCount != 0) { db.AddInParameter(getLoanMICmd, "@AllPageExportCount", DbType.Int32, AllPageExportCount); } AMCSchemewiseMIS = db.ExecuteDataSet(getLoanMICmd); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorMFDao.cs:GetMISForBM()"); object[] objects = new object[8]; objects[0] = rmid; objects[1] = branchID; objects[2] = branchHeadId; objects[3] = all; objects[4] = valuationDate; objects[5] = AMCSearchVal; objects[6] = SchemeSearchVal; objects[7] = CategoryFilterVal; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } Count = Int32.Parse(AMCSchemewiseMIS.Tables[1].Rows[0]["CNT"].ToString()); return(AMCSchemewiseMIS); }
/// <summary> /// For getting the AMC/Scheme wise MIS for RM for a valuation date /// </summary> /// <param name="rmid"></param> /// <param name="valuationDate"></param> /// <returns>Dataset of the report</returns> public DataSet GetAMCSchemewiseMISForRM(int rmid, DateTime valuationDate, int amcCode, int CurrentPage, string AMCSearchVal, string SchemeSearchVal, string CategoryFilterVal, out int Count, int AllPageExportCount) { Database db; DbCommand getLoanMICmd; DataSet AMCSchemewiseMIS = null; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getLoanMICmd = db.GetStoredProcCommand("SP_GetAMCSchemewiseMISForRM"); db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, rmid); db.AddInParameter(getLoanMICmd, "@Valuation_Date", DbType.DateTime, valuationDate); if (amcCode != 0) { db.AddInParameter(getLoanMICmd, "@AMCCode", DbType.Int32, amcCode); } db.AddInParameter(getLoanMICmd, "@currentPage", DbType.Int32, CurrentPage); if (AMCSearchVal != "") { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, AMCSearchVal); } else { db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, DBNull.Value); } if (SchemeSearchVal != "") { db.AddInParameter(getLoanMICmd, "@SchemeSearchVal", DbType.String, SchemeSearchVal); } else { db.AddInParameter(getLoanMICmd, "@SchemeSearchVal", DbType.String, DBNull.Value); } if (CategoryFilterVal != "") { db.AddInParameter(getLoanMICmd, "@CategoryFilterVal", DbType.String, CategoryFilterVal); } else { db.AddInParameter(getLoanMICmd, "@CategoryFilterVal", DbType.String, DBNull.Value); } //All Page export Logic changed By "parmod" if (AllPageExportCount != 0) { db.AddInParameter(getLoanMICmd, "@AllPageExportCount", DbType.Int32, AllPageExportCount); } AMCSchemewiseMIS = db.ExecuteDataSet(getLoanMICmd); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorMFDao.cs:GetAMCSchemewiseMISForRM()"); object[] objects = new object[5]; objects[0] = rmid; objects[1] = valuationDate; objects[2] = AMCSearchVal; objects[3] = SchemeSearchVal; objects[4] = CategoryFilterVal; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } Count = Int32.Parse(AMCSchemewiseMIS.Tables[1].Rows[0]["CNT"].ToString()); return(AMCSchemewiseMIS); }
public DataSet GetCustomerAMCSchemewiseMISForAdviser(int adviserid, int branchid, int rmid, DateTime valuationDate, int schemeplanid, int CurrentPage, string AMCSearchVal, string SchemeSearchVal, string CustomerName, string FolioNum, out int Count, int AllPageExportCount) { Database db; DbCommand getLoanMICmd; DataSet AMCSchemewiseMIS = null; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getLoanMICmd = db.GetStoredProcCommand("SP_GetCustomerAMCSchemewiseMISForAdviser"); db.AddInParameter(getLoanMICmd, "@A_AdviserId", DbType.Int32, adviserid); if (branchid != 0) { db.AddInParameter(getLoanMICmd, "@AB_BranchId", DbType.Int32, branchid); } else { db.AddInParameter(getLoanMICmd, "@AB_BranchId", DbType.Int32, DBNull.Value); } if (rmid != 0) { db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, rmid); } else { db.AddInParameter(getLoanMICmd, "@RMId", DbType.Int32, DBNull.Value); } db.AddInParameter(getLoanMICmd, "@Valuation_Date", DbType.DateTime, valuationDate); db.AddInParameter(getLoanMICmd, "@SchemePlanCode", DbType.Int32, schemeplanid); db.AddInParameter(getLoanMICmd, "@currentPage", DbType.Int32, CurrentPage); db.AddInParameter(getLoanMICmd, "@AMCSearchVal", DbType.String, AMCSearchVal); db.AddInParameter(getLoanMICmd, "@SchemeSearchVal", DbType.String, SchemeSearchVal); db.AddInParameter(getLoanMICmd, "@CustomerName", DbType.String, CustomerName); db.AddInParameter(getLoanMICmd, "@FolioNum", DbType.String, FolioNum); if (AllPageExportCount != 0) { db.AddInParameter(getLoanMICmd, "@AllPageExportCount", DbType.Int32, AllPageExportCount); } getLoanMICmd.CommandTimeout = 60 * 60; AMCSchemewiseMIS = db.ExecuteDataSet(getLoanMICmd); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorMFDao.cs:GetCustomerAMCSchemewiseMISForAdviser()"); object[] objects = new object[3]; objects[0] = rmid; objects[1] = valuationDate; objects[2] = schemeplanid; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } Count = Int32.Parse(AMCSchemewiseMIS.Tables[1].Rows[0]["CNT"].ToString()); return(AMCSchemewiseMIS); }
/// <summary> /// Created For Getting Company & Sector wise EQMIS for all 3 users /// </summary> /// Created by Vinayak Patil /// <param name="userType"></param> /// <param name="valuationDate"></param> /// <param name="adviserId"></param> /// <param name="RMId"></param> /// <param name="BranchId"></param> /// <param name="branchHeadId"></param> /// <param name="all"></param> /// <param name="EQMIStype"></param> /// <param name="portfolioType"></param> /// <returns></returns> public DataSet GetAllUsersEQMISForComSec(string userType, DateTime valuationDate, int adviserId, int RMId, int BranchId, int branchHeadId, int all, int EQMIStype, int portfolioType) { Database db; DbCommand getEQMISCmd; DataSet dsGetAllUsersEQMIS = null; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getEQMISCmd = db.GetStoredProcCommand("SP_AllUserEquityMIS"); db.AddInParameter(getEQMISCmd, "@userType", DbType.String, userType); db.AddInParameter(getEQMISCmd, "@valuation_Date", DbType.DateTime, valuationDate); db.AddInParameter(getEQMISCmd, "@EQMIStype", DbType.Int16, EQMIStype); db.AddInParameter(getEQMISCmd, "@portfolioType", DbType.Int16, portfolioType); if (adviserId != 0) { db.AddInParameter(getEQMISCmd, "@adviserId", DbType.Int16, adviserId); } else { db.AddInParameter(getEQMISCmd, "@adviserId", DbType.Int16, DBNull.Value); } if (RMId != 0) { db.AddInParameter(getEQMISCmd, "@RMId", DbType.Int16, RMId); } else { db.AddInParameter(getEQMISCmd, "@RMId", DbType.Int16, DBNull.Value); } if (BranchId != 0) { db.AddInParameter(getEQMISCmd, "@BranchId", DbType.Int16, BranchId); } else { db.AddInParameter(getEQMISCmd, "@BranchId", DbType.Int16, DBNull.Value); } if (branchHeadId != 0) { db.AddInParameter(getEQMISCmd, "@branchHeadId", DbType.Int16, branchHeadId); } else { db.AddInParameter(getEQMISCmd, "@branchHeadId", DbType.Int16, DBNull.Value); } if (all != 0) { db.AddInParameter(getEQMISCmd, "@all", DbType.Int16, all); } dsGetAllUsersEQMIS = db.ExecuteDataSet(getEQMISCmd); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorMFDao.cs:GetAllUsersEQMISForComSec()"); object[] objects = new object[11]; objects[0] = userType; objects[1] = valuationDate; objects[2] = EQMIStype; objects[3] = portfolioType; objects[4] = adviserId; objects[5] = RMId; objects[6] = BranchId; objects[7] = branchHeadId; objects[8] = all; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(dsGetAllUsersEQMIS); }
public void SetNode() { string strNodeValue = null; try { if (TreeView1.SelectedNode.Value.ToString() == "Home") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMCustomerNonIndividualDashboard','none');", true); } if (TreeView1.SelectedNode.Value.ToString() == "Profile") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewNonIndividualProfile','none');", true); } if (TreeView1.SelectedNode.Value.ToString() == "Bank") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewBankDetails','none');", true); } // Code to Expand/Collapse the Tree View Nodes based on selections else if (TreeView1.SelectedNode.Value == "Reports") { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('FinancialPlanningReports','login')", true); } if (TreeView1.SelectedNode.Parent == null) { foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != TreeView1.SelectedNode.Value) { node.Collapse(); } else { node.Expand(); } } } else { strNodeValue = TreeView1.SelectedNode.Parent.Value; foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != strNodeValue) { node.Collapse(); } } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerNonIndividualLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()"); object[] objects = new object[1]; objects[0] = strNodeValue; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public void LoadSystematicSetupGrid(int portfolioId) { List <SystematicSetupVo> systematicSetupList = new List <SystematicSetupVo>(); try { string path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); int count; systematicSetupList = systematicSetupBo.GetSystematicSchemeSetupList(portfolioId, mypager.CurrentPage, hdnSort.Value, out count); if (count > 0) { lblTotalRows.Text = hdnRecordCount.Value = count.ToString(); tblPager.Visible = true; } if (systematicSetupList != null) { lblMsg.Visible = false; DataTable dtSystematicSetup = new DataTable(); //dtProperty.Columns.Add("SI.No"); dtSystematicSetup.Columns.Add("SystematicSetupId"); dtSystematicSetup.Columns.Add("Scheme Name"); dtSystematicSetup.Columns.Add("Folio"); dtSystematicSetup.Columns.Add("Systematic Transaction Type"); dtSystematicSetup.Columns.Add("Start Date"); dtSystematicSetup.Columns.Add("End Date"); dtSystematicSetup.Columns.Add("Systematic Date"); dtSystematicSetup.Columns.Add("Amount"); dtSystematicSetup.Columns.Add("Frequency"); DataRow drSystematicSetup; for (int i = 0; i < systematicSetupList.Count; i++) { drSystematicSetup = dtSystematicSetup.NewRow(); systematicSetupVo = new SystematicSetupVo(); systematicSetupVo = systematicSetupList[i]; //drProperty[0] = (i + 1).ToString(); drSystematicSetup[0] = systematicSetupVo.SystematicSetupId.ToString(); drSystematicSetup[1] = systematicSetupVo.SchemePlan.ToString(); //add to Vo scheme name and use join in SP drSystematicSetup[2] = systematicSetupVo.Folio.ToString(); //add folio to Vo and use join in SP drSystematicSetup[3] = systematicSetupVo.SystematicType.ToString(); //join drSystematicSetup[4] = systematicSetupVo.StartDate.ToShortDateString(); drSystematicSetup[5] = systematicSetupVo.EndDate.ToShortDateString(); drSystematicSetup[6] = systematicSetupVo.SystematicDate.ToString(); drSystematicSetup[7] = String.Format("{0:n2}", systematicSetupVo.Amount.ToString("f2")); drSystematicSetup[8] = systematicSetupVo.Frequency.ToString();//join dtSystematicSetup.Rows.Add(drSystematicSetup); } gvrSystematicSchemes.DataSource = dtSystematicSetup; gvrSystematicSchemes.DataBind(); this.GetPageCount(); } else { lblMsg.Visible = true; gvrSystematicSchemes.DataSource = null; gvrSystematicSchemes.DataBind(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioSystematicView.ascx:LoadSystematicSetupGrid()"); object[] objects = new object[1]; objects[0] = systematicSetupVo; objects[1] = systematicSetupList; FunctionInfo = exBase.AddObject(FunctionInfo, null);/*, objects*/ exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void LoadBranchPerfomanceChart() { double tempEq = 0, tempMf = 0, tempIns = 0; int j = 0; DataSet dsAssetChart = new DataSet(); Series seriesAssets = new Series("BranchPerformance"); AssetBo assetsBo = new AssetBo(); DataSet ds = null; int Count = 0; try { ds = assetBo.GetAdviserBranchMF_EQ_In_AggregateCurrentValues(advisorVo.advisorId, out Count, 0, out total); lblTotalRows.Text = hdnRecordCount.Value = Count.ToString(); if (ds.Tables[0].Rows.Count > 0) { DataSet branchPerformanceDs = new DataSet(); DataRow drResult; DataRow dr; DataTable dt = new DataTable(); dt.Columns.Add("Branch Name"); dt.Columns.Add("Branch Code"); dt.Columns.Add("Aggr"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr = dt.NewRow(); drResult = ds.Tables[0].Rows[i]; dr[0] = drResult["AB_BranchName"].ToString(); dr[1] = drResult["AB_BranchCode"].ToString(); tempEq = Math.Round(Convert.ToDouble(drResult["EquityAggr"].ToString()), 2); tempIns = Math.Round(Convert.ToDouble(drResult["MFAggr"].ToString()), 2); tempMf = Math.Round(Convert.ToDouble(drResult["InsuranceAggr"].ToString()), 2); if (tempEq == 0 && tempIns == 0 && tempMf == 0) { j = j + 1; } dr[2] = Math.Round((tempEq + tempIns + tempMf), 2).ToString(); dt.Rows.Add(dr); } branchPerformanceDs.Tables.Add(dt); if (j != ds.Tables[0].Rows.Count) { // LoadChart seriesAssets.ChartType = SeriesChartType.Bar; ChartBranchPerformance.DataSource = branchPerformanceDs.Tables[0].DefaultView; ChartBranchPerformance.Series.Clear(); ChartBranchPerformance.Series.Add(seriesAssets); ChartBranchPerformance.Series[0].XValueMember = "Branch Code"; ChartBranchPerformance.Series[0].XValueType = ChartValueType.String; ChartBranchPerformance.Series[0].YValueMembers = "Aggr"; ChartBranchPerformance.Series["BranchPerformance"].IsValueShownAsLabel = true; ChartBranchPerformance.ChartAreas[0].AxisX.Title = "BranchCode"; ChartBranchPerformance.ChartAreas[0].AxisX.Interval = 1; ChartBranchPerformance.ChartAreas[0].AxisY.Title = "Aggregate Value"; //ChartBranchPerformance.ChartAreas[0].AxisX.TextOrientation = TextOrientation.Rotated90; ChartBranchPerformance.ChartAreas[0].Area3DStyle.Enable3D = true; ChartBranchPerformance.DataBind(); } else { ChartBranchPerformance.DataSource = null; ChartBranchPerformance.Visible = false; lblBranchPerformChart.Visible = false; GetPageCount(); } } else { ChartBranchPerformance.Visible = false; lblBranchPerformChart.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "IFAAdminMainDashboard.ascx:LoadBranchPerfomanceChart()"); object[] objects = new object[5]; objects[0] = advisorVo; objects[1] = ds; objects[2] = tempEq; objects[3] = tempIns; objects[4] = tempMf; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e) { try { //DropDownList ddlAction = (DropDownList)sender; //GridViewRow gvr = (GridViewRow)ddlAction.NamingContainer; //int selectedRow = gvr.RowIndex; RadComboBox ddlAction = (RadComboBox)sender; GridDataItem gvr = (GridDataItem)ddlAction.NamingContainer; int selectedRow = gvr.ItemIndex + 1; EQAccountId = int.Parse(gvEQAcc.MasterTableView.DataKeyValues[selectedRow - 1]["AccountId"].ToString()); Session["AccountId"] = EQAccountId; Session["EQAccountVoRow"] = CustomerTransactionBo.GetCustomerEQAccountDetails(EQAccountId, portfolioId); if (ddlAction.SelectedValue.ToString() == "Edit") { if (hdnIsCustomerLogin.Value == "Customer" && hdnIsMainPortfolio.Value == "1") { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", @"alert('Permisssion denied for Manage Portfolio !!');", true); } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd','action=Edit');", true); } } if (ddlAction.SelectedValue.ToString() == "View") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountAdd','action=View');", true); } if (ddlAction.SelectedValue.ToString() == "Delete") { if (hdnIsCustomerLogin.Value == "Customer" && hdnIsMainPortfolio.Value == "1") { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", @"alert('Permisssion denied for Manage Portfolio !!');", true); } else { bool CheckTradeAccAssociationWithTransactions; CheckTradeAccAssociationWithTransactions = CustomerTransactionBo.CheckEQTradeAccNoAssociatedWithTransactions(EQAccountId); if (CheckTradeAccAssociationWithTransactions == true) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", @"alert('Trade Account can not be deleted as some Transactions are Associated with this Trade Account Number.');", true); } else if (CheckTradeAccAssociationWithTransactions == false) { Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", "ShowAlertToDelete();", true); } } } } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerMFFolioView.ascx:ddlAction_OnSelectedIndexChange()"); object[] objects = new object[1]; objects[0] = FolioId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void LoadRMPerformanceChart() { double tempAggr = 0; AssetBo assetsBo = new AssetBo(); DataSet dsAssetChart = new DataSet(); DataSet ds = null; try { Series seriesAssets = new Series("RMPerformance"); Legend legend = new Legend("RMPerformanceLegend"); legend.Enabled = true; ds = assetBo.GetAdvisorRM_All_AssetAgr(advisorVo.advisorId); if (ds.Tables[0].Rows.Count > 0) { string[] XValues = new string[ds.Tables[0].Rows.Count]; double[] YValues = new double[ds.Tables[0].Rows.Count]; DataSet RMPerformanceDs = new DataSet(); int j = 0; DataRow drResult; DataRow dr; DataTable dt = new DataTable(); dt.Columns.Add("RMName"); dt.Columns.Add("AggregateValue"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr = dt.NewRow(); drResult = ds.Tables[0].Rows[i]; dr[0] = drResult["AR_FirstName"].ToString() + drResult["AR_LastName"].ToString(); tempAggr = Math.Round(Convert.ToDouble(drResult["result"].ToString()), 2); if (tempAggr == 0) { j = j + 1; } dr[1] = tempAggr.ToString(); dt.Rows.Add(dr); } RMPerformanceDs.Tables.Add(dt); if (j != ds.Tables[0].Rows.Count) { // LoadChart seriesAssets.ChartType = SeriesChartType.Pie; ChartRMPerformance.DataSource = RMPerformanceDs.Tables[0].DefaultView; Series series1 = ChartRMPerformance.Series[0]; ChartRMPerformance.Series.Clear(); ChartRMPerformance.Series.Add(seriesAssets); //ChartRMPerformance.Series[0]["CollectedThreshold"] = "5"; ChartRMPerformance.Series[0]["CollectedLegendText"] = "Other"; ChartRMPerformance.Series[0].XValueMember = "RMName"; ChartRMPerformance.Series[0].YValueMembers = "AggregateValue"; ChartRMPerformance.Legends.Add(legend); ChartRMPerformance.Legends["RMPerformanceLegend"].Title = "RM Performance"; ChartRMPerformance.Legends["RMPerformanceLegend"].TitleAlignment = StringAlignment.Center; ChartRMPerformance.Legends["RMPerformanceLegend"].TitleSeparator = LegendSeparatorStyle.DoubleLine; ChartRMPerformance.Legends["RMPerformanceLegend"].TitleSeparatorColor = Color.Black; LegendCellColumn colorColumn = new LegendCellColumn(); colorColumn.ColumnType = LegendCellColumnType.SeriesSymbol; colorColumn.HeaderText = "Color"; colorColumn.HeaderBackColor = Color.WhiteSmoke; ChartRMPerformance.Legends["RMPerformanceLegend"].CellColumns.Add(colorColumn); //LegendCellColumn RMNameColumn = new LegendCellColumn(); //RMNameColumn.ColumnType = LegendCellColumnType.Text; //RMNameColumn.HeaderText = "Name"; //RMNameColumn.Text = "#RMName"; //RMNameColumn.HeaderBackColor = Color.WhiteSmoke; //ChartRMPerformance.Legends["RMPerformanceLegend"].CellColumns.Add(RMNameColumn); LegendCellColumn totalColumn = new LegendCellColumn(); totalColumn.Alignment = ContentAlignment.MiddleLeft; totalColumn.Text = "#VALX: #PERCENT"; totalColumn.HeaderText = "Performance"; totalColumn.Name = "PerformanceColumn"; totalColumn.HeaderBackColor = Color.WhiteSmoke; ChartRMPerformance.Legends["RMPerformanceLegend"].CellColumns.Add(totalColumn); ChartRMPerformance.Series[0]["PieLabelStyle"] = "Disabled"; ChartRMPerformance.Series[0].ToolTip = "#VALX: #VALY"; ChartRMPerformance.ChartAreas[0].Area3DStyle.Enable3D = true; ChartRMPerformance.DataBind(); } else { ChartRMPerformance.DataSource = null; ChartRMPerformance.Visible = false; lblRMPerformChart.Visible = false; } } else { ChartRMPerformance.DataSource = null; ChartRMPerformance.Visible = false; lblRMPerformChart.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "IFAAdminMainDashboard.ascx:LoadRMPerformanceChart()"); object[] objects = new object[3]; objects[0] = advisorVo; objects[1] = ds; objects[2] = tempAggr; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindFolioGridView() { try { DataTable dtEQAcc = new DataTable(); customerVo = (CustomerVo)Session["CustomerVo"]; FolioList = CustomerTransactionBo.GetCustomerEQAccount(portfolioId); // lblTotalRows.Text = hdnRecordCount.Value = count.ToString(); if (FolioList == null) { lblMessage.Visible = true; //lblCurrentPage.Visible = false; //lblTotalRows.Visible = false; //DivPager.Visible = false; gvEQAcc.DataSource = null; gvEQAcc.DataBind(); } else { lblMessage.Visible = false; //lblTotalRows.Visible = true; //lblCurrentPage.Visible = true; //DivPager.Visible = true; dtEQAcc.Columns.Add("AccountId"); dtEQAcc.Columns.Add("Broker Name"); dtEQAcc.Columns.Add("Trade No"); dtEQAcc.Columns.Add("CB_CustBankAccId"); //dtEQAcc.Columns.Add("Broker Del Percent"); //dtEQAcc.Columns.Add("Broker Spec Percent"); //dtEQAcc.Columns.Add("Other Charges"); //dtEQAcc.Columns.Add("Sebi Turn Over Fee"); //dtEQAcc.Columns.Add("Transaction Charges"); //dtEQAcc.Columns.Add("Stamp Charges"); //dtEQAcc.Columns.Add("STT"); //dtEQAcc.Columns.Add("Service Tax"); //dtEQAcc.Columns.Add("Demat Charges"); dtEQAcc.Columns.Add("A/C Opening Date"); DataRow drEQAcc; for (int i = 0; i < FolioList.Count; i++) { drEQAcc = dtEQAcc.NewRow(); FolioVo = new CustomerAccountsVo(); FolioVo = FolioList[i]; drEQAcc["AccountId"] = FolioVo.AccountId.ToString(); drEQAcc["Broker Name"] = FolioVo.BrokerName.ToString(); drEQAcc["Trade No"] = FolioVo.TradeNum.ToString(); if (FolioVo.BankName != null) { drEQAcc["CB_CustBankAccId"] = FolioVo.BankName.ToString(); } else { drEQAcc["CB_CustBankAccId"] = string.Empty; } //drEQAcc["Broker Del Percent"] = FolioVo.BrokerageDeliveryPercentage.ToString(); //drEQAcc["Broker Spec Percent"] = FolioVo.BrokerageSpeculativePercentage.ToString(); //drEQAcc["Other Charges"] = FolioVo.OtherCharges.ToString(); //drEQAcc["Sebi Turn Over Fee"] = FolioVo.SebiTurnOverFee.ToString(); //drEQAcc["Transaction Charges"] = FolioVo.TransactionCharges.ToString(); //drEQAcc["Stamp Charges"] = FolioVo.StampCharges.ToString(); //drEQAcc["STT"] = FolioVo.Stt.ToString(); //drEQAcc["Service Tax"] = FolioVo.ServiceTax.ToString(); if (FolioVo.AccountOpeningDate != DateTime.MinValue) { drEQAcc["A/C Opening Date"] = FolioVo.AccountOpeningDate.ToShortDateString(); } else { drEQAcc["A/C Opening Date"] = string.Empty; } dtEQAcc.Rows.Add(drEQAcc); } gvEQAcc.DataSource = dtEQAcc; gvEQAcc.DataBind(); } if (Cache["EQAccountDetails" + portfolioId] == null) { Cache.Insert("EQAccountDetails" + portfolioId, dtEQAcc); } else { Cache.Remove("EQAccountDetails" + portfolioId); Cache.Insert("EQAccountDetails" + portfolioId, dtEQAcc); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerMFFolioView.ascx:BindFolioGridView()"); object[] objects = new object[2]; objects[0] = customerVo; objects[1] = portfolioId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void LoadGridView() { try { path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString(); customerVo = (CustomerVo)Session["CustomerVo"]; portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString()); int count; fixedincomeList = fixedincomeBo.GetFixedIncomePortfolioList(portfolioId, mypager.CurrentPage, hdnSort.Value, out count); if (count > 0) { lblTotalRows.Text = hdnRecordCount.Value = count.ToString(); tblPager.Visible = true; } if (fixedincomeList == null) { lblMessage.Visible = true; } else { lblMessage.Visible = false; DataTable dtFixedIncomePortfolio = new DataTable(); dtFixedIncomePortfolio.Columns.Add("FITransactionId"); dtFixedIncomePortfolio.Columns.Add("Name"); dtFixedIncomePortfolio.Columns.Add("Category"); dtFixedIncomePortfolio.Columns.Add("Purchase Date"); dtFixedIncomePortfolio.Columns.Add("Maturity Date"); dtFixedIncomePortfolio.Columns.Add("Deposit Amount"); dtFixedIncomePortfolio.Columns.Add("Interest Rate"); dtFixedIncomePortfolio.Columns.Add("Current Value"); dtFixedIncomePortfolio.Columns.Add("Maturity Value"); DataRow drFixedIncomePortfolio; for (int i = 0; i < fixedincomeList.Count; i++) { drFixedIncomePortfolio = dtFixedIncomePortfolio.NewRow(); fixedincomeVo = new FixedIncomeVo(); fixedincomeVo = fixedincomeList[i]; drFixedIncomePortfolio[0] = fixedincomeVo.FITransactionId.ToString(); drFixedIncomePortfolio[1] = fixedincomeVo.Name.ToString(); drFixedIncomePortfolio[2] = fixedincomeVo.AssetInstrumentCategoryName.ToString(); drFixedIncomePortfolio[3] = fixedincomeVo.PurchaseDate.ToShortDateString(); drFixedIncomePortfolio[4] = fixedincomeVo.MaturityDate.ToShortDateString(); if (Convert.ToDecimal(fixedincomeVo.PrinciaplAmount.ToString()) == 0) { drFixedIncomePortfolio[5] = "0"; } else { drFixedIncomePortfolio[5] = decimal.Parse(fixedincomeVo.PrinciaplAmount.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } drFixedIncomePortfolio[6] = fixedincomeVo.InterestRate.ToString(); if (Convert.ToDecimal(fixedincomeVo.CurrentValue.ToString()) == 0) { drFixedIncomePortfolio[7] = "0"; } else { drFixedIncomePortfolio[7] = decimal.Parse(fixedincomeVo.CurrentValue.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } // drFixedIncomePortfolio[7] = String.Format("{0:n2}", decimal.Parse(fixedincomeVo.CurrentValue.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); if (Convert.ToDecimal(fixedincomeVo.MaturityValue.ToString()) == 0) { drFixedIncomePortfolio[8] = "0"; } else { drFixedIncomePortfolio[8] = decimal.Parse(fixedincomeVo.MaturityValue.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")); } // drFixedIncomePortfolio[8] = String.Format("{0:n2}", decimal.Parse(fixedincomeVo.MaturityValue.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); dtFixedIncomePortfolio.Rows.Add(drFixedIncomePortfolio); } gvFixedIncomePortfolio.DataSource = dtFixedIncomePortfolio; gvFixedIncomePortfolio.DataBind(); this.GetPageCount(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioFixedIncomeView.ascx:Page_Load()"); object[] objects = new object[5]; objects[0] = customerVo; objects[1] = fixedincomeVo; objects[2] = fixedincomeList; objects[3] = portfolioId; objects[4] = path; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { if (btnSubmit.Text == "Update") { try { if (Validation()) { advisor = 1000; rm = 1001; advisorVo = (AdvisorVo)Session["advisorVo"]; if (!IsAddUpdate) { userVo = (UserVo)Session["iffUserVo"]; advisorVo = advisorBo.GetAdvisorUser(userVo.UserId); rmVo = (RMVo)Session["rmVo"]; } else { Ids = (List <int>)Session["IDs"]; userVo.UserId = Ids[0]; } DataPopulating(); advisorBo.UpdateCompleteAdviser(userVo, advisorVo, rmVo); showLOBList(advisorVo.advisorId); // This Delete Role Association Update Role . Dont worry about this name. If you have any doubt please refer "Stored Procedure" userBo.DeleteRoleAssociation(advisorVo.UserId, advisor); userBo.DeleteRoleAssociation(advisorVo.UserId, rm); try { GridValidationForIsDependent(); } catch (Exception ex) { throw ex; } ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('IFF','none');", true); } } catch (Exception ex) { throw ex; } } else { if (Validation()) { advisorVo = new AdvisorVo(); DataPopulating(); Ids = advisorBo.RegisterAdviser(userVo, advisorVo, rmVo); Session["IDs"] = Ids; // Session["advisorVo"] = advisorVo; showLOBList(Ids[1]); if (Ids != null) { advisorVo = advisorBo.GetAdvisor(Ids[1]); Session["advisorVo"] = advisorVo; CreateMainBranch(); advisor = 1000; rm = 1001; bm = 1002; userBo.CreateRoleAssociation(Ids[0], advisor); userBo.CreateRoleAssociation(Ids[0], rm); userBo.CreateRoleAssociation(Ids[0], bm); GridValidationForIsDependent(); } try { CreationSuccessMessage.Visible = true; Session["iffUserVo"] = userVo; btnAddLOB.Visible = true; btnSendLoginId.Visible = true; //btnSubscription.Visible = true; lblMsg.Visible = true; btnSubmit.Text = "Update"; advisorVo = (AdvisorVo)Session["advisorVo"]; DataRepopulating(); } catch (Exception ex) { throw ex; } } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorRegistration.ascx:btnNext_Click()"); object[] objects = new object[10]; objects[0] = advisorVo; objects[1] = userVo; objects[2] = rmVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindIssue() { try { ddlIssue.Items.Clear(); DataSet dsIssuer = new DataSet(); dsIssuer = onlineNCDBackOfficeBo.GetIssuerAllotmentIssues(advisorVo.advisorId, ddlProduct.SelectedValue, int.Parse(ddlType.SelectedValue), "PR", ddlSubCategory.SelectedValue); if (dsIssuer.Tables[0].Rows.Count > 0) { ddlIssue.DataSource = dsIssuer; ddlIssue.DataValueField = dsIssuer.Tables[0].Columns["AIM_IssueId"].ToString(); ddlIssue.DataTextField = dsIssuer.Tables[0].Columns["AIM_IssueName"].ToString(); ddlIssue.DataBind(); } ddlIssue.Items.Insert(0, new ListItem("Select", "Select")); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "OnlineNCDOrderMatchExceptionHandling.ascx.cs:BindIssuer()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } //try //{ // DataSet dsIssuer = new DataSet(); // dsIssuer = onlineNCDBackOfficeBo.GetIssuer(); // if (dsIssuer.Tables[0].Rows.Count > 0) // { // ddlIssuer.DataSource = dsIssuer; // ddlIssuer.DataValueField = dsIssuer.Tables[0].Columns["PI_issuerId"].ToString(); // ddlIssuer.DataTextField = dsIssuer.Tables[0].Columns["PI_IssuerName"].ToString(); // ddlIssuer.DataBind(); // } // ddlIssuer.Items.Insert(0, new ListItem("Select", "Select")); //} //catch (BaseApplicationException Ex) //{ // throw Ex; //} //catch (Exception Ex) //{ // BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); // NameValueCollection FunctionInfo = new NameValueCollection(); // FunctionInfo.Add("Method", "OnlineNCDOrderMatchExceptionHandling.ascx.cs:BindIssuer()"); // object[] objects = new object[0]; // FunctionInfo = exBase.AddObject(FunctionInfo, objects); // exBase.AdditionalInformation = FunctionInfo; // ExceptionManager.Publish(exBase); // throw exBase; //} }
/// <summary> /// Used to send mail for registered users /// </summary> /// <param name="userVo"></param> /// <returns></returns> /// public void showLOBList(int advisorId) { string path = ""; string classificationCode = ""; try { //advisorVo = (AdvisorVo)Session["LOBAdvisorVo"]; if (!IsPostBack) { path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); advisorLOBList = advisorLOBBo.GetAdvisorLOBs(advisorId, null, null); if (advisorLOBList.Tables[0].Rows.Count > 0) { lblMsg.Visible = false; DataTable dtAdvisorLOB = new DataTable(); dtAdvisorLOB.Columns.Add("SI.No"); dtAdvisorLOB.Columns.Add("LOBId"); dtAdvisorLOB.Columns.Add("Broker Name"); dtAdvisorLOB.Columns.Add("Business Type"); dtAdvisorLOB.Columns.Add("Identifier"); dtAdvisorLOB.Columns.Add("Identifier Type"); DataRow drAdvisorLOB; for (int i = 0; i < advisorLOBList.Tables[0].Rows.Count; i++) { classificationCode = advisorLOBList.Tables[0].Rows[i]["XALC_LOBClassificationCode"].ToString(); drAdvisorLOB = dtAdvisorLOB.NewRow(); drAdvisorLOB[0] = (i + 1).ToString(); drAdvisorLOB[1] = advisorLOBList.Tables[0].Rows[i]["AL_LOBId"].ToString(); drAdvisorLOB[2] = advisorLOBList.Tables[0].Rows[i]["AL_OrgName"].ToString(); drAdvisorLOB[3] = XMLBo.GetLOBType(path, advisorLOBList.Tables[0].Rows[i]["XALC_LOBClassificationCode"].ToString()); if (classificationCode == "LDSA" || classificationCode == "LFIA" || classificationCode == "LIAG" || classificationCode == "LPAG" || classificationCode == "LREA") { drAdvisorLOB[4] = advisorLOBList.Tables[0].Rows[i]["AL_AgentNo"].ToString(); drAdvisorLOB[5] = "Agent No./Agency Code"; } else { drAdvisorLOB[4] = advisorLOBList.Tables[0].Rows[i]["AL_Identifier"].ToString(); drAdvisorLOB[5] = advisorLOBList.Tables[0].Rows[i]["XALIT_IdentifierTypeCode"].ToString(); } dtAdvisorLOB.Rows.Add(drAdvisorLOB); } advisorLOBListCheck = advisorLOBList; if (dtAdvisorLOB.Rows.Count > 10) { gvLOBList.ShowFooter = true; } else { gvLOBList.FooterStyle.HorizontalAlign = HorizontalAlign.Center; } gvLOBList.ShowFooter = true; gvLOBList.DataSource = dtAdvisorLOB; gvLOBList.DataBind(); } else { lblMsg.Visible = true; //lblMsg.Text = "LOB List is Empty.."; } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "ViewLOB.ascx:showLOBList()"); object[] objects = new object[4]; objects[0] = advisorId; objects[1] = path; objects[2] = advisorLOBVo; objects[3] = advisorLOBList; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); string path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString(); userVo = (UserVo)Session["UserVo"]; advisorVo = advisorBo.GetAdvisorUser(userVo.UserId); if (Session["advisorVo"] != null && Session["rmVo"] != null && userVo.UserType == "SuperAdmin") { advisorVo = (AdvisorVo)Session["advisorVo"]; rmVo = (RMVo)Session["rmVo"]; } else { advisorVo = advisorBo.GetAdvisorUser(userVo.UserId); rmVo = advisorStaffBo.GetAdvisorStaff(userVo.UserId); } //RegularExpressionValidator3.Controls.Add( if (!IsPostBack) { lblSTD.CssClass = "FieldName"; lblEmail.CssClass = "FieldName"; lblISD.CssClass = "FieldName"; lblLine1.CssClass = "FieldName"; lblOrganizationName.CssClass = "FieldName"; lblPhoneNUmber.CssClass = "FieldName"; lblPincode.CssClass = "FieldName"; lblFax.CssClass = "FieldName"; BindDropDowns(path); if (advisorVo.BusinessCode != null) { ddlBusinessType.SelectedValue = advisorVo.BusinessCode.ToString(); } if (advisorVo.Associates == 1) { rbtnAssModelTypeYes.Checked = true; rbtnAssModelTypeNo.Checked = false; } else { rbtnAssModelTypeYes.Checked = false; rbtnAssModelTypeNo.Checked = true; } if (advisorVo.MultiBranch == 1) { rbtnYes.Checked = true; rbtnNo.Checked = false; } else { rbtnNo.Checked = true; rbtnYes.Checked = false; } if (advisorVo.AddressLine1 != null) { txtAddressLine1.Text = advisorVo.AddressLine1.ToString(); } if (advisorVo.AddressLine2 != null) { txtAddressLine2.Text = advisorVo.AddressLine2.ToString(); } if (advisorVo.AddressLine3 != null) { txtAddressLine3.Text = advisorVo.AddressLine3.ToString(); } if (advisorVo.Website != null) { txtwebsite.Text = advisorVo.Website.ToString(); } txtEmail.Text = advisorVo.Email.ToString(); if (advisorVo.Fax != 0) { txtFax.Text = advisorVo.Fax.ToString(); } if (advisorVo.FaxIsd != 0) { txtFaxISD.Text = advisorVo.FaxIsd.ToString(); } if (advisorVo.FaxStd != 0) { txtFaxSTD.Text = advisorVo.FaxStd.ToString(); } if (advisorVo.ContactPersonFirstName != null) { txtFirstName.Text = advisorVo.ContactPersonFirstName.ToString(); } if (advisorVo.Phone1Isd != 0) { txtISD1.Text = advisorVo.Phone1Isd.ToString(); } if (advisorVo.Phone2Isd != 0) { txtISD2.Text = advisorVo.Phone2Isd.ToString(); } if (advisorVo.ContactPersonLastName != null) { txtLastName.Text = advisorVo.ContactPersonLastName.ToString(); } if (advisorVo.ContactPersonMiddleName != null) { txtMiddleName.Text = advisorVo.ContactPersonMiddleName.ToString(); } if (advisorVo.MobileNumber != 0) { txtMobileNumber.Text = advisorVo.MobileNumber.ToString(); } if (advisorVo.Phone1Number != 0) { txtPhoneNumber1.Text = advisorVo.Phone1Number.ToString(); } if (advisorVo.Phone2Number != 0) { txtPhoneNumber2.Text = advisorVo.Phone2Number.ToString(); } if (advisorVo.PinCode != 0) { txtPinCode.Text = advisorVo.PinCode.ToString(); } if (advisorVo.Phone1Std != 0) { txtSTD1.Text = advisorVo.Phone1Std.ToString(); } if (advisorVo.Phone2Std != 0) { txtSTD2.Text = advisorVo.Phone2Std.ToString(); } txtOrganizationName.Text = advisorVo.OrganizationName.ToString(); txtCity.Text = advisorVo.City.ToString(); if (advisorVo.Country != null) { txtCountry.Text = advisorVo.Country.ToString(); } if (advisorVo.State != null) { ddlState.SelectedValue = advisorVo.State.ToString(); } if (!string.IsNullOrEmpty(advisorVo.LogoPath)) { lnklogoChange.Text = "Click to change Logo"; } else { lnklogoChange.Text = "Click to upload Logo"; } if (advisorVo.Designation != null) { textDesignation.Text = advisorVo.Designation.ToString(); } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "EditAdvisorProfile.ascx:Page_Load()"); object[] objects = new object[4]; objects[0] = advisorBo; objects[1] = advisorVo; objects[2] = userVo; objects[3] = userBo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void btnNext_Click(object sender, EventArgs e) { string bType = ""; string path = ""; try { if (Validation()) { user = (UserVo)Session["UserVo"]; bType = ddlBusinessType.SelectedValue.ToString(); path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"]).ToString(); string multiBranch = " "; if (rbtnNo.Checked) { multiBranch = "no"; } if (rbtnYes.Checked) { multiBranch = "yes"; } userVo.Email = txtEmail.Text.ToString(); if (TextBox1.Text == "") { advisorVo.Website = null; } else { advisorVo.Website = TextBox1.Text.ToString(); } userVo.FirstName = txtFirstName.Text.ToString(); userVo.MiddleName = txtMiddleName.Text.ToString(); userVo.LastName = txtLastName.Text.ToString(); userVo.Password = Encryption.Encrypt(r.Next(20000, 100000).ToString()); userVo.UserType = "Advisor"; userVo.Email = txtEmail.Text.ToString(); userVo.LoginId = txtEmail.Text.ToString(); advisorVo.AddressLine1 = txtAddressLine1.Text.ToString(); advisorVo.AddressLine2 = txtAddressLine2.Text.ToString(); advisorVo.AddressLine3 = txtAddressLine3.Text.ToString(); if (ddlBusinessType.SelectedIndex != 0) { advisorVo.BusinessCode = ddlBusinessType.SelectedValue.ToString(); } else { advisorVo.BusinessCode = null; } advisorVo.City = txtCity.Text.Trim(); advisorVo.ContactPersonFirstName = txtFirstName.Text.ToString(); advisorVo.ContactPersonLastName = txtLastName.Text.ToString(); advisorVo.ContactPersonMiddleName = txtMiddleName.Text.ToString(); advisorVo.Country = ddlCountry.SelectedItem.Value.ToString(); if (txtFaxNumber.Text == "") { advisorVo.Fax = 0; rmVo.Fax = 0; } else { advisorVo.Fax = int.Parse(txtFaxNumber.Text.ToString()); rmVo.Fax = int.Parse(txtFaxNumber.Text); } if (txtFaxISD.Text == "") { advisorVo.FaxIsd = 0; rmVo.FaxIsd = 0; } else { advisorVo.FaxIsd = int.Parse(txtFaxISD.Text.ToString()); rmVo.FaxIsd = int.Parse(txtFaxISD.Text); } if (txtFaxSTD.Text == "") { advisorVo.FaxStd = 0; rmVo.FaxStd = 0; } else { advisorVo.FaxStd = int.Parse(txtFaxSTD.Text.ToString()); rmVo.FaxStd = int.Parse(txtFaxSTD.Text); } if (txtMobileNumber.Text == "") { advisorVo.MobileNumber = 0; rmVo.Mobile = 0; } else { advisorVo.MobileNumber = Convert.ToInt64(txtMobileNumber.Text.ToString()); rmVo.Mobile = Convert.ToInt64(txtMobileNumber.Text.ToString()); } if (txtISD1.Text == "") { advisorVo.Phone1Isd = String.Empty; rmVo.OfficePhoneDirectIsd = String.Empty; } else { advisorVo.Phone1Isd = txtISD1.Text.ToString(); rmVo.OfficePhoneDirectIsd = txtISD1.Text; } if (txtISD2.Text == "") { advisorVo.Phone2Isd = string.Empty; rmVo.OfficePhoneExtIsd = string.Empty; } else { advisorVo.Phone2Isd = txtISD2.Text.ToString(); rmVo.OfficePhoneExtIsd = txtISD2.Text; } if (txtPhoneNumber1.Text == "") { advisorVo.Phone1Number = 0; rmVo.OfficePhoneDirectNumber = 0; } else { advisorVo.Phone1Number = int.Parse(txtPhoneNumber1.Text.ToString()); rmVo.OfficePhoneDirectNumber = int.Parse(txtPhoneNumber1.Text); } if (txtPhoneNumber2.Text == "") { advisorVo.Phone2Number = 0; rmVo.OfficePhoneExtNumber = 0; } else { advisorVo.Phone2Number = int.Parse(txtPhoneNumber2.Text.ToString()); rmVo.OfficePhoneExtNumber = int.Parse(txtPhoneNumber2.Text); } if (txtSTD1.Text == "") { advisorVo.Phone1Std = string.Empty; rmVo.OfficePhoneDirectStd = string.Empty; } else { advisorVo.Phone1Std = txtSTD1.Text; rmVo.OfficePhoneDirectStd = txtSTD1.Text; } if (txtSTD2.Text == "") { advisorVo.Phone2Std = string.Empty; rmVo.OfficePhoneExtStd = string.Empty; } else { advisorVo.Phone2Std = txtSTD2.Text; rmVo.OfficePhoneExtStd = txtSTD2.Text; } if (multiBranch.ToString().Trim() == "yes") { advisorVo.MultiBranch = 1; } else { advisorVo.MultiBranch = 0; } if (RadioButton2.Checked) { advisorVo.Associates = 0; } else { advisorVo.Associates = 1; } advisorVo.OrganizationName = txtOrganizationName.Text.ToString().Trim(); path = Server.MapPath("Images") + "\\"; if (AdvlogoPath.HasFile) { string[] fileName = AdvlogoPath.FileName.Split('.'); advisorVo.LogoPath = advisorVo.OrganizationName + "_" + fileName[0] + ".jpg"; //advisorBranchVo.LogoPath = advisorVo.advisorId + "_" + txtBranchCode.Text.ToString() + ".jpg"; HttpPostedFile myFile = AdvlogoPath.PostedFile; UploadImage(path, myFile, advisorVo.LogoPath); //FileUpload.SaveAs(Server.MapPath("Images") + "\\" + advisorVo.advisorId + "_" + txtBranchCode.Text.ToString() + ".jpg"); } if (txtPinCode.Text == "") { advisorVo.PinCode = 0; } else { advisorVo.PinCode = int.Parse(txtPinCode.Text.ToString()); } if (ddlState.SelectedIndex != 0) { advisorVo.State = ddlState.SelectedItem.Value.ToString(); } else { advisorVo.State = null; } advisorVo.Email = userVo.Email; rmVo.Email = txtEmail.Text; rmVo.FirstName = txtFirstName.Text.ToString(); rmVo.LastName = txtLastName.Text.ToString(); rmVo.LoginId = txtEmail.Text.ToString(); rmVo.MiddleName = txtMiddleName.Text; rmVo.UserId = userVo.UserId; rmVo.RMRole = "RM"; rmVo.IsExternal = 0; Ids = advisorBo.CreateCompleteAdviser(userVo, advisorVo, rmVo); Session["IDs"] = Ids; if (Ids != null) { CreateMainBranch(); } //string EmailPath = Server.MapPath(ConfigurationManager.AppSettings["EmailPath"].ToString()); //PcgMailMessage email = new PcgMailMessage(); //email.SendRegistrationMail("*****@*****.**", userVo.Email, userVo.FirstName + " " + userVo.MiddleName + " " + userVo.LastName, userVo.LoginId, userVo.Password, EmailPath); Session["RegistrationMailSent"] = null; bool isEmailSent = SendMail(userVo); Session["RegistrationMailSent"] = isEmailSent; if (Ids != null) { advisorVo = advisorBo.GetAdvisor(Ids[1]); Session["advisorVo"] = advisorVo; advisor = 1000; rm = 1001; userBo.CreateRoleAssociation(Ids[0], advisor); // userBo.CreateRoleAssociation(userVo.UserId, rm); if (chkRoleBM.Checked) { bm = 1002; userBo.CreateRoleAssociation(Ids[0], bm); rm = 1001; userBo.CreateRoleAssociation(Ids[0], rm); } if (!chkRoleBM.Checked) { rm = 1001; userBo.CreateRoleAssociation(Ids[0], rm); } } Session["advisorId"] = advisorVo.advisorId.ToString(); Session["orgName"] = advisorVo.OrganizationName.ToString(); Session["UserVo"] = userVo; Session["multiBranch"] = multiBranch.ToString(); Session["mf1"] = null; Session["equityBrokerCash1"] = null; Session["equityBrokerDerivative1"] = null; Session["equitySubBrokerCash1"] = null; Session["equitySubBrokerDerivative1"] = null; Session["equityRemissaryCash1"] = null; Session["equityRemissaryDerivative1"] = null; Session["LOBId"] = "FromReg"; if (!chkMf.Checked && !chkEquity.Checked) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('UserLoginMessage','none');", true); } else { if (chkMf.Checked == true) { Session["mf1"] = "mf"; if (chkIntermediary.Checked == true) { Session["mf1"] = "mf"; } } if (chkEquity.Checked == true) { if (chkBroker.Checked == true) { if (chkCash.Checked == true) { Session["equityBrokerCash1"] = "equityBrokerCash"; } if (chkDerivative.Checked == true) { Session["equityBrokerDerivative1"] = "equityBrokerDerivative"; } } if (chkSubbroker.Checked == true) { if (chkCash.Checked == true) { Session["equitySubBrokerCash1"] = "equitySubBrokerCash"; } if (chkDerivative.Checked == true) { Session["equitySubBrokerDerivative1"] = "equitySubBrokerDerivaitve"; } } if (chkRemissary.Checked == true) { if (chkCash.Checked == true) { Session["equityRemissaryCash1"] = "equityRemissaryCash"; } if (chkDerivative.Checked == true) { Session["equityRemissaryDerivative1"] = "equityRemissaryDerivative"; } } } Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LOB','none');", true); } } //else //{ // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "alert('Sorry.. Error in Account creation..!');", true); //} } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorRegistration.ascx:btnNext_Click()"); object[] objects = new object[10]; objects[0] = advisorVo; objects[1] = userVo; objects[2] = rmVo; objects[3] = result; objects[4] = advisorId; objects[5] = path; objects[6] = bType; objects[7] = advisor; objects[8] = rm; objects[9] = user; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); customerVo = (CustomerVo)Session["CustomerVo"]; customerId = customerVo.CustomerId; customerBankAccId = int.Parse(Session["CustBankAccId"].ToString()); customerBankAccountVo = customerBankAccountBo.GetCustomerBankAccount(customerId, customerBankAccId); lblAccNum.Text = customerBankAccountVo.AccountNum.ToString(); //lblAccType.Text = customerBankAccountVo.AccountType; if (customerBankAccountVo.AccountType == "CC") { lblAccType.Text = "C.C."; } if (customerBankAccountVo.AccountType == "CR") { lblAccType.Text = "Current"; } if (customerBankAccountVo.AccountType == "FR") { lblAccType.Text = "F.C.N.R."; } if (customerBankAccountVo.AccountType == "NE") { lblAccType.Text = "NRE"; } if (customerBankAccountVo.AccountType == "NO") { lblAccType.Text = "NRO"; } if (customerBankAccountVo.AccountType == "OD") { lblAccType.Text = "O.D."; } if (customerBankAccountVo.AccountType == "SV") { lblAccType.Text = "Savings"; } if (customerBankAccountVo.AccountType == "OT") { lblAccType.Text = "Other"; } if (customerBankAccountVo.AccountType == "TBC") { lblAccType.Text = "To Be Categorized"; } //lblAccType.Text = XMLBo.GetBankAccountTypes(path, customerBankAccountVo.AccountType); if (customerBankAccountVo.ModeOfOperation == "SO") { lblModeOfOperation.Text = "Self Only"; } if (customerBankAccountVo.ModeOfOperation == "SI") { lblModeOfOperation.Text = "Singly"; } if (customerBankAccountVo.ModeOfOperation == "SE") { lblModeOfOperation.Text = "Severaly"; } if (customerBankAccountVo.ModeOfOperation == "JO") { lblModeOfOperation.Text = "Jointly"; } if (customerBankAccountVo.ModeOfOperation == "AS") { lblModeOfOperation.Text = "Anyone or Survivor"; } if (customerBankAccountVo.ModeOfOperation == "BR") { lblModeOfOperation.Text = "As per Board Resolution"; } if (customerBankAccountVo.ModeOfOperation == "ES") { lblModeOfOperation.Text = "Either or Survivor"; } if (customerBankAccountVo.ModeOfOperation == "FS") { lblModeOfOperation.Text = "Former or Survivor"; } if (customerBankAccountVo.ModeOfOperation == "TBC") { lblModeOfOperation.Text = "To Be Categorized"; } //lblModeOfOperation.Text = customerBankAccountVo.ModeOfOperation; lblBankName.Text = customerBankAccountVo.BankName.ToString(); lblBranchName.Text = customerBankAccountVo.BranchName.ToString(); lblLine1.Text = customerBankAccountVo.BranchAdrLine1.ToString(); lblLine2.Text = customerBankAccountVo.BranchAdrLine2.ToString(); lblLine3.Text = customerBankAccountVo.BranchAdrLine3.ToString(); lblPinCode.Text = customerBankAccountVo.BranchAdrPinCode.ToString(); lblCity.Text = customerBankAccountVo.BranchAdrCity.ToString(); lblIfsc.Text = customerBankAccountVo.IFSC.ToString(); lblMicr.Text = customerBankAccountVo.MICR.ToString(); state = XMLBo.GetStateName(path, customerBankAccountVo.BranchAdrState); lblState.Text = state; lblCountry.Text = customerBankAccountVo.BranchAdrCountry; } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "ViewCustomerAllBankDetails.ascx:PageLoad()"); object[] objects = new object[3]; objects[0] = customerBankAccId; objects[1] = customerBankAccountVo; objects[2] = customerId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); int rmId = 0; double total = 0; DataSet dsCurrentValues = null; DataTable dt; try { if (Session["CurrentrmVo"] != null) { rmVo = (RMVo)Session["CurrentrmVo"]; } else { rmVo = (RMVo)Session[SessionContents.RmVo]; } rmId = rmVo.RMId; dsCurrentValues = getCurrentValuesforRM(rmId); getCustomerListforRM(rmId); dt = dsCurrentValues.Tables[0]; foreach (DataRow dr in dt.Rows) { if (dr["AssetType"].ToString() == "Equity") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblEquityValue.Text = "0"; } else { lblEquityValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } if (dr["AssetType"].ToString() == "IN") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblInsuranceValue.Text = "0"; } else { lblInsuranceValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } if (dr["AssetType"].ToString() == "MF-DT") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblMFDebtValue.Text = "0"; } else { lblMFDebtValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } if (dr["AssetType"].ToString() == "MF-HY") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblMFHybridValue.Text = "0"; } else { lblMFHybridValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } if (dr["AssetType"].ToString() == "MF-OT") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblMFOthersValue.Text = "0"; } else { lblMFOthersValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } if (dr["AssetType"].ToString() == "MF-EQ") { if (dr["AggrGSCurrentValue"].ToString() == "") { lblEquityMFValue.Text = "0"; } else { lblEquityMFValue.Text = String.Format("{0:N}", decimal.Parse(dr["AggrGSCurrentValue"].ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); total += double.Parse(dr["AggrGSCurrentValue"].ToString()); } } } BindCustomerAlerts(); dtLoanProposal = liabilitiesBo.GetRMLoanProposalPendingCount(rmVo.RMId); if (dtLoanProposal != null) { tblLoanCount.Visible = true; lblPendingBank.Text = dtLoanProposal.Rows[0]["N_Count"].ToString(); lblPendingUs.Text = dtLoanProposal.Rows[1]["N_Count"].ToString(); } else { tblLoanCount.Visible = false; } lblTotalValue.Text = String.Format("{0:N}", decimal.Parse(total.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); //total.ToString("n2"); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "RMDashBoard.ascx.cs:Page_Load()"); object[] objects = new object[3]; objects[0] = rmId; objects[1] = total; objects[2] = dsCurrentValues; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void btnSubmit_Click(object sender, EventArgs e) { UserVo newUserVo = new UserVo(); try { // if (Validation()) { this.Page.Culture = "en-GB"; userVo = (UserVo)Session["userVo"]; rmVo = (RMVo)Session["rmVo"]; parentCustomerVo = (CustomerVo)Session["CustomerVo"]; customerVo.RmId = rmVo.RMId; //customerVo.CustomerId = int.Parse(Session["CustomerId2"].ToString()); if (txtEmail.Text == "") { customerVo.Email = txtFirstName.Text.ToString() + "@mail.com"; } else { customerVo.Email = txtEmail.Text.ToString(); } //customerVo.UserId = customerBo.GenerateId(); customerVo.FirstName = txtFirstName.Text.ToString(); customerVo.MiddleName = txtMiddleName.Text.ToString(); customerVo.LastName = txtLastName.Text.ToString(); customerVo.BranchId = parentCustomerVo.BranchId; newUserVo.FirstName = txtFirstName.Text.ToString(); newUserVo.MiddleName = txtMiddleName.Text.ToString(); newUserVo.LastName = txtLastName.Text.ToString(); newUserVo.Email = txtEmail.Text.ToString(); newUserVo.UserType = "Customer"; if (txtDob.Text.ToString() != "") { customerVo.Dob = DateTime.Parse(txtDob.Text.ToString()); } customerVo.ProfilingDate = DateTime.Today; if (rbtnIndividual.Checked) { customerVo.Type = "IND"; } else { customerVo.Type = "NIND"; } customerVo.SubType = ddlCustomerSubType.SelectedItem.Value.ToString(); //userVo.UserId = customerVo.UserId; customerPortfolioVo.CustomerId = customerFamilyVo.AssociateCustomerId; customerPortfolioVo.IsMainPortfolio = 1; customerPortfolioVo.PortfolioTypeCode = "RGL"; customerPortfolioVo.PMSIdentifier = ""; customerPortfolioVo.PortfolioName = "MyPortfolio"; List <int> CustomerIds = new List <int>(); CustomerIds = customerBo.CreateCompleteCustomer(customerVo, newUserVo, customerPortfolioVo, userVo.UserId); customerFamilyVo.AssociateCustomerId = CustomerIds[1]; customerFamilyVo.Relationship = Session["relationship"].ToString(); customerFamilyBo.CreateCustomerFamily(customerFamilyVo, parentCustomerVo.CustomerId, userVo.UserId); txtDob_CompareValidator.ValueToCompare = DateTime.Now.ToString("dd/MM/yyyy"); //portfolioBo.CreateCustomerPortfolio(customerPortfolioVo, userVo.UserId); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewCustomerFamily','none');", true); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "FamilyDetailsChild.ascx:btnSubmit_Click()"); object[] objects = new object[5]; objects[0] = customerVo; objects[1] = customerFamilyVo; objects[2] = userVo; objects[3] = rmVo; objects[4] = parentCustomerVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public void SetNode() { string strNodeValue = null; try { if (TreeView1.SelectedNode.Value.ToString() == "Switch Roles") { Session.Remove("UserType"); Session[SessionContents.CurrentUserRole] = null; count = roleList.Count; if (count == 3) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdvisorRMBMDashBoard','none');", true); //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('IFAAdminDashboard','login','" + UserName + "','" + sourcePath + "');", true); } if (count == 2) { if (roleList.Contains("RM") && roleList.Contains("BM")) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('BMRMDashBoard','login','" + UserName + "','" + sourcepath + "','" + branchLogoSourcePath + "');", true); } else if (roleList.Contains("RM") && roleList.Contains("Admin")) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loginloadcontrol('AdvisorRMDashBoard','login','" + UserName + "','" + sourcepath + "');", true); } } // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdvisorRMBMDashBoard','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Dashboard") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMDashBoard','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Profile") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewRMDetails','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Customers") { Session["Customer"] = "Customer"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMCustomer','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Add Customer") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerType','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Customer Group Accounts") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewCustomerFamily','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Add Group Account") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('GroupAccountSetup','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Customer Portfolio") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolio','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Add Portfolio") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerPortfolioSetup','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Customer Alerts") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('RMAlertDashBoard','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Notifications") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('AdviserCustomerSMSAlerts','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "LoanMIS") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserLoanMIS','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Loan Proposal") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanTrackingGrid','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "Add Loan Proposal") { Session["LoanProcessAction"] = "add"; Session[SessionContents.LoanProcessTracking] = null; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('LoanProcessTracking','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "MFReports") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('MFReports','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "EquityReports") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('EquityReports','none');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "MultiAssetReports") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioReports','none');", true); } //else if (TreeView1.SelectedNode.Value.ToString() == "MFMIS") //{ // Session["UserType"] = "rm"; // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true); //} else if (TreeView1.SelectedNode.Value.ToString() == "EView Transactions") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMEQMultipleTransactionsView','login');", true); //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "EAdd Transactions") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleEqTransactionsEntry','login');", true); //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserMFMIS','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "EMIS") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdviserEQMIS','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "MView Transactions") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMMultipleTransactionView','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "MMIS") { Session["UserType"] = "rm"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('RMAMCwiseMIS','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "MAdd Transactions") { Session["UserType"] = "adviser"; ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('UnderConstruction','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "ProspectList") { Session.Remove(SessionContents.FPS_ProspectList_CustomerId); Session.Remove(SessionContents.FPS_AddProspectListActionStatus); Session.Remove(SessionContents.FPS_CustomerPospect_ActionStatus); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('ProspectList','login');", true); } else if (TreeView1.SelectedNode.Value.ToString() == "AddProspect") { Session.Remove(SessionContents.FPS_ProspectList_CustomerId); Session.Remove(SessionContents.FPS_ProspectList_CustomerId); Session.Remove(SessionContents.FPS_AddProspectListActionStatus); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('AddProspectList','login');", true); } //else if (TreeView1.SelectedNode.Value == "DownloadForm") //{ // Response.Write("<script type='text/javascript'>window.open('FP/FinancialPlanning.htm','Print Form');</script>"); //} // Code to Expand/Collapse the Tree View Nodes based on selections if (TreeView1.SelectedNode.Parent == null) { foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != TreeView1.SelectedNode.Value) { node.Collapse(); } else { node.Expand(); } } } else { if (TreeView1.SelectedNode.Parent.Parent != null) { string parentNode = TreeView1.SelectedNode.Parent.Parent.Value; foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != parentNode) { node.Collapse(); } } } else { if (TreeView1.SelectedNode.Parent == null) { foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != TreeView1.SelectedNode.Value) { node.Collapse(); } else { node.Expand(); } } } else { strNodeValue = TreeView1.SelectedNode.Parent.Value; string val = TreeView1.SelectedNode.Value; foreach (TreeNode node in TreeView1.Nodes) { if (node.Value != strNodeValue) { node.Collapse(); } else { foreach (TreeNode child in node.ChildNodes) { if (child.Value != val) { child.Collapse(); } else { child.Expand(); } } } } } } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "RMLeftPane.ascx.cs:TreeView1_SelectedNodeChanged()"); object[] objects = new object[1]; objects[0] = strNodeValue; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public void setBranchList(string IsExternal) { UserVo rmUserVo = null; DataRow drAdvisorBranch; DataTable dtAdvisorBranch = new DataTable(); bool tracker = false; try { rmUserVo = (UserVo)Session["rmUserVo"]; if (IsExternal == "Y") { advisorBranchList = advisorBranchBo.GetAdvisorBranches(advisorVo.advisorId, "Y"); } else if (IsExternal == "N") { advisorBranchList = advisorBranchBo.GetAdvisorBranches(advisorVo.advisorId, "N"); } dtAdvisorBranch.Columns.Add("Branch"); dtAdvisorBranch.Columns.Add("Branch Code"); if (advisorBranchList != null) { for (int i = 0; i < advisorBranchList.Count; i++) { drAdvisorBranch = dtAdvisorBranch.NewRow(); advisorBranchVo = new AdvisorBranchVo(); advisorBranchVo = advisorBranchList[i]; if (associatedBranch.Items.FindByValue(advisorBranchVo.BranchId.ToString()) == null) { //if (tracker) //{ if (drAdvisorBranch["Branch"] != null && drAdvisorBranch["Branch Code"] != null) { drAdvisorBranch["Branch"] = advisorBranchVo.BranchName.ToString() + "," + advisorBranchVo.BranchId.ToString(); drAdvisorBranch["Branch Code"] = advisorBranchVo.BranchId.ToString(); dtAdvisorBranch.Rows.Add(drAdvisorBranch); } } } } //_commondatasetSource.Tables.Add(dtAdvisorBranch); availableBranch.DataSource = dtAdvisorBranch; availableBranch.DataTextField = "Branch"; availableBranch.DataValueField = "Branch Code"; availableBranch.DataBind(); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "RMBranchAssocistion.ascx:setBranchList()"); object[] objects = new object[3]; objects[0] = rmUserVo; objects[1] = advisorBranchList; objects[2] = advisorBranchVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); customerVo = (CustomerVo)Session["CustomerVo"]; rmVo = (RMVo)Session["RmVo"]; userVo = (UserVo)Session["userVo"]; if (userVo.UserType == "Advisor") { adviserVo = (AdvisorVo)Session["advisorVo"]; adviserId = adviserVo.advisorId; } else if (userVo.UserType == "RM") { adviserId = int.Parse(Session["adviserId"].ToString()); } adviserId = ((AdvisorVo)Session["advisorVo"]).advisorId; GetLatestValuationDate(); if (!IsPostBack) { if (Session[SessionContents.PortfolioId] != null) { portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString()); } else { customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId); Session[SessionContents.PortfolioId] = customerPortfolioVo.PortfolioId; portfolioId = customerPortfolioVo.PortfolioId; } BindPortfolioDropDown(); LoadChartsAndGrids(); } else { portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString()); BindPortfolioDropDown(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioDashboard.ascx:Page_Load()"); object[] objects = new object[6]; objects[0] = customerVo; objects[1] = userVo; objects[2] = rmVo; objects[3] = adviserVo; objects[4] = customerPortfolioVo; objects[5] = adviserId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }