Ejemplo n.º 1
0
 private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView2.Columns[e.ColumnIndex].Name == "ColumnButtonUp")
     {
         string         userId = dataGridView2.Rows[e.RowIndex].Cells[0].Value.ToString();
         FormFormalUser form1  = new FormFormalUser(FormFormalUser.Permissions.Up, userId);
         form1.ShowDialog(this);
     }
 }
Ejemplo n.º 2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            switch (tabControl1.SelectedIndex)
            {
            case 0:
                FormFormalUser formFormalUser = new FormFormalUser(FormFormalUser.Permissions.Add);
                formFormalUser.ShowDialog(this);
                break;

            case 4:
                FormAdmin formAdmin = new FormAdmin(FormAdmin.Permissions.Add);
                formAdmin.ShowDialog(this);
                break;
            }
        }
Ejemplo n.º 3
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            switch (tabControl1.SelectedIndex)
            {
            case 0:
                string         userId = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
                FormFormalUser form1  = new FormFormalUser(FormFormalUser.Permissions.Edit, userId);
                form1.ShowDialog(this);
                break;

            case 4:
                string    adminId = dataGridView5.SelectedRows[0].Cells[0].Value.ToString();
                FormAdmin form2   = new FormAdmin(FormAdmin.Permissions.Edit, adminId);
                form2.ShowDialog(this);
                break;
            }
        }