public static Store GetStoreByTypeID(int typid) { DAL.StoreDetails strdet = myRealProvider.GetStoreByTypeID(typid); if (strdet == null) { return(null); } return(new Store(strdet.ID, strdet.TypeId, strdet.Amount, new MyDateTime(strdet.AddedDateClient), new MyDateTime(strdet.AddedDateClient), strdet.TypeName)); }