public ActionResult Index(string Search, int page = 1, int pageSize = 2)
        {
            var model = new ProductBillDao().listAllPaging(Search, page, pageSize);

            ViewBag.Search = Search;

            return(View(model));
        }
        public JsonResult changeStatus(int id)
        {
            var result = new ProductBillDao().changeStatus(id);

            return(Json(new
            {
                stutus = result
            }));
        }
        // GET: Admin/Home
        public ActionResult Index(string Search, int page = 1, int pageSize = 4)
        {
            var model = new ProductBillDao().listAllPaging(Search, page, pageSize);

            ViewBag.Search = Search;
            ProductDao   product = new ProductDao();
            OrderBillDao o       = new OrderBillDao();

            ViewBag.countIDP = product.countID();
            ViewBag.countIDO = o.countID();
            return(View(model));
        }
        // GET: ProductBill
        public ActionResult Index(int page = 1, int pageSize = 5)
        {
            int cusID = 0;

            if (Session[commonConst.user_client] != null)
            {
                userLogin a = Session[commonConst.user_client] as userLogin;
                cusID = a.userID;
            }
            var dao   = new ProductBillDao();
            var model = dao.GetOrderHistories(cusID, page, pageSize);

            //ViewBag.Search = Search;
            return(View(model));
        }
 public ActionResult Edit(m_product_bill acc)
 {
     if (ModelState.IsValid)
     {
         var dao    = new ProductBillDao();
         var result = dao.update(acc);
         if (result)
         {
             setAleart("Sửa tài khoản thành công !", "Success");
             return(RedirectToAction("Index", "Account"));
         }
         else
         {
             ModelState.AddModelError("", "Cập nhập không thành công");
         }
     }
     return(View());
 }
Esempio n. 6
0
 public ActionResult Create(m_product_bill user)
 {
     if (ModelState.IsValid)
     {
         var  dao = new ProductBillDao();
         long id  = dao.Insert(user);
         if (id > 0)
         {
             setAleart("Thêm tài khoản thành công !", "Success");
             return(RedirectToAction("Index", "ProductBill"));
         }
         else
         {
             ModelState.AddModelError("", "Thêm user khong thành công");
         }
     }
     return(View());
 }
        public ActionResult DetailBill(int id)
        {
            ViewBag.ShipName    = new ProductBillDao().getNameBill(id);
            ViewBag.CreateDate  = new ProductBillDao().getCreateBill(id);
            ViewBag.PhoneBill   = new ProductBillDao().getPhoneBill(id);
            ViewBag.AddressBill = new ProductBillDao().getAddressBill(id);
            ViewBag.EmailBill   = new ProductBillDao().getEmailBill(id);
            ViewBag.IdBill      = new ProductBillDao().getIdBill(id);
            bool b = new ProductBillDao().getStatusBill(id);

            if (b)
            {
                ViewBag.StatusBill = "Đã giao hàng vào ngày " + DateTime.Now;
            }
            else
            {
                ViewBag.StatusBill = "Chưa giao hàng";
            }
            return(View());
        }
        public ActionResult Edit(int id)
        {
            var user = new ProductBillDao().viewDetail(id);

            return(View(user));
        }
Esempio n. 9
0
        public ActionResult getAll()
        {
            var getAll = new ProductBillDao().getAll();

            return(View(getAll));
        }