Exemplo n.º 1
0
        /// <summary>
        /// 從XML載入設定值
        /// <![CDATA[
        /// ]]>
        /// </summary>
        /// <param name="data"></param>
        public void Load(XmlElement data)
        {
            RefStudentID = data.GetAttribute("RefStudentID");

            Permanent = new AddressItem(data.SelectSingleNode("Permanent/Address") as XmlElement);
            Mailing = new AddressItem(data.SelectSingleNode("Mailing/Address") as XmlElement);

            Address1 = new AddressItem(null);
            Address2 = new AddressItem(null);
            Address3 = new AddressItem(null);

            int index = 0;
            foreach (XmlElement each in data.SelectNodes("Addresses/AddressList/Address"))
            {
                if (index == 0)
                    Address1 = new AddressItem(each);

                if (index == 1)
                    Address2 = new AddressItem(each);

                if (index == 2)
                    Address3 = new AddressItem(each);

                index++;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 預設建構式
 /// </summary>
 public AddressRecord()
 {
     Permanent = new AddressItem(null);
     Mailing = new AddressItem(null);
     Address1 = new AddressItem(null);
     Address2 = new AddressItem(null);
     Address3 = new AddressItem(null);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 取得地址資料
 /// </summary>
 /// <param name="address"></param>
 /// <returns></returns>
 private string JoinAddress(K12.Data.AddressItem address)
 {
     return(address.ZipCode + address.County + address.Town + address.District + address.Area + address.Detail);
 }