Ejemplo n.º 1
0
        public void SetClosing()
        {
            var basicForm = BaseForm as BasicForm;

            if (basicForm == null || CompanyId == 0)
            {
                return;
            }
            var information = UtilClosing.GetClosingInformation(SessionKey, CompanyId);

            basicForm.SetClosingInformation(information);
        }
Ejemplo n.º 2
0
        private void SetClosing()
        {
            var information = UtilClosing.GetClosingInformation(ApplicationContext.Login.SessionKey,
                                                                ApplicationContext.Login.CompanyId);

            if (information.UseClosing)
            {
                lblClosingMonth.Text = information.ClosingDisplay;
            }
            else
            {
                lblClosingMonth.Visible = false;
            }
        }
Ejemplo n.º 3
0
        private void SettingFormData()
        {
            txtCompanyCode.Text                = Company.Code;
            txtProductKey.Text                 = Company.ProductKey;
            txtCompanyName.Text                = Company.Name;
            txtCompanyNameKana.Text            = Company.Kana;
            mskPostalCode.Text                 = Company.PostalCode;
            txtAddress1.Text                   = Company.Address1;
            txtAddress2.Text                   = Company.Address2;
            txtTel.Text                        = Company.Tel;
            txtFax.Text                        = Company.Fax;
            txtBankAccountName.Text            = Company.BankAccountName;
            txtBankAccountNameKana.Text        = Company.BankAccountKana;
            txtBankName1.Text                  = Company.BankName1;
            txtBankName2.Text                  = Company.BankName2;
            txtBankName3.Text                  = Company.BankName3;
            txtBranchName1.Text                = Company.BranchName1;
            txtBranchName2.Text                = Company.BranchName2;
            txtBranchName3.Text                = Company.BranchName3;
            cmbAccountType1.Text               = Company.AccountType1 ?? string.Empty;
            cmbAccountType2.Text               = Company.AccountType2 ?? string.Empty;
            cmbAccountType3.Text               = Company.AccountType3 ?? string.Empty;
            txtAccountNumber1.Text             = Company.AccountNumber1;
            txtAccountNumber2.Text             = Company.AccountNumber2;
            txtAccountNumber3.Text             = Company.AccountNumber3;
            txtClosingDay.Text                 = Company.ClosingDay.ToString("00");
            cbxPresetCodeSearchDialog.Checked  = (Company.PresetCodeSearchDialog == 1);
            cbxShowConfirmDialog.Checked       = (Company.ShowConfirmDialog == 1);
            cbxShowWarningDialog.Checked       = (Company.ShowWarningDialog == 1);
            cbxTransferAggregate.Checked       = (Company.TransferAggregate == 1);
            cbxAutoCloseProgressDialog.Checked = (Company.AutoCloseProgressDialog == 1);
            picLogo.Image                      = null;
            picLogo.ImageLocation              = null;

            if (UseClosing)
            {
                var information = UtilClosing.GetClosingInformation(Login.SessionKey, Login.CompanyId);
                if (information.Closing != null)
                {
                    txtClosingDay.Enabled = false;
                }
            }

            foreach (var companyLogo in CompanyLogos)
            {
                if (companyLogo.Logo.Length <= 0)
                {
                    continue;
                }

                switch (companyLogo.LogoType)
                {
                case (int)CompanyLogoType.Logo:
                    picLogo.Image    = ChangeByteToImage(companyLogo.Logo);
                    picLogo.SizeMode = PictureBoxSizeMode.StretchImage;
                    picLogo.Refresh();
                    picLogo.ImageLocation = null;
                    break;

                case (int)CompanyLogoType.SquareSeal:
                    picSquareSeal.Image    = ChangeByteToImage(companyLogo.Logo);
                    picSquareSeal.SizeMode = PictureBoxSizeMode.Zoom;
                    picSquareSeal.Refresh();
                    picSquareSeal.ImageLocation = null;
                    break;

                case (int)CompanyLogoType.RoundSeal:
                    picRoundSeal.Image    = ChangeByteToImage(companyLogo.Logo);
                    picRoundSeal.SizeMode = PictureBoxSizeMode.Zoom;
                    picRoundSeal.Refresh();
                    picRoundSeal.ImageLocation = null;
                    break;
                }
            }

            txtCompanyName.Focus();
            Changed = false;
        }