void InventarioAlmacenToolStripMenuItemClick(object sender, EventArgs e) { Document document = new Document(PageSize.LETTER); PdfWriter.GetInstance(document, new FileStream("Administradores.pdf", FileMode.OpenOrCreate)); document.Open(); LoginMySql mostrar = new LoginMySql(); MySqlDataReader reader = mostrar.mostrarAdministradores(); document.AddAuthor("Eduardo y Oscar"); document.AddCreator("Punto de venta Carniceria"); document.Add(new Paragraph("Administradores")); while (reader.Read()) { string nombre = reader.GetValue(0).ToString(); string password = reader.GetValue(1).ToString(); string sueldo = reader.GetValue(2).ToString(); string direccion = reader.GetValue(3).ToString(); string telefono = reader.GetValue(4).ToString(); document.Add(new Paragraph(nombre + " - " + password + " - " + sueldo + " - " + direccion + " - " + telefono)); } System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "C:\\Users\\Cheyenne\\Desktop\\Proyecto\\puntodeventa\\bin\\Debug\\Administradores.pdf"; proc.Start(); proc.Close(); document.Close(); }
public void Datos() { LoginMySql mostrar = new LoginMySql(); MySqlDataReader reader = mostrar.mostrarAdministradores(); this.dataGridView1.Rows.Clear(); while(reader.Read()) { LoginMySql image = new LoginMySql(); Image imagen = image.mostrarImagenUsuario(reader.GetValue(0).ToString()); this.dataGridView1.Rows.Add(reader.GetValue(0), reader.GetValue(1), reader.GetValue(2), reader.GetValue(3),reader.GetValue(4), imagen); } }
public void Datos() { LoginMySql mostrar = new LoginMySql(); MySqlDataReader reader = mostrar.mostrarAdministradores(); this.dataGridView1.Rows.Clear(); while (reader.Read()) { LoginMySql image = new LoginMySql(); Image imagen = image.mostrarImagenUsuario(reader.GetValue(0).ToString()); this.dataGridView1.Rows.Add(reader.GetValue(0), reader.GetValue(1), reader.GetValue(2), reader.GetValue(3), reader.GetValue(4), imagen); } }
void InventarioAlmacenToolStripMenuItemClick(object sender, EventArgs e) { Document document = new Document(PageSize.LETTER); PdfWriter.GetInstance(document, new FileStream("Administradores.pdf", FileMode.OpenOrCreate)); document.Open(); LoginMySql mostrar = new LoginMySql(); MySqlDataReader reader = mostrar.mostrarAdministradores(); document.AddAuthor("Eduardo y Oscar"); document.AddCreator("Punto de venta Carniceria"); document.Add(new Paragraph("Administradores")); while(reader.Read()) { string nombre = reader.GetValue(0).ToString(); string password = reader.GetValue(1).ToString(); string sueldo = reader.GetValue(2).ToString(); string direccion = reader.GetValue(3).ToString(); string telefono = reader.GetValue(4).ToString(); document.Add(new Paragraph(nombre + " - " + password + " - " + sueldo + " - " + direccion + " - " + telefono)); } System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "C:\\Users\\Cheyenne\\Desktop\\Proyecto\\puntodeventa\\bin\\Debug\\Administradores.pdf"; proc.Start(); proc.Close(); document.Close(); }