Exemple #1
0
        public ActionResult xoaGoiY(int c1, int c2)
        {
            int  id = db.GoiYs.Where(x => x.C1 == c1 && x.C2 == c2).Select(x => x.id).First();
            GoiY g  = db.GoiYs.Find(id);

            db.GoiYs.Remove(g);
            db.SaveChanges();
            return(RedirectToAction("CaTheLienQuan", new { MaCaThe = c1 }));
        }
Exemple #2
0
        public ActionResult themGoiY(int C1, int C2)
        {
            GoiY g = new GoiY();

            g.C1 = C1;
            g.C2 = C2;
            db.GoiYs.Add(g);
            db.SaveChanges();
            return(RedirectToAction("CaTheLienQuan", new { MaCaThe = C1 }));
        }