Exemplo n.º 1
0
        public bool UpdateWhereExtendido(string WhereEx, NutrienteEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("Nutriente_UpdateWhereExtendido");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx);
                    this.DataBase.AddInParameter(storedProcCommand, "Nombre", DbType.AnsiString, (object)EntityUpdate.Nombre);
                    this.DataBase.AddInParameter(storedProcCommand, "UDMId", DbType.AnsiString, (object)EntityUpdate.UDMId);
                    this.DataBase.AddInParameter(storedProcCommand, "PerteneceA", DbType.Int32, (object)EntityUpdate.PerteneceA);
                    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;
            }
        }
Exemplo n.º 2
0
 public bool UpdateWhereExtendido(string WhereEx, NutrienteEntityUpdate EntityUpdate)
 {
     try
     {
         return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Exemplo n.º 3
0
 public bool UpdateFromInfo(NutrienteEntityKey EntityKey, NutrienteEntityInfo EntityInfo)
 {
     try
     {
         NutrienteEntityUpdate EntityUpdate = new NutrienteEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Exemplo n.º 4
0
 public bool Update(NutrienteEntityKey EntityKey, NutrienteEntityUpdate EntityUpdate)
 {
     try
     {
         if (!EntityKey.Validate())
         {
             return(false);
         }
         return(this.CreateDataAccess().Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }