Exemple #1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            frmCamposTablaEdit frm = new frmCamposTablaEdit();

            frm.CampoTabla = new Clases.clsCampoTabla(idCampo, "0");
            frm.Location   = new Point(this.Location.X + 25, this.Location.Y + frm.Height - 15);
            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //Refrecar el Objeto
                base.CargarDatos();
                foreach (ListViewItem ele in lvDatos.Items)
                {
                    if (ele.Text == frm.CampoTabla.id.ToString())
                    {
                        ele.Selected = true;
                    }
                }
                lvDatos.Select();
            }
        }
Exemple #2
0
 public override void editRecord()
 {
     base.editRecord();
     if (lvDatos.SelectedItems.Count > 0)
     {
         //Tenemos un elemento Seleccionado
         frmCamposTablaEdit frm = new frmCamposTablaEdit();
         frm.CampoTabla = new Clases.clsCampoTabla(idCampo, lvDatos.FocusedItem.Text.ToString());
         frm.Location   = new Point(this.Location.X + 25, this.Location.Y + frm.Height - 15);
         if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             //Refrecar el Objeto
             base.CargarDatos();
             foreach (ListViewItem ele in lvDatos.Items)
             {
                 if (ele.Text == frm.CampoTabla.id.ToString())
                 {
                     ele.Selected = true;
                 }
             }
             lvDatos.Select();
         }
     }
 }