private void Button1Click(object sender, RoutedEventArgs e)
 {
     PopDialog dialog = PopDialogCreater.CreateDialog("Warehouse");
     dialog.ShowDialog();
     Warehouse = dialog.SelectedItem as Warehouse;
     if (Warehouse != null)
     {
         FDVM.WarehouseId = Warehouse.Id;
         FDVM.WarehouseName = Warehouse.Name;
     }
 }
示例#2
0
     private void FixupWarehouse(Warehouse previousValue, bool skipKeys = false)
     {
         if (IsDeserializing)
         {
             return;
         }
 
         if (previousValue != null && previousValue.QuotaBrandRels.Contains(this))
         {
             previousValue.QuotaBrandRels.Remove(this);
         }
 
         if (Warehouse != null)
         {
             if (!Warehouse.QuotaBrandRels.Contains(this))
             {
                 Warehouse.QuotaBrandRels.Add(this);
             }
 
             WarehouseId = Warehouse.Id;
         }
         else if (!skipKeys)
         {
             WarehouseId = null;
         }
 
         if (ChangeTracker.ChangeTrackingEnabled)
         {
             if (ChangeTracker.OriginalValues.ContainsKey("Warehouse")
                 && (ChangeTracker.OriginalValues["Warehouse"] == Warehouse))
             {
                 ChangeTracker.OriginalValues.Remove("Warehouse");
             }
             else
             {
                 ChangeTracker.RecordOriginalValue("Warehouse", previousValue);
             }
             if (Warehouse != null && !Warehouse.ChangeTracker.ChangeTrackingEnabled)
             {
                 Warehouse.StartTracking();
             }
         }
     }
示例#3
0
        protected override void Create()
        {
            var wh = new Warehouse
                         {
                             Name = Name,
                             FullName = FullName,
                             PostCode = PostCode,
                             Address = Address,
                             Description = Description,
                             ContactPerson = ContactPerson,
                             Fax = Fax,
                             Phone = Phone,
                             CurrencyId = CurrencyId
                         };

            using (var warehouseService = SvcClientManager.GetSvcClient<WarehouseServiceClient>(SvcType.WarehouseSvc))
            {
                warehouseService.AddNewWarehouse(wh,AddStorageFeeRules,CurrentUser.Id);
            }
        }