private void btnModRole_Click(object sender, EventArgs e)
        {
            FormModificationRole form = new FormModificationRole();
            form.Show();
            if (this.dataGridRole.SelectedRows.Count > 0)
            {
                int selectedRowIndex = this.dataGridRole.SelectedRows[0].Index;
                int IdRole = Convert.ToInt32(this.dataGridRole.Rows[selectedRowIndex].Cells["IdRole"].Value);
                string CodeRole = this.dataGridRole.Rows[selectedRowIndex].Cells["CodeRole"].Value.ToString();
                string DescriptionRole = this.dataGridRole.Rows[selectedRowIndex].Cells["DescriptionRole"].Value.ToString();

                form.LoadInfo(IdRole, CodeRole, DescriptionRole);
            }
            this.Close();
        }
Beispiel #2
0
        private void btnModRole_Click(object sender, EventArgs e)
        {
            FormModificationRole form = new FormModificationRole();

            form.Show();
            if (this.dataGridRole.SelectedRows.Count > 0)
            {
                int    selectedRowIndex = this.dataGridRole.SelectedRows[0].Index;
                int    IdRole           = Convert.ToInt32(this.dataGridRole.Rows[selectedRowIndex].Cells["IdRole"].Value);
                string CodeRole         = this.dataGridRole.Rows[selectedRowIndex].Cells["CodeRole"].Value.ToString();
                string DescriptionRole  = this.dataGridRole.Rows[selectedRowIndex].Cells["DescriptionRole"].Value.ToString();

                form.LoadInfo(IdRole, CodeRole, DescriptionRole);
            }
            this.Close();
        }