public bool UpdateWhereExtendido(string WhereEx, TipoDeDietaEntityUpdate EntityUpdate)
 {
     try
     {
         return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
 public bool UpdateFromInfo(TipoDeDietaEntityKey EntityKey, TipoDeDietaEntityInfo EntityInfo)
 {
     try
     {
         TipoDeDietaEntityUpdate EntityUpdate = new TipoDeDietaEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
 public bool Update(TipoDeDietaEntityKey EntityKey, TipoDeDietaEntityUpdate EntityUpdate)
 {
     try
     {
         if (!EntityKey.Validate())
         {
             return(false);
         }
         return(this.CreateDataAccess().Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Esempio n. 4
0
        public bool UpdateWhereExtendido(string WhereEx, TipoDeDietaEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("TipoDeDieta_UpdateWhereExtendido");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx);
                    this.DataBase.AddInParameter(storedProcCommand, "TipoDeDieta", DbType.AnsiString, (object)EntityUpdate.TipoDeDieta);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 5
0
        public bool Update(TipoDeDietaEntityKey EntityKey, TipoDeDietaEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("TipoDeDieta_UpdateOptionalFields");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "TipoDeDietaId", DbType.Int32, (object)EntityKey.TipoDeDietaId);
                    this.DataBase.AddInParameter(storedProcCommand, "TipoDeDieta", DbType.AnsiString, (object)EntityUpdate.TipoDeDieta);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }