Beispiel #1
0
        public JsonResult SuaBaiViet(BaiViet std)
        {
            std.NgaySua = DateTime.Now;
            std.MaNV    = 1;
            string baiVietModel = new BaiVietModel().CapNhatBaiViet(std);

            return(Json(new { data = "", JsonRequestBehavior.AllowGet }));
        }
Beispiel #2
0
        public ActionResult SuaBaiViet(string MaBaiViet)
        {
            BaiVietModel baiVietModel = new BaiVietModel();
            BaiViet      baiViet      = new BaiViet();

            baiViet = baiVietModel.GetDataByMa(MaBaiViet);

            ViewBag.BaiViet = baiViet;
            return(View());
        }
Beispiel #3
0
        public ActionResult ThemMoiBaiViet(BaiViet std)
        {
            BaiVietModel baiVietModel = new BaiVietModel();
            NhanVien     nhanVien     = new NhanVienModel().GetNhanVienByEmail(Session["ADMIN_SESSION"].ToString());


            std.MaNV    = nhanVien.MaNV;
            std.NgayTao = DateTime.Now;

            baiVietModel.ThemBaiViet(std);

            return(Json(new { data = "", JsonRequestBehavior.AllowGet }));
        }
        /// <summary>
        /// Các điều hướng dành cho các trang liên quan đến Trang Bài viết
        /// Author       :   HaLTH - 24/06/2018 - create
        /// </summary>
        /// <remarks>
        /// Package      :   Home
        /// Copyright    :   Team Noname
        /// Version      :   1.0.0
        /// </remarks>
        public ActionResult ChiTietBaiViet(string BeautyId)
        {
            try
            {
                HomeData     data  = new HomeData();
                BaiVietModel model = new BaiVietModel();
                data.CacBaiViet = model.LoadBaiViet();

                return(View("BaiViet"));
            }
            catch (Exception e)
            {
                return(RedirectToAction("Error", "Error", new { area = "error", error = e.Message }));
            }
        }
Beispiel #5
0
        public ActionResult BaiViet(string MaBaiViet)
        {
            BaiViet      baiViet      = new BaiViet();
            BaiVietModel baiVietModel = new BaiVietModel();

            ViewBag.BaiViet = baiVietModel.GetDataByMa("2");
            if (MaBaiViet != null)
            {
                ViewBag.BaiViet = baiVietModel.GetDataByMa(MaBaiViet);
            }

            ViewBag.AllBaiViet = baiVietModel.GetData();


            return(View());
        }
Beispiel #6
0
        // GET: AdminBaiViet
        public ActionResult Index(int page = 1, int pagesize = 10)
        {
            List <BaiViet> bv = new BaiVietModel().GetData();

            return(View(bv.ToPagedList(page, pagesize)));
        }