예제 #1
0
 public List<Maticsoft.Model.Shop.Shipping.ShippingAddress> DataTableToList(DataTable dt)
 {
     Regions regions = new Regions();
     List<Maticsoft.Model.Shop.Shipping.ShippingAddress> list = new List<Maticsoft.Model.Shop.Shipping.ShippingAddress>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             Maticsoft.Model.Shop.Shipping.ShippingAddress item = this.dal.DataRowToModel(dt.Rows[i]);
             if (item != null)
             {
                 item.RegionFullName = regions.GetFullNameById4Cache(item.RegionId);
                 list.Add(item);
             }
         }
     }
     return list;
 }
예제 #2
0
 public Maticsoft.Model.Shop.Shipping.ShippingAddress GetModel(int ShippingId)
 {
     Regions regions = new Regions();
     Maticsoft.Model.Shop.Shipping.ShippingAddress model = this.dal.GetModel(ShippingId);
     if (model != null)
     {
         model.RegionFullName = regions.GetFullNameById4Cache(model.RegionId);
     }
     return model;
 }