Esempio n. 1
0
        public LogEvent GetLogEventByGuid(Guid guid)
        {
            LogEvent logEvent = null;

            using (var sqlConn = SqlConnectionProvider.GetConnection(AppConst.RantaMaster))
            {
                var entity = logHeaderDal.GetLogByGuid(guid, sqlConn);

                logEvent = LogEventConvertor.ToModel(entity);
            }

            return(logEvent);
        }
Esempio n. 2
0
        public ActionResult Detail(string name)
        {
            Guid guid = Guid.Empty;

            if (Guid.TryParse(name, out guid))
            {
                var model = logBusiness.GetLogEventByGuid(guid);
                if (model != null)
                {
                    var viewModel = LogEventConvertor.ToViewModel(model);

                    return(View(viewModel));
                }
                else
                {
                    return(Redirect("/"));
                }
            }
            else
            {
                return(Redirect("/"));
            }
        }