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_TitleAddEdit tae = new FEmp_TitleAddEdit();

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

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

            FEmp_TitleAddEdit tae = new FEmp_TitleAddEdit();

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

            tae.Close();
            tae = null;
        }