Пример #1
0
        private void txtKana_Validated(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtKana.Text))
            {
                ClearStatusMessage();
                return;
            }
            var kana = EbDataHelper.ConvertToHankakuKatakana(txtKana.Text);

            kana         = EbDataHelper.RemoveProhibitCharacter(kana);
            kana         = EbDataHelper.ConvertProhibitCharacter(kana);
            txtKana.Text = kana;

            var target = JuridicalPersonalityList.FirstOrDefault(k => k.Kana == kana);

            if (target != null)
            {
                SetJuridility(target);
                ClearStatusMessage();
            }
            else
            {
                target      = new JuridicalPersonality();
                target.Kana = kana;
                SetJuridility(target);
            }
        }
Пример #2
0
        private void txtBranchName_Validated(object sender, EventArgs e)
        {
            ClearStatusMessage();
            var converted = txtBranchName.Text;

            if (!string.IsNullOrEmpty(converted))
            {
                converted = EbDataHelper.RemoveProhibitCharacter(converted);
            }
            txtBranchName.Text = converted;
        }
Пример #3
0
        private string GetCustomerNameKana(string value, IEnumerable <string> legalPersonalities)
        {
            if (string.IsNullOrWhiteSpace(value))
            {
                return(dummyKana);
            }

            value = EbDataHelper.ConvertToHankakuKatakana(value);
            value = EbDataHelper.ConvertProhibitCharacter(value);
            value = EbDataHelper.RemoveProhibitCharacter(value);
            value = RemoveChars(value);
            value = EbDataHelper.RemoveLegalPersonality(value, legalPersonalities);
            if (string.IsNullOrWhiteSpace(value))
            {
                value = dummyKana;
            }
            return(value);
        }