Example #1
0
        private void btnCategoria_Click(object sender, EventArgs e)
        {
            FrmRegistrarCategoria C = new FrmRegistrarCategoria();

            C.Visible = true;
            Visible   = true;
        }
 private void btnCategoria_Click(object sender, EventArgs e)
 {
     if (Program.abiertosecundarias == false)
     {
         FrmRegistrarCategoria C = new FrmRegistrarCategoria();
         Program.abiertosecundarias = true;
         C.Show();
     }
 }
        private void btnCategoria_Click(object sender, EventArgs e)
        {
            //FrmRegistrarCategoria C = new FrmRegistrarCategoria();
            //C.Show();
            Form frm = Application.OpenForms.Cast <Form>().FirstOrDefault(x => x is FrmRegistrarCategoria);

            if (frm != null)
            {
                //si la instancia existe la pongo en primer plano
                frm.BringToFront();
                return;
            }
            //sino existe la instancia se crea una nueva
            frm = new FrmRegistrarCategoria();
            frm.Show();
        }
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         MessageBox.Show("La Fila no debe Estar Seleccionada.", "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         FrmRegistrarCategoria C = new FrmRegistrarCategoria();
         C.Show();
         if (dataGridView1.SelectedRows.Count > 0)
         {
             Program.Evento = 1;
         }
         else
         {
             Program.Evento = 0;
         }
         dataGridView1.ClearSelection();
     }
 }
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         FrmRegistrarCategoria C = new FrmRegistrarCategoria();
         C.IdC.Text          = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         C.txtCategoria.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
         if (dataGridView1.SelectedRows.Count > 0)
         {
             Program.Evento = 1;
         }
         else
         {
             Program.Evento = 0;
         }
         dataGridView1.ClearSelection();
         C.Show();
     }
     else
     {
         MessageBox.Show("Debe Seleccionar la Fila a Editar Datos.", "Sistema de Ventas", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Example #6
0
        private void btnCategoria_Click(object sender, EventArgs e)
        {
            FrmRegistrarCategoria C = new FrmRegistrarCategoria();

            C.Show();
        }
Example #7
0
 private void aggCat_Click(object sender, EventArgs e)
 {
     FrmRegistrarCategoria C = new FrmRegistrarCategoria();
     C.ShowDialog();
 }
        private void nuevacat_Click(object sender, EventArgs e)
        {
            FrmRegistrarCategoria c = new FrmRegistrarCategoria();

            c.Show();
        }