コード例 #1
0
ファイル: Cost.cs プロジェクト: T1Easyware/Soheil
     private void FixupPartWarehouse(PartWarehouse previousValue)
     {
         if (previousValue != null && ReferenceEquals(previousValue.Cost, this))
         {
             previousValue.Cost = null;
         }
 
         if (PartWarehouse != null)
         {
             PartWarehouse.Cost = this;
         }
     }
コード例 #2
0
ファイル: PartWarehouseVM.cs プロジェクト: T1Easyware/Soheil
 public override void Save(object param)
 {
     if (!IsReadOnly)
         OriginalQuantity = Quantity;
     PartWarehouseDataService.AttachModel(_model,SelectedGroupVM.Id);
     _model = PartWarehouseDataService.GetSingle(_model.Id);
     OnPropertyChanged("ModifiedBy");
     OnPropertyChanged("ModifiedDate");
     OnPropertyChanged("IsReadOnly");
     OnPropertyChanged("UnitCost");
 }
コード例 #3
0
ファイル: PartWarehouseVM.cs プロジェクト: T1Easyware/Soheil
 /// <summary>
 /// Initializes a new instance of the <see cref="PartWarehouseVM"/> class from the model.
 /// </summary>
 /// <param name="entity">The model.</param>
 /// <param name="groupItems">The group view models.</param>
 /// <param name="access"></param>
 /// <param name="dataService"></param>
 /// <param name="groupDataService"></param>
 /// <param name="costDataService"></param>
 public PartWarehouseVM(PartWarehouse entity, ListCollectionView groupItems, AccessType access, PartWarehouseDataService dataService, PartWarehouseGroupDataService groupDataService, CostDataService costDataService)
     : base(access)
 {
     InitializeData(dataService, groupDataService, costDataService);
     _model = entity;
     Groups = groupItems;
     foreach (PartWarehouseGroupVM groupVm in groupItems)
     {
         if (groupVm.Id == entity.PartWarehouseGroup.Id)
         {
             SelectedGroupVM = groupVm;
             break;
         }
     }
 }
コード例 #4
0
ファイル: PartWarehouseVM.cs プロジェクト: T1Easyware/Soheil
 /// <summary>
 /// Initializes a new instance of the <see cref="PartWarehouseVM"/> class.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="access"></param>
 /// <param name="dataService"></param>
 /// <param name="groupDataService"></param>
 /// <param name="costDataService"></param>
 public PartWarehouseVM(PartWarehouse entity, AccessType access, PartWarehouseDataService dataService, PartWarehouseGroupDataService groupDataService, CostDataService costDataService)
     : base(access)
 {
     _model = entity;
     InitializeData(dataService, groupDataService, costDataService);
     Groups = new ListCollectionView(new ObservableCollection<PartWarehouseGroupVM>());
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StationInfoVM"/> class from the model.
 /// </summary>
 /// <param name="entity">The model.</param>
 public PartWarehouseInfoVM(PartWarehouse entity)
 {
     _model = entity;
 }