Exemplo n.º 1
0
        private void barMainEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (e.Item.Tag != null)
            {
                string    strMenuName = e.Item.Tag.ToString();
                WsToolBar oToolButton = AppEnum.GetToolBarEnum(strMenuName);
                switch (oToolButton)
                {
                case WsToolBar.Enter:
                    this.mbllPopUpResult = true;
                    this.pmEnterForm();
                    break;

                case WsToolBar.Exit:
                    //this.DialogResult = DialogResult.Cancel;
                    this.mbllPopUpResult = false;
                    this.Hide();
                    break;

                case WsToolBar.Refresh:
                    this.pmRefreshBrowView();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void barMainEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (e.Item.Tag != null)
            {
                string    strMenuName = e.Item.Tag.ToString();
                WsToolBar oToolButton = AppEnum.GetToolBarEnum(strMenuName);
                switch (oToolButton)
                {
                case WsToolBar.Print:
                    this.pmPrintData();
                    break;

                case WsToolBar.Save:
                    this.pmSaveData();
                    break;

                case WsToolBar.Exit:
                    this.Close();
                    break;
                }
            }
        }
Exemplo n.º 3
0
        private void barMainEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (e.Item.Tag != null)
            {
                string    strMenuName = e.Item.Tag.ToString();
                WsToolBar oToolButton = AppEnum.GetToolBarEnum(strMenuName);
                switch (oToolButton)
                {
                case WsToolBar.Enter:
                    this.pmEnterForm();
                    break;

                case WsToolBar.Insert:
                    if (App.PermissionManager.CheckPermission(TASKNAME, AuthenType.CanInsert, App.AppUserName, App.AppUserID))
                    {
                        this.mFormEditMode = UIHelper.AppFormState.Insert;
                        this.pmLoadEditPage();
                    }
                    else
                    {
                        MessageBox.Show("äÁèÁÕÊÔ·¸Ôì㹡ÒÃà¾ÔèÁ¢éÍÁÙÅ !", "Application Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    break;

                case WsToolBar.Update:
                    if (App.PermissionManager.CheckPermission(TASKNAME, AuthenType.CanEdit, App.AppUserName, App.AppUserID))
                    {
                        this.mFormEditMode = UIHelper.AppFormState.Edit;
                        this.pmLoadEditPage();
                    }
                    else
                    {
                        MessageBox.Show("äÁèÁÕÊÔ·¸Ôì㹡ÒÃá¡é䢢éÍÁÙÅ !", "Application Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    break;

                case WsToolBar.Delete:
                    if (App.PermissionManager.CheckPermission(TASKNAME, AuthenType.CanDelete, App.AppUserName, App.AppUserID))
                    {
                        this.pmDeleteData();
                    }
                    else
                    {
                        MessageBox.Show("äÁèÁÕÊÔ·¸Ôì㹡ÒÃź¢éÍÁÙÅ !", "Application Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    break;

                case WsToolBar.Search:
                    this.pmSearchData();
                    break;

                case WsToolBar.Undo:
                    if (MessageBox.Show("¡àÅÔ¡¡ÒÃá¡éä¢ ?", "Application confirm message", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        this.pmGotoBrowPage();
                    }
                    break;

                case WsToolBar.Save:
                    this.pmSaveData();
                    break;

                case WsToolBar.Refresh:
                    this.pmRefreshBrowView();
                    break;
                }
            }
        }