Exemple #1
0
        private void btn_Selecc_Click(object sender, EventArgs e)
        {
            Frm_Advertencia adv = new Frm_Advertencia();
            Frm_Filtro      fil = new Frm_Filtro();

            if (lsv_mar.SelectedIndices.Count == 0)
            {
                fil.Show();
                adv.lbl_Msm1.Text = "Selecciona una marca";
                adv.ShowDialog();
                fil.Hide();
                return;
            }
            else
            {
                var lsv = lsv_mar.SelectedItems[0];
                txtid.Text     = lsv.SubItems[0].Text;
                txtnombre.Text = lsv.SubItems[1].Text;

                this.Tag = "A";
                this.Close();
            }
        }
Exemple #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            Frm_Advertencia adv = new Frm_Advertencia();
            Frm_Filtro      fil = new Frm_Filtro();

            if (lsv_dis.SelectedIndices.Count == 0)
            {
                fil.Show();
                adv.lbl_Msm1.Text = "Seleccionar el Item para Editar";
                adv.ShowDialog();
                fil.Hide();
                return;
            }
            else
            {
                var lsv = lsv_dis.SelectedItems[0];
                txtid.Text     = lsv.SubItems[0].Text;
                txtnombre.Text = lsv.SubItems[1].Text;

                pnl_add.Visible = true;
                txtnombre.Focus();
                editar = true;
            }
        }