Example #1
0
        public int RegistrarCalle([FromBody] Calle objCalle)
        {
            clsCalle objClsCalle;

            Abm.CalleV objValidarCalle;

            try
            {
                objClsCalle     = new clsCalle();
                objValidarCalle = new Abm.CalleV();
                objValidarCalle = objClsCalle.ValidarCalle(objCalle.cal_nombre);

                if (objValidarCalle == null)
                {
                    objClsCalle = new clsCalle();
                    return(objClsCalle.RegistrarCalle(objCalle));
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objClsCalle     = null;
                objValidarCalle = null;
            }
        }
Example #2
0
        public string SelectCalle()
        {
            clsCalle objClsCalle;

            try
            {
                objClsCalle = new clsCalle();
                return(JsonConvert.SerializeObject(objClsCalle.ListarCalle()));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objClsCalle = null;
            }
        }
Example #3
0
        public int ActualizarCalle([FromBody] Calle objCalle)
        {
            clsCalle objClsCalle;

            try
            {
                objClsCalle = new clsCalle();
                return(objClsCalle.ActualizarCalle(objCalle));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objClsCalle = null;
            }
        }
Example #4
0
        public string SelectCallePorBarrio(string stObj)
        {
            clsCalle objClsCalle;
            JObject  Jobj;

            try
            {
                Jobj        = JObject.Parse(stObj);
                objClsCalle = new clsCalle();
                return(JsonConvert.SerializeObject(objClsCalle.ListarCallePorBarrio(Convert.ToInt32(Jobj["bar_IDBarrio"]))));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objClsCalle = null;
            }
        }