public void Load(int pCustomerCode) { DataAccess obj = new DataAccess(); SqlDataReader oreader = obj.GetCustomer(pCustomerCode); while (oreader.Read()) { _CustomerCode = pCustomerCode; _IsNew = false; _CustomerName = oreader["CustomerName"].ToString(); } oreader = obj.GetAddress(CustomerCode); while (oreader.Read()) { AddressU objadd = new AddressU(); objadd.SetValue(CustomerCode, oreader["Address"].ToString(), oreader["Street"].ToString()); Add(objadd); } }
public void Add(AddressU obj) { objAddresses.Add(obj); }