예제 #1
0
 public NewPart_ViewModel(SQLConnectionLib.Parts changablePart, bool changable)
 {
     modifiable       = changable;
     modifiablePart   = changablePart;
     partName         = changablePart.partName;
     partManufacturer = changablePart.partManufacturer;
     partIDNumber     = changablePart.partIDNumber;
     partPrice        = changablePart.partPrice;
     partQuantity     = changablePart.partQuantity;
     mustOrder        = changablePart.mustOrder;
     requestModify    = true;
 }
예제 #2
0
 public NewPart_ViewModel(SQLConnectionLib.Parts changablePart, bool changable)
 {
     modifiable = changable;
     modifiablePart = changablePart;
     partName = changablePart.partName;
     partManufacturer = changablePart.partManufacturer;
     partIDNumber = changablePart.partIDNumber;
     partPrice = changablePart.partPrice;
     partQuantity = changablePart.partQuantity;
     mustOrder = changablePart.mustOrder;
     requestModify = true;
 }
예제 #3
0
        void addPartExecute()
        {
            SQLConnectionLib.Parts p = new SQLConnectionLib.Parts();

            p.partName         = partName;
            p.partQuantity     = partQuantity;
            p.partPrice        = partPrice;
            p.partManufacturer = partManufacturer;
            p.partIDNumber     = partIDNumber;
            p.mustOrder        = mustOrder;
            if (requestModify)
            {
                p.partID = modifiablePart.partID;
                AppMessages.PartModified.Send(p);
            }
            else
            {
                AppMessages.PartAdded.Send(p);
            }
        }
예제 #4
0
        void addPartExecute()
        {
            SQLConnectionLib.Parts p = new SQLConnectionLib.Parts();

            p.partName = partName;
            p.partQuantity = partQuantity;
            p.partPrice = partPrice;
            p.partManufacturer = partManufacturer;
            p.partIDNumber = partIDNumber;
            p.mustOrder = mustOrder;
            if (requestModify)
            {
                p.partID = modifiablePart.partID;
                AppMessages.PartModified.Send(p);
            }
            else
            {
                AppMessages.PartAdded.Send(p);
            }
        }