예제 #1
0
 public ActionResult Delete(int id)
 {
     try
     {
         LogsDataLogic.DeleteLogB(id);
     }
     catch (Exception e)
     {
         LogsLogic.InsertLog(new Log()
         {
             Message    = e.Message,
             StoryName  = "MoreHolidays/LogsController/Delete",
             Parameters = "id =" + id.ToString(),
             StackTrace = e.StackTrace
         });
     }
     return(RedirectToAction("Index"));
 }
예제 #2
0
 public ActionResult DeleteAllLogsWithStoryName(string storyName)
 {
     try
     {
         LogsDataLogic.DeleteLogsByStoryName(storyName);
     }
     catch (Exception e)
     {
         LogsLogic.InsertLog(new Log()
         {
             Message    = e.Message,
             StoryName  = "MoreHolidays/LogsController/DeleteAllLogsWithStoryName",
             Parameters = "storyName =" + storyName,
             StackTrace = e.StackTrace
         });
     }
     return(RedirectToAction("Index"));
 }
예제 #3
0
        // GET: Logs
        public ActionResult Index()
        {
            LogDataIndexModel logDataIndexModel;

            try
            {
                logDataIndexModel = LogsDataLogic.GetLogDataIndexModel();
            }
            catch (Exception e)
            {
                LogsLogic.InsertLog(new Log()
                {
                    Message    = e.Message,
                    StoryName  = "MoreHolidays/LogsController/Index",
                    StackTrace = e.StackTrace
                });
                logDataIndexModel = new LogDataIndexModel();
            }
            return(View(logDataIndexModel));
        }