public void Init() { BundleLogic = new BundleLogic(); Date = new DateTime(2014, 05, 02); var creationResult = BundleLogic.CreateBundle(Date); TestBundle = creationResult.ReturnObject; }
public StdResult<Bundle> CreateBundle(DateTime date) { BundleDataService dal = new BundleDataService(); StdResult<Bundle> result = dal.Get(date); Bundle b; if (result.Result && result.ReturnObject != null) b = result.ReturnObject; else { b = new Bundle(); b.Date = date; b.Status = BundleStatus.NoFileCreated; } result = dal.Create(b); return result; }