Exemple #1
0
        public string DeleteTopicTour(int id = 0)
        {
            TopicTour TopicTours = new TopicTour().GetByTopicTourID(id);

            try
            {
                TopicTours.DeleteByID(TopicTours.TopicTour_ID);
                return("OK");
            }
            catch (Exception ex) { return(""); throw ex; }
        }
Exemple #2
0
        public string EditTopicTour(FormCollection fc)
        {
            TopicTour TopicTours = new TopicTour().GetByTopicTourID(Convert.ToInt32(fc["LocationID"].Trim()));

            TopicTours.TopicTour_Name        = fc["Location_Name"].Trim();
            TopicTours.TopicTour_Description = fc["Location_Description"].Trim();
            try
            {
                TopicTours.Update();
                return("OK");
            }
            catch { return(""); }
        }
Exemple #3
0
        public static string LoadTopicTour(string ListTopicTour)
        {
            string Category_arr  = "";
            var    ArrListString = ListTopicTour.Split(',');

            foreach (var item in ArrListString)
            {
                var CategoryTitle = new TopicTour().GetByTopicTourID(Convert.ToInt32(item)).TopicTour_Name;
                if (CategoryTitle != null || CategoryTitle != "")
                {
                    Category_arr += CategoryTitle + ",";
                }
            }
            Category_arr = Category_arr.Substring(0, Category_arr.Length - 1);
            return(Category_arr);
        }
Exemple #4
0
        public string AddTopicTour(string TopicTourName)
        {
            TopicTour TopicTours = new TopicTour();

            TopicTours.TopicTour_Name        = TopicTourName;
            TopicTours.TopicTour_Description = "";
            int id = TopicTours.Insert();

            if (id > 0)
            {
                return(id.ToString());
            }
            else
            {
                return("");
            }
        }
Exemple #5
0
        public PartialViewResult GetDataTopicTour()
        {
            List <Models.TopicTour> TopicTours = new TopicTour().GetAll();

            return(PartialView("GetDataLocation", TopicTours));
        }