Example #1
0
        public bool Insert(Order order)
        {
            order.Code     = Guid.NewGuid().ToString("N");
            order.CreateAt = DateTime.Now;

            var client = _clientBusiness.GetById(order.ClientId);

            if (client != null)
            {
                order.Client = client.Name;
            }

            _orderRepository.Insert(order);
            return(true);
        }
 public Client GetById(Guid key)
 {
     return(_clientBusiness.GetById(key));
 }
 public Client GetById(int id)
 {
     return(_clientBusiness.GetById(id));
 }