Пример #1
0
 private void btnModificar_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.dgvCheckList.SelectedRows.Count == 1)
         {
             ChechkList DatosAux = this.ObtenerDatosCheckList();
             if (!string.IsNullOrEmpty(DatosAux.IDCheckList))
             {
                 this.Visible = true;
                 frmNuevoCheckList CheckLsis = new frmNuevoCheckList(DatosAux);
                 CheckLsis.ShowDialog();
                 CheckLsis.Dispose();
                 if (CheckLsis.DialogResult == DialogResult.OK)
                 {
                     if (CheckLsis.DatosCheckList.Completado)
                     {
                         this.ModificarDatos(CheckLsis.DatosCheckList);
                     }
                 }
                 this.Visible = true;
             }
         }
         else
         {
             MessageBox.Show("Seleccione un registro.", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmCheckList ~ btnModificar_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Visible = true;
     }
 }
Пример #2
0
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         frmNuevoCheckList Check = new frmNuevoCheckList();
         Check.ShowDialog();
         Check.Dispose();
         this.Visible = true;
         if (Check.DialogResult == DialogResult.OK)
         {
             this.BusquedaCheck(Check.DatosCheckList.Titulo);
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmCheckList ~ btnNuevo_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Visible = true;
     }
 }