protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); customerVo = (CustomerVo)Session[SessionContents.CustomerVo]; userVo = (UserVo)Session[SessionContents.UserVo]; if (!IsPostBack) { this.BindGrid(mypager.CurrentPage); } if (customerVo.Type == "NIND") { dtRelationship = XMLBo.GetRelationship(path, "NIND"); ddlRelationship.DataSource = dtRelationship; ddlRelationship.DataTextField = "Relationship"; ddlRelationship.DataValueField = "RelationshipCode"; ddlRelationship.DataBind(); } else { dtRelationship = XMLBo.GetRelationship(path, "IND"); ddlRelationship.DataSource = dtRelationship; ddlRelationship.DataTextField = "Relationship"; ddlRelationship.DataValueField = "RelationshipCode"; ddlRelationship.DataBind(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerAssociatesAdd.ascx.cs:Page_Load()"); object[] objects = new object[4]; objects[0] = path; objects[1] = customerVo; objects[2] = userVo; objects[3] = dtRelationship; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindRelationshipDropDown() { if (txtParentCustomerType.Value != string.Empty) { if (ddlRelationship.Items.Count > 0) { ddlRelationship.Items.RemoveAt(0); } dtRelationship = XMLBo.GetRelationship(path, txtParentCustomerType.Value); ddlRelationship.DataSource = dtRelationship; ddlRelationship.DataTextField = "Relationship"; ddlRelationship.DataValueField = "RelationshipCode"; ddlRelationship.DataBind(); } ddlRelationship.Items.Insert(0, new ListItem("Select", "Select")); }
protected void Page_Load(object sender, EventArgs e) { try { SessionBo.CheckSession(); path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); if (Session["Current_Link"].ToString() == "RMCustomerIndividualLeftPane") { dtRelationship = XMLBo.GetRelationship(path, "IND"); ddlRelationship.DataSource = dtRelationship; ddlRelationship.DataTextField = "Relationship"; ddlRelationship.DataValueField = "RelationshipCode"; ddlRelationship.DataBind(); } else if (Session["Current_Link"].ToString() == "RMCustomerNonIndividualLeftPane") { dtRelationship = XMLBo.GetRelationship(path, "NIND"); ddlRelationship.DataSource = dtRelationship; ddlRelationship.DataTextField = "Relationship"; ddlRelationship.DataValueField = "RelationshipCode"; ddlRelationship.DataBind(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "FamilyDetails.ascx:Page_Load()"); object[] objects = new object[1]; objects[0] = path; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }