Пример #1
0
 public bool UpdateWhereExtendido(string WhereEx, TipoDeAlimentosEntityUpdate EntityUpdate)
 {
     try
     {
         return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Пример #2
0
 public bool UpdateFromInfo(TipoDeAlimentosEntityKey EntityKey, TipoDeAlimentosEntityInfo EntityInfo)
 {
     try
     {
         TipoDeAlimentosEntityUpdate EntityUpdate = new TipoDeAlimentosEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Пример #3
0
 public bool Update(TipoDeAlimentosEntityKey EntityKey, TipoDeAlimentosEntityUpdate EntityUpdate)
 {
     try
     {
         if (!EntityKey.Validate())
         {
             return(false);
         }
         return(this.CreateDataAccess().Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Пример #4
0
        public bool UpdateWhereExtendido(string WhereEx, TipoDeAlimentosEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("TipoDeAlimentos_UpdateWhereExtendido");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx);
                    this.DataBase.AddInParameter(storedProcCommand, "TipoDeAlimento", DbType.AnsiString, (object)EntityUpdate.TipoDeAlimento);
                    this.DataBase.AddInParameter(storedProcCommand, "OrdenDeVisualizacion", DbType.Int32, (object)EntityUpdate.OrdenDeVisualizacion);
                    this.DataBase.AddInParameter(storedProcCommand, "Estado", DbType.AnsiString, (object)EntityUpdate.Estado);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }