private void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo(Thread.CurrentThread.CurrentCulture.Name);
            //// SelectedDateFormat=Shortのパターン
            //Culture.DateTimeFormat.ShortDatePattern = "yyyy/MM";
            //// SelectedDateFormat=Longのパターン
            //Culture.DateTimeFormat.LongDatePattern = "ggy'年'M'月'";
            //Thread.CurrentThread.CurrentCulture = Culture;

            this.utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this.LayoutRoot);
            this.utlFKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init;

            // 処理棚卸日初期設定
            DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datYmd, ref this.datYmd);

            //if (Common.gWinGroupType == Common.geWinGroupType.InpDetailReport && this.utlFKey != null)
            //{
            //    this.utlFKey.btnF6.Content = "     F6     " + Environment.NewLine;
            //    this.utlFKey.btnF6.IsEnabled = false;
            //}
            this.utlFKey.btnF6.Content   = "     F6     " + Environment.NewLine;
            this.utlFKey.btnF6.IsEnabled = false;

            Init_SearchDisplay();
        }
        private void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            if (Common.gblnLogin == false)
            {
                return;
            }

            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            // ファンクションキー初期設定
            utlFunctionKey = ExVisualTreeHelper.GetUtlFunctionKey(this.LayoutRoot);
            utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init;
            utlFunctionKey.Init();

            // バインド設定
            SetBinding();

            //System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo(Thread.CurrentThread.CurrentCulture.Name);
            //// SelectedDateFormat=Shortのパターン
            //Culture.DateTimeFormat.ShortDatePattern = "yyyy/MM";
            //// SelectedDateFormat=Longのパターン
            //Culture.DateTimeFormat.LongDatePattern = "ggy'年'M'月'";
            //Thread.CurrentThread.CurrentCulture = Culture;

            ExBackgroundWorker.DoWork_Focus(this.utlPurchase.txtID, 100);
        }
Exemple #3
0
 private Utl_FunctionKey GetUserControlFKey()
 {
     if (utlFncKey == null)
     {
         utlFncKey = ExVisualTreeHelper.GetUtlFunctionKey(this.LayoutRoot);
     }
     return(utlFncKey);
 }
        protected override void OnKeyUp(KeyEventArgs e)
        {
            base.OnKeyUp(e);

            if (this.IsGetFKey == false)
            {
                return;
            }

            Utl_FunctionKey utlFunctionKey = null;

            switch (e.Key)
            {
            case Key.F1:
            case Key.F2:
            case Key.F3:
            case Key.F4:
            case Key.F5:
            case Key.F6:
            case Key.F7:
            case Key.F8:
            case Key.F9:
            case Key.F11:
            case Key.F12:
                utlFunctionKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
                break;
            }

            switch (e.Key)
            {
            case Key.F1: this.FunctionKey_Click(utlFunctionKey.btnF1, e); break;

            case Key.F2: this.FunctionKey_Click(utlFunctionKey.btnF2, e); break;

            case Key.F3: this.FunctionKey_Click(utlFunctionKey.btnF3, e); break;

            case Key.F4: this.FunctionKey_Click(utlFunctionKey.btnF4, e); break;

            case Key.F5: this.FunctionKey_Click(utlFunctionKey.btnF5, e); break;

            case Key.F6: this.FunctionKey_Click(utlFunctionKey.btnF6, e); break;

            case Key.F7: this.FunctionKey_Click(utlFunctionKey.btnF7, e); break;

            case Key.F8: this.FunctionKey_Click(utlFunctionKey.btnF8, e); break;

            case Key.F9: this.FunctionKey_Click(utlFunctionKey.btnF9, e); break;

            //case Key.F10: btnF10_Click(null, e); break;
            case Key.F11: this.FunctionKey_Click(utlFunctionKey.btnF11, e); break;

            case Key.F12: this.FunctionKey_Click(utlFunctionKey.btnF12, e); break;

            default: break;
            }
        }
        public static void SetFunctionKeyEnabled(string strFunctionKeyName, bool enable, DependencyObject depObj)
        {
            DependencyObject obj = ExVisualTreeHelper.FindPerentChildWindow(depObj);

            if (obj == null)
            {
                obj = ExVisualTreeHelper.FindPerentPage(depObj);
                if (obj == null)
                {
                    return;
                }
            }

            Utl_FunctionKey utlKey = null;

            foreach (Utl_FunctionKey key in FindVisualChildren <Utl_FunctionKey>(obj))
            {
                utlKey = key;
                break;
            }
            if (utlKey == null)
            {
                return;
            }

            switch (strFunctionKeyName)
            {
            case "F1": utlKey.btnF1.IsEnabled = enable; break;

            case "F2": utlKey.btnF2.IsEnabled = enable; break;

            case "F3": utlKey.btnF3.IsEnabled = enable; break;

            case "F4": utlKey.btnF4.IsEnabled = enable; break;

            case "F5": utlKey.btnF5.IsEnabled = enable; break;

            case "F6": utlKey.btnF6.IsEnabled = enable; break;

            case "F7": utlKey.btnF7.IsEnabled = enable; break;

            case "F8": utlKey.btnF8.IsEnabled = enable; break;

            case "F9": utlKey.btnF9.IsEnabled = enable; break;

            case "F11": utlKey.btnF11.IsEnabled = enable; break;

            case "F12": utlKey.btnF12.IsEnabled = enable; break;

            default: break;
            }

            return;
        }
