예제 #1
0
        public ActionResult DeleteConfirmed(int ListHeaderID)
        {
            listheader listheader = ListHeaderRepository.GetListHeaderByID(ListHeaderID);

            ListHeaderRepository.DeleteRecord(listheader);
            return(RedirectToAction("Index"));
        }
예제 #2
0
        public ActionResult DeleteConfirmed(int ListTableID)
        {
            listtable listtable           = ListTableRepository.GetListByID(ListTableID);
            IEnumerable <listitem> litems = ListItemRepository.GetAllListItemByListTable(ListTableID);

            ListItemRepository.DeleteAllRecords(litems);
            listheader header = ListHeaderRepository.GetByListTableID(ListTableID);

            ListHeaderRepository.DeleteRecord(header);
            ListTableRepository.DeleteRecord(listtable);

            //return RedirectToAction("List");
            return(Content("Table deleted successfully"));
        }