public bool DeleteShippingInstruction(ShippingInstruction shippingInstruction)
 {
     if (shippingInstruction == null) return false;
     _unitOfWork.ShippingInstructionRepository.Delete(shippingInstruction);
     _unitOfWork.Save();
     return true;
 }
 public bool EditShippingInstruction(ShippingInstruction shippingInstruction)
 {
     _unitOfWork.ShippingInstructionRepository.Edit(shippingInstruction);
     _unitOfWork.Save();
     return true;
 }
        /// <summary>
        /// Gets the SI number id With create.
        /// </summary>
        /// <param name="SiNumber">The si number.</param>
        /// <returns></returns>
        public ShippingInstruction GetSINumberIdWithCreate(string SiNumber)
        {
            var instruction =
                _unitOfWork.ShippingInstructionRepository.FindBy(t => t.Value.ToUpper() == SiNumber.ToUpper()).
                    SingleOrDefault();

            if (instruction != null)
            {
                return instruction;
            }
            else
            {
                ShippingInstruction newInstruction = new ShippingInstruction()
                {
                    Value = SiNumber.ToUpperInvariant()
                };
                _unitOfWork.ShippingInstructionRepository.Add(newInstruction);
                _unitOfWork.Save();

                return newInstruction;
            }
        }