Пример #1
0
 private void boton_modificacion_Click(object sender, EventArgs e)
 {
     if (dgv_Roles.SelectedRows.Count > 0)
     {
         if (estado == false)
         {
             if (MessageBox.Show("El rol se encuentra inhabilitado, desea darle de alta?", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 string modo = "UPD";
                 this.Hide();
                 ABMRol02 formABMRol02 = new ABMRol02(modo, dgv_Roles_Id);
                 formABMRol02.ShowDialog();
                 this.Show();
                 this.buscar();
                 this.refrescarGrid();
             }
         }
         else
         {
             string modo = "UPD";
             this.Hide();
             ABMRol02 formABMRol02 = new ABMRol02(modo, dgv_Roles_Id);
             formABMRol02.ShowDialog();
             this.Show();
             this.buscar();
             this.refrescarGrid();
         }
     }
     else
     {
         MessageBox.Show("Debe seleccionar un rol de la grilla", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
        private void boton_alta_Click(object sender, EventArgs e)
        {
            string modo = "INS";

            this.Hide();
            ABMRol02 formABMRol02 = new ABMRol02(modo, txt_codigo.Text);

            formABMRol02.ShowDialog();
            this.Show();
            this.buscar();
            this.refrescarGrid();
        }
Пример #3
0
 private void boton_baja_Click(object sender, EventArgs e)
 {
     if (dgv_Roles.SelectedRows.Count > 0 && estado == true)
     {
         string modo = "DLT";
         this.Hide();
         ABMRol02 formABMRol02 = new ABMRol02(modo, dgv_Roles_Id);
         formABMRol02.ShowDialog();
         this.Show();
         this.buscar();
         this.refrescarGrid();
     }
     else
     {
         MessageBox.Show("Por favor, seleccione un rol que se encuentre habilitado de la grilla", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }