Exemplo n.º 1
0
        public ActionResult ListProductRetail()
        {
            var db     = new ProductServiceBusiness();
            var result = db.GetListProductsByType(SystemMessageConst.Key.Product_Sale);

            return(PartialView(result));
        }
Exemplo n.º 2
0
        public ActionResult ListServicesItem(int id)
        {
            ViewBag.id = id;
            var db     = new ProductServiceBusiness();
            var result = db.GetListProductsDetail(id);

            return(PartialView(result));
        }
Exemplo n.º 3
0
        public ActionResult _Chinhsua_TT_SP(int id, string tensp, string codesp, string loaisp, int unitsp, string gioithieusp, bool status = false)
        {
            var db = new ProductServiceBusiness();
            // kiểm tra quyền thêm sửa xóa của từng menu , nhớ truyền type tương ứng
            var sys = CheckActiveMenu.ReturnActive(SystemMessageConst.TypeAction.Update);

            if (sys.IsSuccess == false)
            {
                return(Json(new { result = sys }, JsonRequestBehavior.AllowGet));
            }
            var result = db.BS_Chinhsua_TT_SP(id, tensp, codesp, loaisp, unitsp, gioithieusp, status);

            return(Json(new { result }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        public ActionResult _ChinhSua_Anh_TheoSP(int id_img, int id_product, string txt_des)
        {
            var db = new ProductServiceBusiness();
            // kiểm tra quyền thêm sửa xóa của từng menu , nhớ truyền type tương ứng
            var sys = CheckActiveMenu.ReturnActive(SystemMessageConst.TypeAction.Update);

            if (sys.IsSuccess == false)
            {
                return(Json(new { result = sys }, JsonRequestBehavior.AllowGet));
            }
            var result = db.BS_ChinhSua_Anh_TheoSP(id_img, id_product, txt_des);

            return(Json(new { result }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 5
0
        public ActionResult _ThemMoi_Gia_SP(int gianhap, int giaxuat, string type_price, int id_product)
        {
            var db = new ProductServiceBusiness();
            // kiểm tra quyền thêm sửa xóa của từng menu , nhớ truyền type tương ứng
            var sys = CheckActiveMenu.ReturnActive(SystemMessageConst.TypeAction.Addnew);

            if (sys.IsSuccess == false)
            {
                return(Json(new { result = sys }, JsonRequestBehavior.AllowGet));
            }
            var result = db.BS_ThemMoi_Gia_SP(gianhap, giaxuat, type_price, id_product);

            return(Json(new { result }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 6
0
        public ActionResult _XoathongsoTheoSP(int id_config_attr = 0)
        {
            // kiểm tra quyền thêm sửa xóa của từng menu , nhớ truyền type tương ứng
            var sys = CheckActiveMenu.ReturnActive(SystemMessageConst.TypeAction.Delete);

            if (sys.IsSuccess == false)
            {
                return(Json(new { result = sys }, JsonRequestBehavior.AllowGet));
            }

            var db     = new ProductServiceBusiness();
            var result = db.BS_XoathongsoTheoSP(id_config_attr);

            return(Json(new { result }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 7
0
        public ActionResult ShowDetailProduct(int id)
        {
            ViewBag.id = id;
            var db = new ProductServiceBusiness();

            var lst_TSKT = db.Hienthithongtinchitiet_sp_thongsokt(id);

            ViewBag.lst_TSKT = lst_TSKT;

            var lst_Price = db.Hienthithongtinchitiet_sp_ds_gia(id);

            ViewBag.lst_Price = lst_Price;

            var lst_IMG = db.Hienthithongtinchitiet_sp_ds_anh(id);

            ViewBag.lst_IMG = lst_IMG;

            return(PartialView());
        }