Esempio n. 1
0
        public ActionResult Create(Arrear model)
        {
            try
            {
                db.Arrears.Add(model);
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Esempio n. 2
0
        public ActionResult Delete(int id, Arrear model)
        {
            try
            {
                var veresiyee = db.Arrears.Where(i => i.Arrearıd == id).SingleOrDefault();
                db.Arrears.Remove(veresiyee);
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }