Esempio n. 1
0
        private void buttonUpdate_Click(object sender, EventArgs e)
        {
      
            ABM_de_Cliente.UpdateGuest frm = new UpdateGuest();

            frm.textBoxId.Text = this.dataGridViewResults.CurrentRow.Cells[0].Value.ToString();
            frm.textBoxName.Text = this.dataGridViewResults.CurrentRow.Cells[1].Value.ToString();
            frm.textBoxLastname.Text = this.dataGridViewResults.CurrentRow.Cells[2].Value.ToString();

            frm.comboBoxDocType.Text = this.dataGridViewResults.CurrentRow.Cells[3].Value.ToString();

            frm.textBoxDocNumber.Text = this.dataGridViewResults.CurrentRow.Cells[4].Value.ToString();
            frm.textBoxEmail.Text = this.dataGridViewResults.CurrentRow.Cells[5].Value.ToString();
            frm.textBoxPhone.Text = this.dataGridViewResults.CurrentRow.Cells[6].Value.ToString();

            // falta pasar la fecha frm.dtPickerBirhtDate.

            frm.textBoxStreet.Text = this.dataGridViewResults.CurrentRow.Cells[8].Value.ToString();
            frm.textBoxStreetNum.Text = this.dataGridViewResults.CurrentRow.Cells[9].Value.ToString();
            frm.textBoxFloor.Text = this.dataGridViewResults.CurrentRow.Cells[10].Value.ToString();
            frm.textBoxDept.Text = this.dataGridViewResults.CurrentRow.Cells[11].Value.ToString();
            frm.comboBoxNationality.Text = this.dataGridViewResults.CurrentRow.Cells[12].Value.ToString();

            

            if (this.dataGridViewResults.CurrentRow.Cells[12].Value.ToString() == Convert.ToString(1))
            {
                frm.checkBoxEnabled.Enabled = true;
            }
            else {
                frm.checkBoxEnabled.Enabled = false;
            }

            
            frm.ShowDialog();
            this.Hide();

        }
Esempio n. 2
0
        private void buttonUpdate_Click(object sender, EventArgs e)
        {
            ABM_de_Cliente.UpdateGuest frm = new UpdateGuest();

            frm.textBoxId.Text       = this.dataGridViewResults.CurrentRow.Cells[0].Value.ToString();
            frm.textBoxName.Text     = this.dataGridViewResults.CurrentRow.Cells[1].Value.ToString();
            frm.textBoxLastname.Text = this.dataGridViewResults.CurrentRow.Cells[2].Value.ToString();

            frm.comboBoxDocType.Text = this.dataGridViewResults.CurrentRow.Cells[3].Value.ToString();

            frm.textBoxDocNumber.Text = this.dataGridViewResults.CurrentRow.Cells[4].Value.ToString();
            frm.textBoxEmail.Text     = this.dataGridViewResults.CurrentRow.Cells[5].Value.ToString();
            frm.textBoxPhone.Text     = this.dataGridViewResults.CurrentRow.Cells[6].Value.ToString();

            // falta pasar la fecha frm.dtPickerBirhtDate.

            frm.textBoxStreet.Text       = this.dataGridViewResults.CurrentRow.Cells[8].Value.ToString();
            frm.textBoxStreetNum.Text    = this.dataGridViewResults.CurrentRow.Cells[9].Value.ToString();
            frm.textBoxFloor.Text        = this.dataGridViewResults.CurrentRow.Cells[10].Value.ToString();
            frm.textBoxDept.Text         = this.dataGridViewResults.CurrentRow.Cells[11].Value.ToString();
            frm.comboBoxNationality.Text = this.dataGridViewResults.CurrentRow.Cells[12].Value.ToString();



            if (this.dataGridViewResults.CurrentRow.Cells[12].Value.ToString() == Convert.ToString(1))
            {
                frm.checkBoxEnabled.Enabled = true;
            }
            else
            {
                frm.checkBoxEnabled.Enabled = false;
            }


            frm.ShowDialog();
            this.Hide();
        }