コード例 #1
0
        public ActionResult AddEvent(string startDate, string endDate, string name, string details, string game)
        {
            //  GoogleAPI eventCreater = new GoogleAPI();
            MySQLDatabase eventGetter = new MySQLDatabase();

            DateTime start = Convert.ToDateTime(startDate);
            DateTime end   = Convert.ToDateTime(endDate);

            bool results = eventGetter.CreateEvent(start, end, name, details, game);

            if (results)
            {
                ViewBag.results = "Event Added";
            }
            else
            {
                ViewBag.results = "Something went wrong.";
            }
            return(View());
        }