Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
        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;
            }
        }