예제 #1
0
        public JsonResult NewTour(string TourName, string TourSpot, string TourBody, string TourType)
        {
            var code     = DateTime.Now.ToString("ddmmmmyyHHmmss");
            var isInsert = _tourService.Insert(new Service.Model.TourDTO()
            {
                TourType = int.Parse(TourType), TourName = TourName, TourSpot = TourSpot.Replace("'", "'"), OverView = TourBody.Replace("'", "'"), TourCode = code, TourActivity = 0
            });

            if (isInsert)
            {
                return(Json(code));
            }
            else
            {
                return(Json("0"));
            }
        }