Exemple #1
0
        public ActionResult Index()
        {
            ViewBag.Sources = _SourceRep.GetAll();
            try
            {
                if (Request["date"] != null)
                {
                    if (Request["source"] != null && Int32.Parse(Request["source"]) != 0)
                    {
                        return(View(_rep.GetByDateAndSource(Int32.Parse(Request["source"]), DateTime.Parse(Request["date"]))));
                    }
                    else
                    {
                        return(View(_rep.GetByDate(DateTime.Parse(Request["date"]))));
                    }
                }
            }
            catch (Exception e)
            {
            }

            return(View(_rep.GetAll()));
        }