Ejemplo n.º 1
0
        public ActionResult Delete(string id)
        {
            var dao   = new HangHoaDao();
            var model = dao.GetByID(id);

            if (model != null)
            {
                dao.Delete(model);
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Edit(string id)
        {
            var dao   = new HangHoaDao();
            var model = dao.GetByID(id);

            if (model != null)
            {
                SetLoaiMH(model.MaHH);
                SetMauSac(model.MauID);
                SetNuocSanXuat(model.NuocSXID);
                SetDVT(model.DVT);
            }
            return(View(model));
        }