private void button1_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <NuevoArticulo>().Count() == 1)
     {
         Application.OpenForms.OfType <NuevoArticulo>().First().Focus();
     }
     else
     {
         NuevoArticulo frm = new NuevoArticulo();
         frm.Show();
     }
 }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     createorupdate.status = "create";
     if (Application.OpenForms.OfType <NuevoArticulo>().Count() == 1)
     {
         Application.OpenForms.OfType <NuevoArticulo>().First().Focus();
     }
     else
     {
         NuevoArticulo frm = new NuevoArticulo();
         frm.ShowDialog();
     }
 }
示例#3
0
        private void button9_Click(object sender, EventArgs e)
        {
            int rowIndex = dataGridView1.CurrentCell.RowIndex;

            createorupdate.itemid = dataGridView1.Rows[rowIndex].Cells[0].Value.ToString();

            createorupdate.status = "update";
            if (Application.OpenForms.OfType <NuevoArticulo>().Count() == 1)
            {
                Application.OpenForms.OfType <NuevoArticulo>().First().Focus();
            }
            else
            {
                NuevoArticulo frm = new NuevoArticulo();
                frm.ShowDialog();
            }
        }