Example #1
0
        protected override void lvwItems_DoubleClick(object sender, EventArgs e)
        {
            base.lvwItems_DoubleClick(sender, e);

            int tmpID = Convert.ToInt32(lvwItems.SelectedItems[0].Text);

            if (base.mbIsSelect == true)
            {
                if (OnItemSelected != null)
                {
                    OnItemSelected(tmpID);
                }

                this.Close();
            }
            else
            {
                FEmp_AddEdit eae = new FEmp_AddEdit();

                eae.OnNewItem += new NewItemCreated(EditChange);
                eae.LoadByID(tmpID);
                eae.ShowDialog();
                eae.OnNewItem -= new NewItemCreated(EditChange);

                eae.Close();
            }
        }
Example #2
0
        protected override void bttNew_Click(object sender, EventArgs e)
        {
            base.bttNew_Click(sender, e);

            FEmp_AddEdit eae = new FEmp_AddEdit();

            eae.OnNewItem += new NewItemCreated(EditChange);
            eae.ShowDialog();
            eae.OnNewItem -= new NewItemCreated(EditChange);

            eae.Close();
        }