Esempio n. 1
0
 private void buttonNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         cFMEM110010 Catalogo = new cFMEM110010();
         AddOwnedForm(Catalogo);
         Catalogo.FormBorderStyle = FormBorderStyle.None;
         Catalogo.TopLevel        = false;
         Catalogo.Dock            = DockStyle.Fill;
         this.Controls.Add(Catalogo);
         this.Tag = Catalogo;
         Catalogo.BringToFront();
         Catalogo.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(String.Format("buttonNuevo_Click: {0}", ex), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
 private void buttonEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (dataGridViewDataEmpleado.RowCount > 0)
         {
             IdRowSelect = dataGridViewDataEmpleado.CurrentRow.Index;
             if (IdRowSelect >= 0)
             {
                 cFMEM110010 Catalogo = new cFMEM110010
                 {
                     IdEmployee = Int32.Parse(dataGridViewDataEmpleado.Rows[IdRowSelect].Cells["Id"].Value.ToString())
                 };
                 AddOwnedForm(Catalogo);
                 Catalogo.FormBorderStyle = FormBorderStyle.None;
                 Catalogo.TopLevel        = false;
                 Catalogo.Dock            = DockStyle.Fill;
                 this.Controls.Add(Catalogo);
                 this.Tag = Catalogo;
                 Catalogo.BringToFront();
                 Catalogo.Show();
             }
             else
             {
                 MessageBox.Show("No tiene Seleccionado un Empleado", "INFORMACIÓN", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
         else
         {
             cFAT100010 Alert = new cFAT100010("Información", "No hay datos", MessageBoxIcon.Information);
             Alert.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(String.Format("buttonEditar_Click: {0}", ex), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }