예제 #1
0
 public BinEditVM()
 {
     Status       = new AppStatus { AutoRemove = true };
     BinType      = new BinTypeVM(BinDays.BinType.GeneralWaste);
     OriginDate   = DateTime.Today;
     WeekInterval = 1;
     EditType     = "NEW";
     Id           = -1;
 }
예제 #2
0
 public BinEditVM()
 {
     Status = new AppStatus {
         AutoRemove = true
     };
     BinType      = new BinTypeVM(BinDays.BinType.GeneralWaste);
     OriginDate   = DateTime.Today;
     WeekInterval = 1;
     EditType     = "NEW";
     Id           = -1;
 }
예제 #3
0
 public BinEditVM(int id) : this()
 {
     using (var store = new DataStoreContext())
     {
         var bin = store.RubbishBins.First(x => x.Id == id);
         BinType      = new BinTypeVM(bin.BinType);
         OriginDate   = bin.OriginDate;
         WeekInterval = bin.Interval / 7;
     }
     EditType = "EDIT";
     Id       = id;
 }
예제 #4
0
 public BinEditVM(int id)
     : this()
 {
     using (var store = new DataStoreContext())
     {
         var bin      = store.RubbishBins.First(x => x.Id == id);
         BinType      = new BinTypeVM(bin.BinType);
         OriginDate   = bin.OriginDate;
         WeekInterval = bin.Interval / 7;
     }
     EditType = "EDIT";
     Id       = id;
 }