Exemplo n.º 1
0
        public IActionResult ViewCongNhan(string Id)
        {
            StoreContext context = HttpContext.RequestServices.GetService(typeof(ontapck.Models.StoreContext)) as StoreContext;
            congnhan     cn      = context.ViewCongNhan(Id);

            ViewData.Model = cn;
            return(View());
        }
Exemplo n.º 2
0
        public IActionResult UpdateCongNhan(congnhan kh)
        {
            int          count;
            StoreContext context = HttpContext.RequestServices.GetService(typeof(ontapck.Models.StoreContext)) as StoreContext;

            count = context.UpdateCongNhan(kh);
            if (count > 0)
            {
                ViewData["thongbao"] = "Update thành công";
            }
            else
            {
                ViewData["thongbao"] = "Update không thành công";
            }
            return(View());
        }