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; } }
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(""); } }
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); }
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(""); } }
public PartialViewResult GetDataTopicTour() { List <Models.TopicTour> TopicTours = new TopicTour().GetAll(); return(PartialView("GetDataLocation", TopicTours)); }