Exemple #6
0
        private void _Init_SearchDisplay()
        {
            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            if (Common.gWinType == Common.geWinType.ListPaymentCashMonth)
            {
                lblReceiptYmd.Content = "出金年月";
                System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo(Thread.CurrentThread.CurrentCulture.Name);
                // SelectedDateFormat=Shortのパターン
                Culture.DateTimeFormat.ShortDatePattern = "yyyy/MM";
                // SelectedDateFormat=Longのパターン
                Culture.DateTimeFormat.LongDatePattern = "ggy'年'M'月'";
                Thread.CurrentThread.CurrentCulture    = Culture;
            }

            this.lst.Clear();
            this.dg.ItemsSource = null;
            this.dg.ItemsSource = lst;

            // ファンクションキー初期設定
            utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
            this.utlFKey.Init();

            this.utlReport.gPageType     = Common.gPageType;
            this.utlReport.gWinMsterType = Common.geWinMsterType.None;
            this.utlReport.parentUtl     = this;
            this.utlReport.Init();

            if (Common.gWinGroupType == Common.geWinGroupType.InpList)
            {
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datPaymentCashYmd_F, ref this.datPaymentCashYmd_T);
            }
            else
            {
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datPaymentCashYmd_F, ref this.datPaymentCashYmd_T);
            }

            if (Common.gWinGroupType != Common.geWinGroupType.InpList)
            {
                this.utlFKey.btnF6.Content   = "     F6     " + Environment.NewLine;
                this.utlFKey.btnF6.IsEnabled = false;
            }

            SetBinding();

            GetListData();
        }
Exemple #7
0
        private void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            Init();

            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            ExBackgroundWorker.DoWork_Focus(this.utlID_F.txtID, 100);
            ExBackgroundWorker.DoWork_Focus(this.utlID_F.txtID, 200);
            ExBackgroundWorker.DoWork_Focus(this.utlID_F.txtID, 300);
            ExBackgroundWorker.DoWork_Focus(this.utlID_F.txtID, 400);
            ExBackgroundWorker.DoWork_Focus(this.utlID_F.txtID, 500);

            this.utlParentFKey = this.utlFunctionKey;

            this.blClose = false;
        }
        private void _Init_SearchDisplay()
        {
            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            // 処理棚卸日初期設定
            DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datYmd, ref this.datYmd);

            //this.dgPrint.ItemsSource = null;
            this.dgUpdate.ItemsSource = null;

            // ファンクションキー初期設定
            utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
            this.utlFKey.Init();

            this.utlReport.gPageType     = Common.gPageType;
            this.utlReport.gWinMsterType = Common.geWinMsterType.None;
            this.utlReport.parentUtl     = this;
            this.utlReport.Init();

            // DataGrid設定
            this.GridDetail.Visibility       = System.Windows.Visibility.Collapsed;
            this.GridDetailUpdate.Visibility = System.Windows.Visibility.Visible;

            //switch (Common.gWinGroupType)
            //{
            //    case Common.geWinGroupType.InpListUpd:
            //        // DataGrid設定
            //        this.GridDetail.Visibility = System.Windows.Visibility.Collapsed;
            //        this.GridDetailUpdate.Visibility = System.Windows.Visibility.Visible;
            //        break;
            //    case Common.geWinGroupType.InpListReport:
            //        // DataGrid設定
            //        this.GridDetail.Visibility = System.Windows.Visibility.Collapsed;
            //        this.GridDetailUpdate.Visibility = System.Windows.Visibility.Collapsed;

            //        this.utlFKey.btnF6.Content = "     F6     " + Environment.NewLine;
            //        this.utlFKey.btnF6.IsEnabled = false;

            //        break;
            //}

            SetBinding();

            //GetListData();
        }
        public static Utl_FunctionKey GetUtlFunctionKey(DependencyObject depObj)
        {
            bool search = false;

            int cnt = 1;

            while (cnt <= 10)
            {
                System.Threading.Thread.Sleep(cnt * 100);
                cnt += 1;

                search = false;

                DependencyObject obj = ExVisualTreeHelper.FindPerentChildWindow(depObj);
                if (obj == null)
                {
                    obj = ExVisualTreeHelper.FindPerentPage(depObj);
                    if (obj != null)
                    {
                        search = true;
                    }
                }
                else
                {
                    search = true;
                }

                if (search == true)
                {
                    Utl_FunctionKey utlKey = null;
                    foreach (Utl_FunctionKey key in FindVisualChildren <Utl_FunctionKey>(obj))
                    {
                        return(key);
                    }
                }
            }

            return(null);
        }
Exemple #10
0
        private void _Init_SearchDisplay()
        {
            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            if (Common.gWinType == Common.geWinType.ListCollectPlan)
            {
                this.lblCollectPlanYmd.Content = "回収予定日";
                this.utlInvoice_F.Visibility   = System.Windows.Visibility.Visible;
                this.utlInvoice_T.Visibility   = System.Windows.Visibility.Visible;
                this.utlPurchase_F.Visibility  = System.Windows.Visibility.Collapsed;
                this.utlPurchase_T.Visibility  = System.Windows.Visibility.Collapsed;
            }
            else
            {
                this.lblCollectPlanYmd.Content = "支払予定日";
                this.utlInvoice_F.Visibility   = System.Windows.Visibility.Collapsed;
                this.utlInvoice_T.Visibility   = System.Windows.Visibility.Collapsed;
                this.utlPurchase_F.Visibility  = System.Windows.Visibility.Visible;
                this.utlPurchase_T.Visibility  = System.Windows.Visibility.Visible;
            }

            // ファンクションキー初期設定
            utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
            this.utlFKey.Init();

            // レポート初期設定
            this.utlReport.gPageType     = Common.gPageType;
            this.utlReport.gWinMsterType = Common.geWinMsterType.None;
            this.utlReport.parentUtl     = this;
            this.utlReport.Init();

            entityList          = null;
            this.dg.ItemsSource = null;
            this.dg.ItemsSource = entityList;

            switch (Common.gWinGroupType)
            {
            case Common.geWinGroupType.InpList:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datCollectPlanYmd_F, ref this.datCollectPlanYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility = System.Windows.Visibility.Visible;

                break;

            case Common.geWinGroupType.InpListReport:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datCollectPlanYmd_F, ref this.datCollectPlanYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility = System.Windows.Visibility.Collapsed;

                break;

            case Common.geWinGroupType.InpDetailReport:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datCollectPlanYmd_F, ref this.datCollectPlanYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility = System.Windows.Visibility.Visible;
                this.dg.ItemsSource        = null;
                this.dg.ItemsSource        = entityList;

                this.utlFKey.btnF6.Content   = "     F6     " + Environment.NewLine;
                this.utlFKey.btnF6.IsEnabled = false;

                break;
            }

            SetBinding();

            GetListData();
        }
        private void _Init_SearchDisplay()
        {
            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            this.lst.Clear();
            this.dg.ItemsSource = null;
            this.dg.ItemsSource = lst;

            // ファンクションキー初期設定
            utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
            this.utlFKey.Init();

            this.utlReport.gPageType     = Common.gPageType;
            this.utlReport.gWinMsterType = Common.geWinMsterType.None;
            this.utlReport.parentUtl     = this;
            this.utlReport.Init();

            switch (Common.gWinGroupType)
            {
            case Common.geWinGroupType.InpList:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datOrderYmd_F, ref this.datOrderYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility       = System.Windows.Visibility.Visible;
                this.GridDetailSelect.Visibility = System.Windows.Visibility.Collapsed;

                // 発行区分表示設定
                this.borPrint.Visibility = System.Windows.Visibility.Collapsed;

                break;

            case Common.geWinGroupType.InpListReport:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datOrderYmd_F, ref this.datOrderYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility       = System.Windows.Visibility.Collapsed;
                this.GridDetailSelect.Visibility = System.Windows.Visibility.Visible;

                // 発行区分表示設定
                this.borPrint.Visibility = System.Windows.Visibility.Visible;

                this.chkPrintNo.IsChecked  = true;
                this.chkPrintYes.IsChecked = false;

                break;

            case Common.geWinGroupType.InpDetailReport:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datOrderYmd_F, ref this.datOrderYmd_T);

                // DataGrid設定
                this.GridDetail.Visibility       = System.Windows.Visibility.Visible;
                this.GridDetailSelect.Visibility = System.Windows.Visibility.Collapsed;
                this.dg.ItemsSource = null;
                this.dg.ItemsSource = lst;

                // 発行区分表示設定
                this.borPrint.Visibility = System.Windows.Visibility.Collapsed;

                this.utlFKey.btnF6.Content   = "     F6     " + Environment.NewLine;
                this.utlFKey.btnF6.IsEnabled = false;

                break;
            }

            SetBinding();

            GetListData();
        }
        private void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            this.lst.Clear();
            this.dgSelect.ItemsSource = null;
            this.dgSelect.ItemsSource = lst;

            // ファンクションキー初期設定
            utlFKey = ExVisualTreeHelper.GetUtlFunctionKey(this);
            this.utlFKey.Init();

            this.utlReport.gPageType     = Common.gPageType;
            this.utlReport.gWinMsterType = Common.geWinMsterType.None;
            this.utlReport.parentUtl     = this;
            this.utlReport.Init();

            this.datIssueYmd.SelectedDate = DateTime.Now;
            this.chkPrintNo.IsChecked     = true;

            switch (Common.gWinGroupType)
            {
            case Common.geWinGroupType.InpList:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datPaymentCloseYmd_F, ref this.datPaymentCloseYmd_T);

                // 発行日表示設定
                this.lblIssueYmd.Visibility = System.Windows.Visibility.Collapsed;
                this.datIssueYmd.Visibility = System.Windows.Visibility.Collapsed;

                // DataGrid設定
                this.GridDetail.Visibility       = System.Windows.Visibility.Visible;
                this.GridDetailSelect.Visibility = System.Windows.Visibility.Collapsed;

                // 出金消込区分表示設定
                this.borReceipt.Visibility = System.Windows.Visibility.Visible;

                // 発行区分表示設定
                this.borPrint.Visibility = System.Windows.Visibility.Collapsed;

                break;

            case Common.geWinGroupType.InpListReport:
                // 出力対象日初期設定
                DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datPaymentCloseYmd_F, ref this.datPaymentCloseYmd_T);

                // 発行日表示設定
                this.lblIssueYmd.Visibility   = System.Windows.Visibility.Visible;
                this.datIssueYmd.Visibility   = System.Windows.Visibility.Visible;
                this.datIssueYmd.SelectedDate = DateTime.Now;

                // DataGrid設定
                this.GridDetail.Visibility       = System.Windows.Visibility.Collapsed;
                this.GridDetailSelect.Visibility = System.Windows.Visibility.Visible;

                // 出金消込区分表示設定
                this.borReceipt.Visibility = System.Windows.Visibility.Collapsed;

                // 発行区分表示設定
                this.borPrint.Visibility = System.Windows.Visibility.Visible;

                this.chkPrintNo.IsChecked  = true;
                this.chkPrintYes.IsChecked = false;

                break;
            }

            SetBinding();

            GetListData();
        }