示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            PasarDatos psd = new PasarDatos();

            psd.ID  = dataGridView1.CurrentRow.Cells[0].Value.ToString().Trim();
            psd.RUC = dataGridView1.CurrentRow.Cells[1].Value.ToString().Trim();
            if (dataGridView1.CurrentRow.Cells[2].Value.ToString() == "")
            {
                psd.Nombre        = dataGridView1.CurrentRow.Cells[3].Value.ToString().Trim();
                psd.TipoProveedor = "Natural";
            }
            else
            {
                psd.Nombre        = dataGridView1.CurrentRow.Cells[2].Value.ToString().Trim();
                psd.TipoProveedor = "Empresa";
            }
            psd.Telefono  = dataGridView1.CurrentRow.Cells[4].Value.ToString().Trim();
            psd.Correo    = dataGridView1.CurrentRow.Cells[5].Value.ToString().Trim();
            psd.Direccion = dataGridView1.CurrentRow.Cells[6].Value.ToString().Trim();
            psd.Fecha     = dataGridView1.CurrentRow.Cells[7].Value.ToString().Trim();


            EditarProveedor edt = new EditarProveedor(psd.ID, psd.RUC, psd.Nombre, psd.Telefono, psd.Correo, psd.Direccion, psd.Fecha, psd.TipoProveedor);

            edt.Show();
        }
示例#2
0
        public void rol()
        {
            conexion cs = new conexion();

            SqlCommand scc = new SqlCommand("seleccionarRol", cs.cd);

            scc.CommandType = CommandType.StoredProcedure;
            scc.Parameters.AddWithValue("@user", txtUser.Text);
            scc.Parameters.AddWithValue("@pass", txtPass.Text);
            scc.ExecuteNonQuery();

            SqlDataReader di;

            di = scc.ExecuteReader();
            int i = 0;

            string[] Rol;


            while (di.Read())
            {
                MessageBox.Show(di["rol"].ToString());
                label4.Text = di["rol"].ToString();
            }

            string     Rol1 = label4.Text;
            PasarDatos psd  = new PasarDatos();

            psd.Rol = Rol1;


            di.Close();

            Thread.Sleep(3000);
        }
示例#3
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            PasarDatos psd = new PasarDatos();

            string entrar = dateTimePicker1.Value.ToString("yyyy-MM-dd");
            string salir  = dateTimePicker2.Value.ToString("yyyy-MM-dd");

            ReporteFactura rpf = new ReporteFactura(entrar, salir);

            rpf.Show();
        }