Exemplo n.º 1
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            if (selectedRow != null)
            {
                bool habil = false;
                if (selectedRow.Cells[9].Value.ToString() == "1")
                {
                    habil = true;
                }

                cargado = new Cliente(
                    int.Parse(selectedRow.Cells[0].Value.ToString()),          //ID
                    selectedRow.Cells[2].Value.ToString(),                     //NOMBRE
                    selectedRow.Cells[3].Value.ToString(),                     //APELLIDO
                    long.Parse(selectedRow.Cells[1].Value.ToString()),         //DNI
                    DateTime.Parse(selectedRow.Cells[4].Value.ToString()),     //FECHA NACIMIENTO
                    selectedRow.Cells[6].Value.ToString(),                     //DIRECCION
                    selectedRow.Cells[7].Value.ToString(),                     //CODIGO POSTAL
                    selectedRow.Cells[5].Value.ToString(),                     //MAIL
                    selectedRow.Cells[8].Value.ToString(),                     //TELEFONO
                    habil);                                                    //HABILITADO
                this.Enabled = false;
                NuevoClienteForm frm = new NuevoClienteForm(cargado, this);
                frm.Show();
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            NuevoClienteForm frm = new NuevoClienteForm(this);

            frm.Show();
        }