Exemple #1
0
        public int Sentencia(EpersonaProyecto per)
        {
            int          id  = 0;
            MySqlCommand cmd = new MySqlCommand("SentenciaPer_pro", con.con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("id", MySqlDbType.Int32).Value         = per.idpersona;
            cmd.Parameters.Add("idpersona", MySqlDbType.Int32).Value  = per.idpersona;
            cmd.Parameters.Add("idproyecto", MySqlDbType.Int32).Value = per.idproyecto;
            cmd.Parameters.Add("accion", MySqlDbType.Text).Value      = per.accion;

            try
            {
                con.Conectar();
                id = int.Parse(cmd.ExecuteScalar().ToString());
                con.Desconectar();
            }
            finally
            {
                con.Desconectar();
            }


            return(id);
        }
Exemple #2
0
        public static int Sentencia(EpersonaProyecto c)
        {
            DpersonaProyecto ca = new DpersonaProyecto();

            return(ca.Sentencia(c));
        }