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