예제 #1
0
        private void btnAnular_Click(object sender, EventArgs e)
        {
            try
            {
                DataGridViewRow row = this.dgBusqueda.CurrentRow;
                long            id  = Convert.ToInt64(row.Cells[0].Value);
                switch (_oAdmin.TabCodigo)
                {
                case "MEM":
                    frmMedidoresModelosCrud oFrmMedModCrud = new frmMedidoresModelosCrud(id, "B", 1);
                    //if (oFrmMedModCrud.ShowDialog() == DialogResult.OK)
                    _oFormAdmin.CargarGrilla(_oAdmin);
                    break;

                case "MED":
                    frmMedidoresCrud oFrmMedCrud = new frmMedidoresCrud(id, "B", 1);
                    //if (oFrmMedCrud.ShowDialog() == DialogResult.OK)
                    _oFormAdmin.CargarGrilla(_oAdmin);
                    break;

                case "PERB":
                    frmPersonasCrud oFrmPerCrud = new frmPersonasCrud(id, "B");
                    //if (oFrmPerCrud.ShowDialog() == DialogResult.OK)
                    _oFormAdmin.CargarGrilla(_oAdmin);
                    break;
                }
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                ManejarError Err = new ManejarError();
                Err.CargarError(ex,
                                e.ToString(),
                                ((Control)sender).Name,
                                this.FindForm().Name);
            }
        }
예제 #2
0
 private void txtFiltro_TextChanged(object sender, EventArgs e)
 {
     try
     {
         _oFormAdmin.CargarGrilla(_oAdmin);
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         ManejarError Err = new ManejarError();
         Err.CargarError(ex,
                         e.ToString(),
                         ((Control)sender).Name,
                         this.FindForm().Name);
     }
 }