Beispiel #1
0
        public Order Get(int id)
        {
            var order = _orderDAL.Get(id);

            if (order != null)
            {
                order.Customer = _customerDAL.Get(order.CustomerID);
                order.Employee = _employeeDAL.Get(order.EmployeeID);
            }

            return(order);
        }
        private IResult CheckFindexScoreByCustomer(int customerId, int carId)
        {
            var car = _carDAL.Get(c => c.Id == carId);

            var customer = _customerDAL.Get(c => c.Id == customerId);

            var carScore      = car.MinFindexScore;
            var customerScore = customer.FindexScore;

            if (customerScore >= carScore)
            {
                return(new SuccessResult());
            }
            return(new ErrorResult(Messages.NotEnough));
        }
Beispiel #3
0
 public Customer Get(Guid id)
 {
     return(customerDAL.Get(id));
 }
 public IDataResult <NCustomer> GetById(int customerid)
 {
     return(new SuccessDataResult <NCustomer>(_iCustomerDal.Get(c => c.CustomerId == customerid)));
 }
Beispiel #5
0
 /// <summary>
 ///bổ sung khách hàng
 /// </summary>
 /// <param name="customerID"></param>
 /// <returns></returns>
 public static Customer GetCustomer(int customerID)
 {
     return CustomerDB.Get(customerID);
 }
Beispiel #6
0
 public static Customer GetCustomer(int CustomerID)
 {
     return(CustomerDB.Get(CustomerID));
 }
Beispiel #7
0
 public IDataResult <Customer> GetById(int id)
 {
     return(new SuccessDataResult <Customer>(_customerDAL.Get(c => c.Id == id)));
 }
 public IDataResult <Customer> GetById(int customerId)
 {
     return(new SuccessDataResult <Customer>(_customerDAL.Get(u => u.Id == customerId)));
 }
 public IDataResult <Customer> GetByCustomerId(int CustomerId)
 {
     return(new SuccessDataResult <Customer>(_customerDal.Get(customer => customer.CustomerId == CustomerId)));
 }
Beispiel #10
0
 public IDataResult <Customer> GetById(int id)
 {
     return(new SuccessDataResult <Customer>(_iCustomerDal.Get(c => c.Id == id), Messages.GetById));
 }
Beispiel #11
0
 public static Customer GetCustomer(string customerID)
 {
     return(CustomerDB.Get(customerID));
 }
 public IDataResult <Customer> GetById(string id)
 {
     return(new SuccessDataResult <Customer>(_customerDAL.Get(c => c.CustomerID == id)));
 }
Beispiel #13
0
 /// <summary>
 /// Lấy thông tin 1 khách hàng
 /// </summary>
 /// <param name="customerId"></param>
 /// <returns></returns>
 public static Customer GetCustomer(int customerId)
 {
     return(CustomerDB.Get(customerId));
 }
Beispiel #14
0
 public Customers Get(int ID)
 {
     return(_CustomerDAL.Get(x => x.ID == ID));
 }