Exemple #1
0
        public int AdicionarGeneral(beGerente obeGerente)
        {
            int idGerente = -1;

            using (SqlConnection con = new SqlConnection(CadenaConexion))
            {
                try
                {
                    con.Open();
                    daGerente odaGerente = new daGerente();
                    idGerente = odaGerente.AdicionarGerente(con, obeGerente);
                }
                catch (Exception ex)
                {
                    //GrabarLog(ex.Message, ex.StackTrace);
                }
            }
            return(idGerente);
        }
Exemple #2
0
        public bool ActualizarGerente(beGerente obeGerente)
        {
            bool exito = false;

            using (SqlConnection con = new SqlConnection(CadenaConexion))
            {
                try
                {
                    con.Open();
                    daGerente odaGerente = new daGerente();
                    exito = odaGerente.ActualizarGerente(con, obeGerente);
                }
                catch (Exception ex)
                {
                    //GrabarLog(ex.Message, ex.StackTrace);
                }
                return(exito);
            }
        }
Exemple #3
0
        public beDatosGerente ListarGerente()
        {
            beDatosGerente obeDatosGerente = new beDatosGerente();

            using (SqlConnection con = new SqlConnection(CadenaConexion))
            {
                try
                {
                    con.Open();
                    daGerente odaGerente = new daGerente();
                    obeDatosGerente = odaGerente.ListaGerente(con);
                }
                catch (Exception ex)
                {
                    //GrabarLog(ex.Message, ex.StackTrace);
                }
            }
            return(obeDatosGerente);
        }