Example #1
0
 public StorageModel(CaculateLibrary.StorageModule.Storage model)
 {
     this.ID          = model.ID;
     this.Code        = model.Code;
     this.Area        = model.Area;
     this.UserAccount = model.UserAccount;
     this.UserName    = model.UserName;
     this.Capacity    = model.Capacity;
     this.FreeSpace   = model.FreeSpace;
 }
Example #2
0
 void IEditableObject.EndEdit()
 {
     if (this.ID == Guid.Empty)
     {
         this.ID       = Guid.NewGuid();
         this.Capacity = 42;
         CaculateLibrary.StorageModule.Storage target = new CaculateLibrary.StorageModule.Storage(this.ID, this.Code, this.FreeSpace, this.UserName, this.UserAccount, this.Capacity, this.Area);
         CaculateLibrary.StorageModule.AddStorage(new CaculateLibrary.StorageModule.Storage[] { target }, ConfigManager.StorageFileName);
     }
 }
Example #3
0
 void IEditableObject.EndEdit()
 {
     if (this.ID ==Guid.Empty)
     {
         this.ID=Guid.NewGuid();
         this.Capacity = 42;
         CaculateLibrary.StorageModule.Storage target = new CaculateLibrary.StorageModule.Storage(this.ID, this.Code, this.FreeSpace, this.UserName, this.UserAccount, this.Capacity, this.Area);
         CaculateLibrary.StorageModule.AddStorage(new CaculateLibrary.StorageModule.Storage[] { target }, ConfigManager.StorageFileName);
     }
 }