Esempio n. 1
0
        public bool ActualizarHuerta(string text1, string text2, string huertaId)
        {
            try
            {
                var updHuerta = new Entidades.tbl_Huerta
                {
                    Hue_Id          = huertaId,
                    Hue_Nombre      = text1,
                    Hue_Descripcion = text2
                };
                _db.Query <Entidades.tbl_Huerta>("UPDATE tbl_Huerta SET Hue_Nombre = ?, Hue_Descripcion = ? WHERE Hue_Id = ?", text1, text2, huertaId);

                var t = _db.Table <Entidades.tbl_Huerta>().ToList();
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
Esempio n. 2
0
        public bool CrearHuerta(string nombreHuerta, string descriocion, string IdUser, string IdEncrip)
        {
            try
            {
                var nuevaHuerta = new Entidades.tbl_Huerta
                {
                    Hue_Id          = IdEncrip,
                    Hue_Nombre      = nombreHuerta,
                    Hue_Usu_Id      = IdUser,
                    Hue_Descripcion = descriocion,
                    Hue_Baja        = "N"
                };
                _db.Insert(nuevaHuerta);
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }