Beispiel #1
0
        private void MenuEmployeeManager_Click(object sender, EventArgs e)
        {
            FrmEmployee frm = FrmEmployee.GetSingleton();

            frm.MdiParent = this;
            frm.Show();
            frm.Activate();
        }
Beispiel #2
0
        private void btnEmployeeNew_Click(object sender, EventArgs e)
        {
            if (_formRole == null)
            {
                //'Take Instance Of Employee Manager For Use in ormEmployee
                var sharpEmployeeManager = ObjectFactory.WinForm.WinFormAppObjectFactory.Container.GetInstance <IEmployeeService>();
                //'Take Instance Of User Manager For Use in formUserRol
                var sharpUserManager = ObjectFactory.WinForm.WinFormAppObjectFactory.Container.GetInstance <ApplicationUserManager>();

                _formEmployee = new FrmEmployee(sharpUserManager, sharpEmployeeManager)
                {
                    MdiParent = this, StartPosition = FormStartPosition.CenterScreen
                };
                _formEmployee.FormClosed += delegate
                {
                    _formEmployee = null;
                };
                _formEmployee.Show();
            }
            else
            {
                _formEmployee.Activate();
            }
        }