Exemplo n.º 1
0
        public static void ResultShowClr(ExChildWindow _win, Control _errCtl)
        {
            ExMessageBox.win    = _win;
            ExMessageBox.errCtl = _errCtl;
            Dlg_MessagBox msg = new Dlg_MessagBox("確認", "クリアします。" + "よろしいですか?", MessageBoxButtons.OkCancel, MessageBoxIcon.Question);

            msg.Closed -= ExMessageBox.dlg_ClosedClr;
            msg.Closed += ExMessageBox.dlg_ClosedClr;
            msg.Show();
        }
        public static void FoucsNextControlNoFocus(Control ctl)
        {
            ExPage page = (ExPage)ExVisualTreeHelper.FindPerentPage(ctl);

            if (page != null)
            {
                page.OnNextControl();
            }
            else
            {
                ExChildWindow _win = (ExChildWindow)ExVisualTreeHelper.FindPerentChildWindow(ctl);
                if (_win != null)
                {
                    _win.OnNextControl();
                }
            }
        }
Exemplo n.º 3
0
        public static void ResultShow(ExChildWindow _win, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            ExMessageBox.win    = _win;
            ExMessageBox.errCtl = _errCtl;
            Dlg_MessagBox msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.OkCancel, MessageBoxIcon.Question);

            msg.Closed -= ExMessageBox.dlg_Closed;
            msg.Closed += ExMessageBox.dlg_Closed;
            msg.Show();

            //return MessageBox.Show(strMsg, "確認", MessageBoxButton.OKCancel);
        }
Exemplo n.º 4
0
        private static void dlg_ClosedClr(object sender, EventArgs e)
        {
            Dlg_MessagBox msg = (Dlg_MessagBox)sender;

            msg.Closed -= ExMessageBox.dlg_ClosedClr;

            if (ExMessageBox.utl != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    utl.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    utl.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.page != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    page.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    page.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.win != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    win.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    win.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }

            ExMessageBox.utl  = null;
            ExMessageBox.page = null;
            ExMessageBox.win  = null;
        }
        private static void dlg_ClosedClr(object sender, EventArgs e)
        {
            Dlg_MessagBox msg = (Dlg_MessagBox)sender;
            msg.Closed -= ExMessageBox.dlg_ClosedClr;

            if (ExMessageBox.utl != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    utl.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    utl.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.page != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    page.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    page.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.win != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    win.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    win.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }

            ExMessageBox.utl = null;
            ExMessageBox.page = null;
            ExMessageBox.win = null;
        }
 public static void ResultShowClr(ExChildWindow _win, Control _errCtl)
 {
     ExMessageBox.win = _win;
     ExMessageBox.errCtl = _errCtl;
     Dlg_MessagBox msg = new Dlg_MessagBox("確認", "クリアします。" + "よろしいですか?", MessageBoxButtons.OkCancel, MessageBoxIcon.Question);
     msg.Closed -= ExMessageBox.dlg_ClosedClr;
     msg.Closed += ExMessageBox.dlg_ClosedClr;
     msg.Show();
 }
        public static void ResultShow(ExChildWindow _win, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg)) return;

            ExMessageBox.win = _win;
            ExMessageBox.errCtl = _errCtl;
            Dlg_MessagBox msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.OkCancel, MessageBoxIcon.Question);
            msg.Closed -= ExMessageBox.dlg_Closed;
            msg.Closed += ExMessageBox.dlg_Closed;
            msg.Show();

            //return MessageBox.Show(strMsg, "確認", MessageBoxButton.OKCancel);
        }
Exemplo n.º 8
0
        private static void _evtDataSelect(int intKbn, object objList)
        {
            Common.gstrMsgSessionError = "";

            utlDummy.evtDataSelect -= _evtDataSelect;

            EntitySysLogin entity = null;
            try
            {
                entity = (EntitySysLogin)objList;
            }
            catch
            {
                return;
            }

            switch (entity._login_flg)
            {
                case 0:     // 正常ログイン
                    // システム情報設定
                    Common.gintCompanyId = entity._company_id;
                    Common.gstrCompanyNm = entity._company_nm;
                    Common.gintGroupId = entity._group_id;
                    Common.gstrGroupNm = entity._group_nm;
                    Common.gintDefaultPersonId = entity._defult_person_id;
                    Common.gstrDefaultPersonNm = entity._defult_person_nm;
                    Common.gstrGroupDisplayNm = entity._group_display_name;
                    Common.gintEvidenceFlg = entity._evidence_flg;
                    Common.gintidFigureSlipNo = entity._idFigureSlipNo;
                    Common.gintidFigureCustomer = entity._idFigureCustomer;
                    Common.gintidFigurePurchase = entity._idFigurePurchase;
                    Common.gintidFigureCommodity = entity._idFigureGoods;
                    Common.gintEstimateApprovalFlg = entity._estimate_approval_flg;
                    Common.gintReceiptAccountInvoicePringFlg = entity._receipt_account_invoice_print_flg;
                    Common.gstrSessionString = entity._session_string;
                    Common.gintDemoFlg = entity._demo_flg;
                    Common.gstrSystemVer = entity._sys_ver;
                    Common.gblnLogin = true;

                    if (winParemt != null) winParemt.DataSelect((int)ExWebService.geWebServiceCallKbn.Login, null);

                    break;
                case 1:     // 同一ユーザーログイン
                    if (winParemt != null) winParemt.DataSelect((int)ExWebService.geWebServiceCallKbn.Login, null);

                    break;
                default:    // ログイン失敗
                    if (winParemt != null) winParemt.DataSelect((int)ExWebService.geWebServiceCallKbn.Login, "error");

                    break;
            }

            if (_main != null)
            {
                _main.SetHeaderInf();
            }

            winParemt = null;
        }
Exemplo n.º 9
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Enter:

                #region DataForm

                ExDataForm _df = (ExDataForm)ExVisualTreeHelper.FindPerentDataForm(this);
                if (_df != null)
                {
                    ExUserControl _utl = (ExUserControl)ExVisualTreeHelper.FindPerentUserControl(this);

                    #region DataForm EstimateDetail

                    Utl_DataFormEstimate utlEstimate = null;
                    try
                    {
                        utlEstimate = (Utl_DataFormEstimate)_utl;
                    }
                    catch
                    {
                    }
                    if (utlEstimate != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlEstimate.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlEstimate.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion

                    #region DataForm OrderDetail

                    Utl_DataFormOrder utlOrder = null;
                    try
                    {
                        utlOrder = (Utl_DataFormOrder)_utl;
                    }
                    catch
                    {
                    }
                    if (utlOrder != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlOrder.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlOrder.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion

                    #region DataForm SalesDetail

                    Utl_DataFormSales utlSales = null;
                    try
                    {
                        utlSales = (Utl_DataFormSales)_utl;
                    }
                    catch
                    {
                    }
                    if (utlSales != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlSales.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlSales.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion
                }

                #endregion

                #region DataGrid

                ExDataGrid _dg = (ExDataGrid)ExVisualTreeHelper.FindPerentDataGrid(this);
                if (_dg != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        //_dg.MoveBeforeCell();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        //_dg.MoveNextCell();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                #region Page

                ExPage _page = (ExPage)ExVisualTreeHelper.FindPerentPage(this);
                if (_page != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        _page.OnBeforeControl();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        _page.OnNextControl();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                #region ChildWindow

                ExChildWindow _win = (ExChildWindow)ExVisualTreeHelper.FindPerentChildWindow(this);
                if (_win != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        _win.OnBeforeControl();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        _win.OnNextControl();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                break;
            }

            base.OnKeyDown(e);
        }