//Modificar Compania public bool ModificarCompania(Compania compania, string codUbigeo) { try { compania.Ubigeo = UbigeoDAO.Obtener(codUbigeo); return(CompaniaDAO.Modificar(compania)); } catch (DataAccessException daex) { throw daex; } catch (Exception ex) { log.Error(ex.Message, ex); throw new BusinessLogicException("Ocurrio un error, no se pudo modificar el registro", ex); } }
//Eliminar Compania public bool EliminarCompania(int idCompania, string usuLogin) { try { Compania compania = CompaniaDAO.Obtener(idCompania); compania.Estado = false; compania.UsuLogin = usuLogin; return(CompaniaDAO.Modificar(compania)); } catch (DataAccessException daex) { throw daex; } catch (Exception ex) { log.Error(ex.Message, ex); throw new BusinessLogicException("Ocurrio un error, no se pudo eliminar el registro", ex); } }