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; }
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); } }
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); } }