Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }