Exemplo n.º 1
0
        private void SetInitialSetting()
        {
            if (ApplicationControl != null)
            {
                var expression = new DataExpression(ApplicationControl);
                txtLoginUserCode.MaxLength   = ApplicationControl.LoginUserCodeLength;
                txtLoginUserCode.PaddingChar = expression.LoginUserCodePaddingChar;
                txtLoginUserCode.Format      = expression.LoginUserCodeFormatString;

                txtFromCustomerCode.Format      = expression.CustomerCodeFormatString;
                txtFromCustomerCode.MaxLength   = expression.CustomerCodeLength;
                txtFromCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
                txtFromCustomerCode.ImeMode     = expression.CustomerCodeImeMode();


                txtToCustomerCode.Format      = expression.CustomerCodeFormatString;
                txtToCustomerCode.MaxLength   = expression.CustomerCodeLength;
                txtToCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
                txtToCustomerCode.ImeMode     = expression.CustomerCodeImeMode();

                SetVisible();
            }

            Settings.SetCheckBoxValue <PF0401>(Login, cbxCustomer);
        }
        private void SetInitialSetting()
        {
            if (ApplicationControl != null)
            {
                var expression = new DataExpression(ApplicationControl);

                txtFromCustomerCode.Format      = expression.CustomerCodeFormatString;
                txtFromCustomerCode.MaxLength   = expression.CustomerCodeLength;
                txtFromCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
                txtFromCustomerCode.ImeMode     = expression.CustomerCodeImeMode();

                txtToCustomerCode.Format      = expression.CustomerCodeFormatString;
                txtToCustomerCode.MaxLength   = expression.CustomerCodeLength;
                txtToCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
                txtToCustomerCode.ImeMode     = expression.CustomerCodeImeMode();

                if (UseForeignCurrency)
                {
                    lblCurrency.Visible     = true;
                    txtCurrencyCode.Visible = true;
                    btnCurrency.Visible     = true;
                }
            }

            Settings.SetCheckBoxValue <PF0401>(Login, cbxCustomer);

            this.ActiveControl = datOutputAtFrom;
            datOutputAtFrom.Focus();
        }
Exemplo n.º 3
0
 private void SetDataFormat()
 {
     if (ApplicationControl != null)
     {
         var expression = new DataExpression(ApplicationControl);
         txtCustomerCodeFrom.Format        = expression.CustomerCodeFormatString;
         txtCustomerCodeFrom.MaxLength     = expression.CustomerCodeLength;
         txtCustomerCodeFrom.ImeMode       = expression.CustomerCodeImeMode();
         txtCustomerCodeFrom.PaddingChar   = expression.CustomerCodePaddingChar;
         txtCustomerCodeTo.Format          = expression.CustomerCodeFormatString;
         txtCustomerCodeTo.MaxLength       = expression.CustomerCodeLength;
         txtCustomerCodeTo.ImeMode         = expression.CustomerCodeImeMode();
         txtCustomerCodeTo.PaddingChar     = expression.CustomerCodePaddingChar;
         txtDepartmentCodeFrom.Format      = expression.DepartmentCodeFormatString;
         txtDepartmentCodeFrom.MaxLength   = expression.DepartmentCodeLength;
         txtDepartmentCodeFrom.PaddingChar = expression.DepartmentCodePaddingChar;
         txtDepartmentCodeTo.Format        = expression.DepartmentCodeFormatString;
         txtDepartmentCodeTo.MaxLength     = expression.DepartmentCodeLength;
         txtDepartmentCodeTo.PaddingChar   = expression.DepartmentCodePaddingChar;
         txtStaffCodeFrom.Format           = expression.StaffCodeFormatString;
         txtStaffCodeFrom.MaxLength        = expression.StaffCodeLength;
         txtStaffCodeFrom.PaddingChar      = expression.StaffCodePaddingChar;
         txtStaffCodeTo.Format             = expression.StaffCodeFormatString;
         txtStaffCodeTo.MaxLength          = expression.StaffCodeLength;
         txtStaffCodeTo.PaddingChar        = expression.StaffCodePaddingChar;
     }
     Settings.SetCheckBoxValue <PF0601>(Login, cbxCustomer);
     Settings.SetCheckBoxValue <PF0601>(Login, cbxDepartment);
     Settings.SetCheckBoxValue <PF0601>(Login, cbxStaff);
 }
Exemplo n.º 4
0
        /// <summary>Set Initial Control</summary>
        private void SetApplicationSetting()
        {
            var expression = new DataExpression(ApplicationControl);

            txtCustomerCode.Format      = expression.CustomerCodeFormatString;
            txtCustomerCode.ImeMode     = expression.CustomerCodeImeMode();
            txtCustomerCode.MaxLength   = expression.CustomerCodeLength;
            txtCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;

            pnlSection.Visible = UseSection;

            if (!UseForeignCurrency)
            {
                lblLength.Hide();
                nmbLength.Hide();
                btnIncrease.Hide();
                btnDecrease.Hide();
            }

            if (ColorContext != null)
            {
                MatchingGridBillingBackColor = ColorContext.MatchingGridBillingBackColor;
                GridLineColor = ColorContext.GridLineColor;
            }
            nmbLength.Value = Settings.RestoreControlValue <PE0701, decimal>(Login, nmbLength.Name) ?? 2M;
            FormatNumber    = Convert.ToInt32(nmbLength.Value);
        }
Exemplo n.º 5
0
        /// <summary>Initialize Control format, length ...</summary>
        private void IntitializeControlFormat()
        {
            var expression = new DataExpression(ApplicationControl);

            txtCustomerCodeFrom.Format      = expression.CustomerCodeFormatString;
            txtCustomerCodeFrom.MaxLength   = expression.CustomerCodeLength;
            txtCustomerCodeFrom.ImeMode     = expression.CustomerCodeImeMode();
            txtCustomerCodeFrom.PaddingChar = expression.CustomerCodePaddingChar;

            txtCustomerCodeTo.Format      = expression.CustomerCodeFormatString;
            txtCustomerCodeTo.MaxLength   = expression.CustomerCodeLength;
            txtCustomerCodeTo.ImeMode     = expression.CustomerCodeImeMode();
            txtCustomerCodeTo.PaddingChar = expression.CustomerCodePaddingChar;

            txtDepartmentCodeFrom.Format      = expression.DepartmentCodeFormatString;
            txtDepartmentCodeFrom.MaxLength   = expression.DepartmentCodeLength;
            txtDepartmentCodeFrom.PaddingChar = expression.DepartmentCodePaddingChar;

            txtDepartmentCodeTo.Format      = expression.DepartmentCodeFormatString;
            txtDepartmentCodeTo.MaxLength   = expression.DepartmentCodeLength;
            txtDepartmentCodeTo.PaddingChar = expression.DepartmentCodePaddingChar;

            txtStaffCodeFrom.Format      = expression.StaffCodeFormatString;
            txtStaffCodeFrom.MaxLength   = expression.StaffCodeLength;
            txtStaffCodeFrom.PaddingChar = expression.StaffCodePaddingChar;

            txtStaffCodeTo.Format      = expression.StaffCodeFormatString;
            txtStaffCodeTo.MaxLength   = expression.StaffCodeLength;
            txtStaffCodeTo.PaddingChar = expression.StaffCodePaddingChar;

            if (ApplicationControl.UseForeignCurrency == 0)
            {
                lblCurrencyCode.Hide();
                txtCurrencyCode.Hide();
                btnCurrencyCodeSearch.Hide();
            }

            if (ApplicationControl.UseReceiptSection == 0)
            {
                cbxUseSectionFilter.Hide();
            }

            Settings.SetCheckBoxValue <PC0501>(Login, cbxCustomerCode);
            Settings.SetCheckBoxValue <PC0501>(Login, cbxDepartmentCode);
            Settings.SetCheckBoxValue <PC0501>(Login, cbxUseSectionFilter);
            Settings.SetCheckBoxValue <PC0501>(Login, cbxStaffCode);
        }
Exemplo n.º 6
0
        private void SetFormat()
        {
            var expression = new DataExpression(ApplicationControl);

            txtCustomerCodeFrom.Format        = expression.CustomerCodeFormatString;
            txtCustomerCodeFrom.MaxLength     = expression.CustomerCodeLength;
            txtCustomerCodeFrom.ImeMode       = expression.CustomerCodeImeMode();
            txtCustomerCodeTo.Format          = expression.CustomerCodeFormatString;
            txtCustomerCodeTo.MaxLength       = expression.CustomerCodeLength;
            txtCustomerCodeTo.ImeMode         = expression.CustomerCodeImeMode();
            txtParentCustomerCode.Format      = expression.CustomerCodeFormatString;
            txtParentCustomerCode.MaxLength   = expression.CustomerCodeLength;
            txtParentCustomerCode.ImeMode     = expression.CustomerCodeImeMode();
            txtParentCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
            txtCustomerCodeFrom.PaddingChar   = expression.CustomerCodePaddingChar;
            txtCustomerCodeTo.PaddingChar     = expression.CustomerCodePaddingChar;
        }
Exemplo n.º 7
0
        private void InitializeTextBoxFormat()
        {
            Expression = new DataExpression(ApplicationControl);
            txtCustomerCode.MaxLength   = Expression.CustomerCodeLength;
            txtCustomerCode.Format      = Expression.CustomerCodeFormatString;
            txtCustomerCode.PaddingChar = Expression.CustomerCodePaddingChar;
            txtCustomerCode.ImeMode     = Expression.CustomerCodeImeMode();

            txtDestinationCode.MaxLength   = 2;
            txtDestinationCode.Format      = "9";
            txtDestinationCode.PaddingChar = '0';
        }
        private void PE0115_Load(object sender, EventArgs e)
        {
            SetScreenName();
            ProgressDialog.Start(ParentForm, Task.WhenAll(
                                     LoadCompanyAsync(),
                                     LoadApplicationControlAsync(),
                                     LoadControlColorAsync()), false, SessionKey);

            var expression = new DataExpression(ApplicationControl);

            txtCustomerCode.MaxLength   = expression.CustomerCodeLength;
            txtCustomerCode.Format      = expression.CustomerCodeFormatString;
            txtCustomerCode.ImeMode     = expression.CustomerCodeImeMode();
            txtCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;
        }
        private void SetFormatData()
        {
            try
            {
                var expression = new DataExpression(ApplicationControl);
                txtCustomerCode.MaxLength   = expression.CustomerCodeLength;
                txtCustomerCode.Format      = expression.CustomerCodeFormatString;
                txtCustomerCode.ImeMode     = expression.CustomerCodeImeMode();
                txtCustomerCode.PaddingChar = expression.CustomerCodePaddingChar;

                txtCustomerCode.Text = CustomerCode;
                txtCustomerCode.Focus();

                CustomerCodeValidated(txtCustomerCode, EventArgs.Empty);
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.ToString());
                NLogHandler.WriteErrorLog(this, ex, SessionKey);
            }
        }
Exemplo n.º 10
0
        private void SetFormat()
        {
            if (ApplicationControl == null)
            {
                return;
            }
            var expression = new DataExpression(ApplicationControl);

            // 外貨利用を問わず 140 固定
            txtPayerName.MaxLength = 140;
            var format      = IsCustomer ? expression.CustomerCodeFormatString : "9";
            var length      = IsCustomer ? expression.CustomerCodeLength : 2;
            var ime         = IsCustomer ? expression.CustomerCodeImeMode() : ImeMode.Disable;
            var paddingChar = format == "9" ? (char?)'0' : null;

            txtCustomerCodeFrom.Format      = format;
            txtCustomerCodeTo.Format        = format;
            txtCustomerCodeFrom.MaxLength   = length;
            txtCustomerCodeTo.MaxLength     = length;
            txtCustomerCodeFrom.ImeMode     = ime;
            txtCustomerCodeTo.ImeMode       = ime;
            txtCustomerCodeFrom.PaddingChar = paddingChar;
            txtCustomerCodeTo.PaddingChar   = paddingChar;
        }
Exemplo n.º 11
0
        private void PE0103_Load(object sender, EventArgs e)
        {
            try
            {
                SetScreenName();
                datBilledAtFrom.Focus();
                datBilledAtFrom.Clear();
                datBilledAtTo.Clear();
                datDueAtFrom.Value = DueAtFrom;
                datDueAtTo.Value   = DueAtTo;
                datSalesAtFrom.Clear();
                datSalesAtTo.Clear();
                datUpdateAtFrom.Clear();
                datUpdateAtTo.Clear();
                cmbAmountType.SelectedIndex = 0;
                datBilledAtFrom.Focus();
                var loadTask = new List <Task>();
                if (Company == null)
                {
                    loadTask.Add(LoadCompanyAsync());
                }
                if (ApplicationControl == null)
                {
                    loadTask.Add(LoadApplicationControlAsync());
                }
                loadTask.Add(LoadControlColorAsync());
                loadTask.Add(LoadLeagalPersonarities());
                loadTask.Add(LoadColumnNameSettingAsync());
                SuspendLayout();
                ResumeLayout();
                InitializeDepartmentSelection();
                loadTask.Add(LoadBillingCategoryCombo());
                ProgressDialog.Start(ParentForm, Task.WhenAll(loadTask), false, SessionKey);
                SetComboForInputType();
                if (ApplicationControl != null)
                {
                    var expression = new DataExpression(ApplicationControl);
                    txtCusCodeFrom.Format        = expression.CustomerCodeFormatString;
                    txtCusCodeFrom.MaxLength     = expression.CustomerCodeLength;
                    txtCusCodeFrom.ImeMode       = expression.CustomerCodeImeMode();
                    txtCusCodeFrom.PaddingChar   = expression.CustomerCodePaddingChar;
                    txtCusCodeTo.Format          = expression.CustomerCodeFormatString;
                    txtCusCodeTo.MaxLength       = expression.CustomerCodeLength;
                    txtCusCodeTo.ImeMode         = expression.CustomerCodeImeMode();
                    txtCusCodeTo.PaddingChar     = expression.CustomerCodePaddingChar;
                    txtDepCodeFrom.Format        = expression.DepartmentCodeFormatString;
                    txtDepCodeFrom.MaxLength     = expression.DepartmentCodeLength;
                    txtDepCodeFrom.PaddingChar   = expression.DepartmentCodePaddingChar;
                    txtDepCodeTo.Format          = expression.DepartmentCodeFormatString;
                    txtDepCodeTo.MaxLength       = expression.DepartmentCodeLength;
                    txtDepCodeTo.PaddingChar     = expression.DepartmentCodePaddingChar;
                    txtStaffCodeFrom.Format      = expression.StaffCodeFormatString;
                    txtStaffCodeFrom.MaxLength   = expression.StaffCodeLength;
                    txtStaffCodeFrom.PaddingChar = expression.StaffCodePaddingChar;
                    txtStaffCodeTo.Format        = expression.StaffCodeFormatString;
                    txtStaffCodeTo.MaxLength     = expression.StaffCodeLength;
                    txtStaffCodeTo.PaddingChar   = expression.StaffCodePaddingChar;
                    txtUpdateBy.Format           = expression.LoginUserCodeFormatString;
                    txtUpdateBy.MaxLength        = expression.LoginUserCodeLength;
                    txtUpdateBy.PaddingChar      = expression.LoginUserCodePaddingChar;
                }
                var format = UseForeignCurrency
                    ? "###,###,###,##0.00000"
                    : "###,###,###,##0";
                nmbAmountFrom.DisplayFields.AddRange(format, "", "", "-", "");
                nmbAmountTo.DisplayFields.AddRange(format, "", "", "-", "");

                Settings.SetCheckBoxValue <PE0103>(Login, cbxCusCode);
                Settings.SetCheckBoxValue <PE0103>(Login, cbxDeCode);
                Settings.SetCheckBoxValue <PE0103>(Login, cbxInvoiceCode);
                Settings.SetCheckBoxValue <PE0103>(Login, cbxStaffCode);
                Settings.SetCheckBoxValue <PE0103>(Login, cbxAmountType);
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.ToString());
                NLogHandler.WriteErrorLog(this, ex, SessionKey);
            }
        }
Exemplo n.º 12
0
        private void PE0104_Load(object sender, EventArgs e)
        {
            try
            {
                SetScreenName();
                cmbAmountType.SelectedIndex = 0;
                cmbInputKubun.SelectedIndex = 0;
                datNyuukinFrom.Clear();
                datNyuukinFrom.Value = RecordedAtFrom;
                datNyuukinTo.Value   = RecordedAtTo;
                datUpdateAtFrom.Clear();
                datUpdateAtTo.Clear();
                var tasks = new List <Task>();
                if (Company == null)
                {
                    tasks.Add(LoadCompanyAsync());
                }
                if (ApplicationControl == null)
                {
                    tasks.Add(LoadApplicationControlAsync());
                }
                tasks.Add(LoadControlColorAsync());
                tasks.Add(LoadNyuukinCategoryCombo());
                tasks.Add(LoadColumnNameSettingAsync());
                tasks.Add(LoadLegalPersonalitiesAsync());
                ProgressDialog.Start(ParentForm, Task.WhenAll(tasks), false, SessionKey);
                if (ApplicationControl != null)
                {
                    var expression = new DataExpression(ApplicationControl);
                    txtCusCodeFrom.Format      = expression.CustomerCodeFormatString;
                    txtCusCodeFrom.MaxLength   = expression.CustomerCodeLength;
                    txtCusCodeFrom.ImeMode     = expression.CustomerCodeImeMode();
                    txtCusCodeFrom.PaddingChar = expression.CustomerCodePaddingChar;
                    txtCusCodeTo.Format        = expression.CustomerCodeFormatString;
                    txtCusCodeTo.MaxLength     = expression.CustomerCodeLength;
                    txtCusCodeTo.ImeMode       = expression.CustomerCodeImeMode();
                    txtCusCodeTo.PaddingChar   = expression.CustomerCodePaddingChar;
                    txtSecCodeFrom.Format      = expression.SectionCodeFormatString;
                    txtSecCodeFrom.MaxLength   = expression.SectionCodeLength;
                    txtSecCodeFrom.PaddingChar = expression.SectionCodePaddingChar;
                    txtSecCodeTo.Format        = expression.SectionCodeFormatString;
                    txtSecCodeTo.MaxLength     = expression.SectionCodeLength;
                    txtSecCodeTo.PaddingChar   = expression.SectionCodePaddingChar;
                    txtUpdatedBy.Format        = expression.LoginUserCodeFormatString;
                    txtUpdatedBy.MaxLength     = expression.LoginUserCodeLength;
                    txtUpdatedBy.PaddingChar   = expression.LoginUserCodePaddingChar;
                }
                pnlSection.Visible = UseSection;
                var format = UseForeignCurrency
                    ? "###,###,###,##0.00000"
                    : "###,###,###,##0";
                nmbAmountFrom.DisplayFields.AddRange(format, "", "", "-", "");
                nmbAmountTo.DisplayFields.AddRange(format, "", "", "-", "");
                InitializeSectionSelection();
                Settings.SetCheckBoxValue <PE0104>(Login, cbxCusCode);
                Settings.SetCheckBoxValue <PE0104>(Login, cbxSecCode);

                txtPayerCodePrefix.PaddingChar = '0';
                txtPayerCodesuffix.PaddingChar = '0';
                datNyuukinFrom.Select();
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.ToString());
                NLogHandler.WriteErrorLog(this, ex, SessionKey);
            }
        }