예제 #1
0
        public ActionResult DeleteSave(int id)
        {
            Data dt = new Data();

            dt.Id = id;
            db.Delete(dt);
            return(RedirectToAction("index"));
        }
예제 #2
0
 public ActionResult DeleteSave(FormCollection collection)
 {
     try
     {
         long id = Convert.ToInt64(collection["Id"]);
         phones.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
예제 #3
0
        public ActionResult DeleteSave(string record_id)
        {
            try
            {
                // TODO: Add delete logic here
                recordRepository.Delete(int.Parse(record_id));

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
예제 #4
0
 public void Delete(int id)
 {
     phoneDictionary.Delete(id);
 }
예제 #5
0
 public ActionResult DeleteSave(Phone phone)
 {
     phoneDictionary.Delete(phone.Id);
     return(RedirectToAction("Index"));
 }