public void update_conexao(cConfiguracao cf) { try { #region QUERY cDAO dao = new cDAO(); cGlobal.query = "UPDATE CONEXAO_TB SET DIRETORIO = '" + cf.diretorio + "', TAMANHO = '" + cf.tamanho + "' WHERE BANCO = '" + cf.banco + "' "; dao.executa_query(cGlobal.query); #endregion } catch (Exception ex) { throw ex; } }
public DataTable conexoes() { try { #region QUERY cDAO dao = new cDAO(); cGlobal.query = "SELECT * FROM CONEXAO_TB "; using (DataTable dt = dao.retorna_datatable(cGlobal.query)) { return(dt); } #endregion } catch (Exception ex) { throw ex; } }
public DataTable arquivos(string campos) { try { #region QUERY cDAO dao = new cDAO(); cGlobal.query = string.Format("SELECT {0} FROM DIRETORIO_TB WHERE ID_SETOR = {1}", campos, cGlobal.userSetor); using (DataTable dt = dao.retorna_datatable(cGlobal.query, "cnn")) { return(dt); } #endregion } catch (Exception ex) { throw ex; } }
public void update_diretorios(cConfiguracao cf) { try { #region QUERY cDAO dao = new cDAO(); if (cf.setor.Equals("PROCESSAMENTO")) { cGlobal.query = "UPDATE DIRETORIO_TB SET " + "SAC = '" + cf.sac + "', " + "DI8 = '" + cf.di8 + "' " + "WHERE ID_SETOR = (SELECT ID_SETOR FROM SETOR_TB WHERE SETOR = '" + cf.setor + "')"; } dao.executa_query(cGlobal.query); #endregion } catch (Exception ex) { throw ex; } }
public DataTable diretorios(cConfiguracao cf) { try { #region QUERY cDAO dao = new cDAO(); if (cf.setor.Equals("PROCESSAMENTO")) { cGlobal.query = "SELECT SAC,DI8 FROM DIRETORIO_TB " + "INNER JOIN SETOR_TB ON SETOR_TB.ID_SETOR = DIRETORIO_TB.ID_SETOR " + "WHERE SETOR_TB.SETOR = '" + cf.setor + "' "; } using (DataTable dt = dao.retorna_datatable(cGlobal.query)) { return(dt); } #endregion } catch (Exception ex) { throw ex; } }