Esempio n. 1
0
 public bool UpdateWhereExtendido(string WhereEx, UnidadMedidaEntityUpdate EntityUpdate)
 {
     try
     {
         return(this.CreateDataAccess().UpdateWhereExtendido(WhereEx, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Esempio n. 2
0
 public bool UpdateFromInfo(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityInfo EntityInfo)
 {
     try
     {
         UnidadMedidaEntityUpdate EntityUpdate = new UnidadMedidaEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Esempio n. 3
0
 public bool Update(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityUpdate EntityUpdate)
 {
     try
     {
         if (!EntityKey.Validate())
         {
             return(false);
         }
         return(this.CreateDataAccess().Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
        public bool UpdateWhereExtendido(string WhereEx, UnidadMedidaEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("UnidadMedida_UpdateWhereExtendido");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)WhereEx);
                    this.DataBase.AddInParameter(storedProcCommand, "Nombre", DbType.AnsiString, (object)EntityUpdate.Nombre);
                    return(Convert.ToBoolean(this.DataBase.ExecuteNonQuery(storedProcCommand)));
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public bool Update(UnidadMedidaEntityKey EntityKey, UnidadMedidaEntityUpdate EntityUpdate)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("UnidadMedida_UpdateOptionalFields");

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