public WSR_Result DeleteTopic(string idtopic) { object data = null; WSR_Result result = null; if (result == null) { TopicDb db = new TopicDb(); data = db.DeleteTopic(Convert.ToInt32(idtopic)); return(new WSR_Result(data, true)); } else { return(result); } }
public WSR_Result GetTopicsByUser(string iduser) { object data = null; WSR_Result result = null; if (result == null) { TopicDb db = new TopicDb(); data = db.GetTopicByUser(Convert.ToInt32(iduser)); return(new WSR_Result(data, true)); } else { return(result); } }
public WSR_Result GetTopics() { object data = null; WSR_Result result = null; if (result == null) { TopicDb db = new TopicDb(); data = db.GetAll(); return(new WSR_Result(data, true)); } else { return(result); } }
public WSR_Result SaveTopic(WSR_Param param) { TopicDTO topic = null; object data = null; WSR_Result result = null; result = VerifParamType(param, "save", out topic); if (result == null) { topic = (TopicDTO)param["save"]; TopicDb db = new TopicDb(); db.SaveTopic(ref topic); data = topic; return(new WSR_Result(data, true)); } else { return(result); } }