protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); rmVo = (RMVo)Session[SessionContents.RmVo]; txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); txtMemberCustomer_AutoCompleteExtender.ContextKey = rmVo.RMId.ToString(); if (!IsPostBack) { BindRelationshipDropDown(); if (Request.QueryString["action"] == "Edit") { btnSave.Visible = false; associationId = int.Parse(Session["AssociationId"].ToString()); dtAssociateDetails = customerFamilyBo.GetCustomerAssociateDetails(associationId); txtParentCustomer.Text = dtAssociateDetails.Rows[0]["ParentName"].ToString(); txtParentCustomerId.Value = dtAssociateDetails.Rows[0]["ParentId"].ToString(); txtAddressParent.Text = dtAssociateDetails.Rows[0]["ParentAddress"].ToString(); txtPanParent.Text = dtAssociateDetails.Rows[0]["ParentPan"].ToString(); txtParentCustomerType.Value = dtAssociateDetails.Rows[0]["CustomerTypeCode"].ToString(); txtMemberCustomer.Text = dtAssociateDetails.Rows[0]["MemberName"].ToString(); txtMemberCustomerId.Value = dtAssociateDetails.Rows[0]["MemberId"].ToString(); txtAddressMember.Text = dtAssociateDetails.Rows[0]["MemberAddress"].ToString(); txtPanMember.Text = dtAssociateDetails.Rows[0]["MemberPan"].ToString(); txtParentCustomer.Enabled = false; txtMemberCustomer.Enabled = false; BindRelationshipDropDown(); ddlRelationship.SelectedValue = dtAssociateDetails.Rows[0]["Relationship"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { SessionBo.CheckSession(); userVo = (UserVo)Session["UserVo"]; advisorVo = (AdvisorVo)Session["advisorVo"]; path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); rmVo = (RMVo)Session[SessionContents.RmVo]; lblRMsBranch.Text = string.Empty; //txtParentCustomer_autoCompleteExtender.ContextKey = rmVo.RMId.ToString(); //txtMemberCustomer_AutoCompleteExtender.ContextKey = rmVo.RMId.ToString(); BindRMDropDown(); if (!IsPostBack) { BindRelationshipDropDown(); BindRMDropDown(); if (Request.QueryString["action"] == "Edit") { btnSave.Visible = false; associationId = int.Parse(Session["AssociationId"].ToString()); dsAssociateDetails = customerFamilyBo.GetCustomerAssociateDetails(associationId); if (dsAssociateDetails != null) { dtAssociateDetails = dsAssociateDetails.Tables[0]; dtAssociateDetails1 = dsAssociateDetails.Tables[1]; } txtParentCustomer.Text = dtAssociateDetails.Rows[0]["ParentName"].ToString(); txtParentCustomerId.Value = dtAssociateDetails.Rows[0]["ParentId"].ToString(); txtAddressParent.Text = dtAssociateDetails.Rows[0]["ParentAddress"].ToString(); txtPanParent.Text = dtAssociateDetails.Rows[0]["ParentPan"].ToString(); txtParentCustomerType.Value = dtAssociateDetails.Rows[0]["CustomerTypeCode"].ToString(); txtMemberCustomer.Text = dtAssociateDetails.Rows[0]["MemberName"].ToString(); txtMemberCustomerId.Value = dtAssociateDetails.Rows[0]["MemberId"].ToString(); txtAddressMember.Text = dtAssociateDetails.Rows[0]["MemberAddress"].ToString(); txtPanMember.Text = dtAssociateDetails.Rows[0]["MemberPan"].ToString(); txtParentCustomer.Enabled = false; txtMemberCustomer.Enabled = false; BindRelationshipDropDown(); BindRMDropDown(); ddlSelectRMs.Enabled = false; ddlSelectRMs.SelectedValue = dtAssociateDetails.Rows[0]["AR_RMId"].ToString(); ddlRelationship.SelectedValue = dtAssociateDetails.Rows[0]["Relationship"].ToString(); txtStaffCode.Text = !string.IsNullOrEmpty(dtAssociateDetails.Rows[0]["StaffCode"].ToString().Trim()) ? dtAssociateDetails.Rows[0]["StaffCode"].ToString().Trim() : string.Empty; if (dtAssociateDetails1.Rows.Count != 0) { int Increment = 0; foreach (DataRow dr in dtAssociateDetails1.Rows) { if (Increment == 0) { lblRMsBranch.Text += dr["AB_BranchName"].ToString(); } else { lblRMsBranch.Text += " ," + dr["AB_BranchName"].ToString(); } Increment++; } } else { lblRMsBranch.Text = string.Empty; } } } }