public void atualiza_cadastro_setor(cSetor cst) { try { #region QUERY cGlobal.query = "UPDATE SETOR_TB SET SETOR = '" + cst.setor + "' " + "WHERE ID_SETOR = " + cst.id_setor + " "; dao.executa_query(cGlobal.query); #endregion } catch (OleDbException ex) { throw ex; } }
public void grava_setor(cSetor cst) { try { #region QUERY cGlobal.query = "INSERT INTO SETOR_TB (SETOR, USERCAD, DTCAD) " + "VALUES('" + cst.setor + "', '" + cGlobal.userlogado + "', '" + DateTime.Now + "') "; dao.executa_query(cGlobal.query); #endregion } catch (OleDbException ex) { throw ex; } }
public bool exclui_setor(cSetor cst) { try { #region QUERY cGlobal.query = "DELETE FROM SETOR_TB WHERE ID_SETOR = " + cst.id_setor + " "; dao.executa_query(cGlobal.query); return(false); #endregion } catch (OleDbException ex) { throw ex; } }