public ShipmentInstruction UpdateObject(ShipmentInstruction shipmentinstruction)
 {
     if (!isValid(_validator.VUpdateObject(shipmentinstruction, this)))
     {
         shipmentinstruction = _repository.UpdateObject(shipmentinstruction);
     }
     return(shipmentinstruction);
 }
 public ShipmentInstruction CreateObject(ShipmentInstruction shipmentinstruction)
 {
     shipmentinstruction.Errors = new Dictionary <String, String>();
     if (!isValid(_validator.VCreateObject(shipmentinstruction, this)))
     {
         shipmentinstruction = _repository.CreateObject(shipmentinstruction);
     }
     return(shipmentinstruction);
 }
        public ShipmentInstruction CreateUpdateObject(ShipmentInstruction shipmentinstruction)
        {
            ShipmentInstruction newshipmentinstruction = this.GetObjectByShipmentOrderId(shipmentinstruction.ShipmentOrderId);

            if (newshipmentinstruction == null)
            {
                shipmentinstruction = this.CreateObject(shipmentinstruction);
            }
            else
            {
                shipmentinstruction = this.UpdateObject(shipmentinstruction);
            }
            return(shipmentinstruction);
        }
Exemplo n.º 4
0
        public bool isValid(ShipmentInstruction obj)
        {
            bool isValid = !obj.Errors.Any();

            return(isValid);
        }
Exemplo n.º 5
0
 public ShipmentInstruction VUpdateObject(ShipmentInstruction shipmentInstruction, IShipmentInstructionService _shipmentInstructionService)
 {
     return(shipmentInstruction);
 }
 public ShipmentInstruction SoftDeleteObject(ShipmentInstruction shipmentinstruction)
 {
     shipmentinstruction = _repository.SoftDeleteObject(shipmentinstruction);
     return(shipmentinstruction);
 }