Exemplo n.º 1
0
        /// <summary>
        /// 汽车信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult CusCarinfo(int id)
        {
            ////CarVO car = new CarVO();
            ICarMgm carmgm = new CarMgm();
            var     result = carmgm.GetCarsByCustID(id);
            var     car    = new CarVO();

            if (result.Count > 0)
            {
                car = result.FirstOrDefault();
            }
            car.CustomerID = id;
            return(View(car));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 客户详细信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult CustomerDetails(int id)
        {
            var result = new CustomerAndCar();

            if (id != -1)
            {
                ICustomerMgm couMgm   = new CustomerMgm();
                ICarMgm      carMgm   = new CarMgm();
                CustomerVO   customer = couMgm.GetCustomerByID(id);
                List <CarVO> car      = new List <CarVO>();
                if (customer != null)
                {
                    car    = carMgm.GetCarsByCustID(customer.CustomerID);
                    result = GetcusAndcarObj(customer, car.FirstOrDefault());
                }
            }


            return(View(result));
        }