public override void SetScreenMode(eScreenMode eScreenMode)
        {
            base.SetScreenMode(eScreenMode);    // ÊÓËÃѺ㹠Base class ¨ÐÁÕ function ÊÓËÃѺ Enabled & Disabled ¡Ñº Toolbar ÍÂÙèáÅéÇ àÃÕ¡ãªéä´éàÅÂ

            // TODO : Enabled & Disabled Control µèÒ§ æ µÒÁ mode ¢Í§ Screen
            m_dlgFindUser = new FindUserDialog(new FindDialogSqlDAO(AppEnvironment.Database), true, true);

            switch (ScreenMode)
            {
            case eScreenMode.Idle:
                ControlUtil.EnabledControl(false, grpAddEdit);
                ControlUtil.ClearControlData(grpAddEdit.Controls);
                lstvMember.Items.Clear();
                break;

            case eScreenMode.View:
                ControlUtil.EnabledControl(false, grpAddEdit);
                break;

            case eScreenMode.Add:
                ControlUtil.EnabledControl(true, grpAddEdit);
                lstvMember.Items.Clear();
                break;

            case eScreenMode.Edit:
                ControlUtil.EnabledControl(true, grpAddEdit);
                break;
            }
        }
Example #2
0
        public override bool OnCommandFind()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                m_dlgFindUser = new FindUserDialog(new FindDialogSqlDAO(AppEnvironment.Database), false, false);

                if (m_dlgFindUser.ShowDialog(this) == DialogResult.OK)
                {
                    string strUserID = m_dlgFindUser.SelectedRecords[0][FindUserDialog.eColumn.Username.ToString()].ToString();
                    this.LoadingParam = strUserID;
                    this.DataLoading(strUserID);
                }
                return(true);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(this, ex);
                return(false);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }