示例#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;
 }