Esempio n. 1
0
        private void generadatos(string pl, string en, string fech, string nom, int numnom)
        {
            con.conectar("EX");


            SqlCommand cmd = new SqlCommand("[dismo].[RH_BAC]", con.conex);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Plan", pl);
            cmd.Parameters.AddWithValue("@Envio", en);
            cmd.Parameters.AddWithValue("@fecha", fech);
            cmd.Parameters.AddWithValue("@Nomina", nom);
            cmd.Parameters.AddWithValue("@NumNomina", numnom);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(table);

            bac.Tables.Add(table);
            con.Desconectar("EX");

            exp.aExcel(bac);
        }
Esempio n. 2
0
 private void backgroundReport_DoWork(object sender, DoWorkEventArgs e)
 {
     exp.aExcel(ds);
 }