Beispiel #1
0
 public bool UpdateWhereExtendido(string WhereEx, EncuestaAliNutEntityUpdate EntityUpdate)
 {
     try
     {
         return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Beispiel #2
0
 public bool UpdateFromInfo(EncuestaAliNutEntityKey EntityKey, EncuestaAliNutEntityInfo EntityInfo)
 {
     try
     {
         EncuestaAliNutEntityUpdate EntityUpdate = new EncuestaAliNutEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Beispiel #3
0
 public bool Update(EncuestaAliNutEntityKey EntityKey, EncuestaAliNutEntityUpdate EntityUpdate)
 {
     try
     {
         if (!EntityKey.Validate())
         {
             return(false);
         }
         return(this.CreateDataAccess().Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Beispiel #4
0
        public bool UpdateWhereExtendido(string WhereEx, EncuestaAliNutEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("EncuestaAliNut_UpdateWhereExtendido");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx);
                    this.DataBase.AddInParameter(storedProcCommand, "Cantidad", DbType.Decimal, (object)EntityUpdate.Cantidad);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #5
0
        public bool Update(EncuestaAliNutEntityKey EntityKey, EncuestaAliNutEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("EncuestaAliNut_UpdateOptionalFields");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "EncuestaNro", DbType.Int32, (object)EntityKey.EncuestaNro);
                    this.DataBase.AddInParameter(storedProcCommand, "AlimentoId", DbType.Int32, (object)EntityKey.AlimentoId);
                    this.DataBase.AddInParameter(storedProcCommand, "NutrienteId", DbType.Int32, (object)EntityKey.NutrienteId);
                    this.DataBase.AddInParameter(storedProcCommand, "Cantidad", DbType.Decimal, (object)EntityUpdate.Cantidad);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }