Пример #1
0
 public static AreasCollection GetAll() {
     resourceSchema.Dal.Areas dbo = null;
     try {
         dbo = new resourceSchema.Dal.Areas();
         System.Data.DataSet ds = dbo.Areas_Select_All();
         AreasCollection collection = new AreasCollection();
         if (GlobalTools.IsSafeDataSet(ds)) {
             for (int i = 0; (i < ds.Tables[0].Rows.Count); i = (i + 1)) {
                 Areas obj = new Areas();
                 obj.Fill(ds.Tables[0].Rows[i]);
                 if ((obj != null)) {
                     collection.Add(obj);
                 }
             }
         }
         return collection;
     }
     catch (System.Exception ) {
         throw;
     }
     finally {
         if ((dbo != null)) {
             dbo.Dispose();
         }
     }
 }