Ejemplo n.º 1
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            AdminNotif comp = MyService.GetById(id);

            MyService.Delete(comp);
            MyService.Commit();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Create(AdminNotifModel adm)
        {
            DateTime   today = DateTime.Now;
            AdminNotif comp  = new AdminNotif()
            {
                Datenotif = today,
                msg       = adm.msg,
                userid    = "1",
                username  = "******"
            };

            MyService.Add(comp);
            MyService.Commit();
            return(RedirectToAction("Index", "Claim"));
        }