Exemplo n.º 1
0
        public IEnumerable<MCQuestionDAO> GetMCQuestions()
        {
            MCQuestionServiceClient client = new MCQuestionServiceClient();

            try
            {
                IEnumerable<MCQuestionDAO> result = client.GetMCQuestions();
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Exemplo n.º 2
0
        public bool PostMCQuestion(MCQuestionDAO mCQuestion)
        {
            MCQuestionServiceClient client = new MCQuestionServiceClient();

            try
            {
                bool result = client.CreateMCQuestion(mCQuestion);
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Exemplo n.º 3
0
        public MCQuestionDAO GetMCQuestion(int id)
        {
            MCQuestionServiceClient client = new MCQuestionServiceClient();

            try
            {
                MCQuestionDAO result = client.GetMCQuestionByID(id);
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }