예제 #1
0
        public ActionResult GetProducts(int id)
        {
            var model = Repair.GetProducts(UserID, Employee.ID, id);

            return(Json(new
            {
                result = true,
                html = RenderPartialViewToString("RepairProduct", model)
            }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult AddProduct(int id, int subID)
        {
            var available = ImexItem.Available(id, subID, TransactionClass.Repair);

            if (available > 0)
            {
                Repair.AddProduct(UserID, Employee.ID, Employee.BussinessID, id, subID);
            }
            var model = Repair.GetProducts(UserID, Employee.ID, subID);

            return(Json(new
            {
                result = true,
                html = RenderPartialViewToString("RepairProduct", model)
            }, JsonRequestBehavior.AllowGet));
        }