Example #1
0
        public int AddLangToTrad([FromBody] objectToSend objeto)
        {
            int result;

            try
            {
                if (objeto.idIdioma != null &&
                    objeto.idTraductor != null)
                {
                    result = objtraduct.AddIdiomaToTranslator(objeto.idIdioma, objeto.idTraductor);
                }
                else
                {
                    result = -1;
                }
            }
            catch (NullReferenceException nullEx)
            {
                throw nullEx;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Example #2
0
        public int AddServiceToTrad([FromBody] objectToSend objeto)
        {
            int result;

            try
            {
                if (objeto.idServicio != null &&
                    objeto.idTraductor != null)
                {
                    result = objtraduct.AddTraductoServicio(objeto.idServicio, objeto.idTraductor);
                }
                else
                {
                    result = -1;
                }
            }
            catch (NullReferenceException nullEx)
            {
                throw nullEx;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }