public static TaskareasCollection Select_TaskAreass_By_AreasysId(System.Nullable<int> AreasysId) { resourceSchema.Dal.Taskareas dbo = null; try { dbo = new resourceSchema.Dal.Taskareas(); System.Data.DataSet ds = dbo.Select_TaskAreass_By_AreasysId(AreasysId); TaskareasCollection collection = new TaskareasCollection(); if (GlobalTools.IsSafeDataSet(ds)) { for (int i = 0; (i < ds.Tables[0].Rows.Count); i = (i + 1)) { Taskareas obj = new Taskareas(); 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(); } } }