Пример #1
0
        public SectionFileDefinition(DataExpression applicationControl) : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金部門";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <Section, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };

            SectionCodeField = new StringFieldDefinition <Section>(k => k.Code)
            {
                FieldName   = "入金部門コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitSectionCode,
            };

            SectionNameField = new StringFieldDefinition <Section>(k => k.Name)
            {
                FieldName   = "入金部門名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitSectionName,
            };

            NoteField = new StringFieldDefinition <Section>(k => k.Note)
            {
                FieldName   = "備考",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitNote,
            };

            PayerCodeLeftField = new StringFieldDefinition <Section>(k => k.PayerCodeLeft)
            {
                FieldName   = "仮想支店コード",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitPyaerCodeLeft,
            };

            PayerCodeRightField = new StringFieldDefinition <Section>(k => k.PayerCodeRight)
            {
                FieldName   = "仮想口座番号",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitPyaerCodeRight,
            };

            Fields.AddRange(new IFieldDefinition <Section>[] {
                CompanyIdField, SectionCodeField, SectionNameField, NoteField, PayerCodeLeftField, PayerCodeRightField
            });
            KeyFields.AddRange(new IFieldDefinition <Section>[] { SectionCodeField });
        }
Пример #2
0
        private IEnumerable <IFieldDefinition <ReminderSummary> > InitializeFields()
        {
            yield return(CustomerCodeField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerCode,
                                                                                         "得意先コード", 1, accept: x => x.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerName,
                                                                                         "得意先名", 2, accept: x => x.StandardString(CustomerNameField)));

            yield return(CurrencyCodeField = new StringFieldDefinition <ReminderSummary>(k => k.CurrencyCode,
                                                                                         "通貨コード", 3, accept: x => x.StandardString(CurrencyCodeField)));

            yield return(RemainAmountField = new NumberFieldDefinition <ReminderSummary, decimal>(k => k.RemainAmount,
                                                                                                  "請求残", 4, accept: x => x.StandardNumber(RemainAmountField), formatter: value => value.ToString()));

            yield return(ReminderAmountField = new NumberFieldDefinition <ReminderSummary, decimal>(k => k.ReminderAmount,
                                                                                                    "滞留金額", 5, accept: x => x.StandardNumber(ReminderAmountField), formatter: value => value.ToString()));

            yield return(MemoField = new StringFieldDefinition <ReminderSummary>(k => k.Memo,
                                                                                 "対応記録", 6, accept: x => x.StandardString(MemoField)));

            yield return(CustomerStaffNameField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerStaffName,
                                                                                              "相手先担当者", 7, accept: x => x.StandardString(CustomerStaffNameField)));

            yield return(CustomerNoteField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerNote,
                                                                                         "得意先備考", 8, accept: x => x.StandardString(CustomerNoteField)));

            yield return(CustomerTelField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerTel,
                                                                                        "電話番号", 9, accept: x => x.StandardString(CustomerTelField)));

            yield return(CustomerFaxField = new StringFieldDefinition <ReminderSummary>(k => k.CustomerFax,
                                                                                        "FAX番号", 10, accept: x => x.StandardString(CustomerFaxField)));
        }
Пример #3
0
 public MatchingHeaderFileDefinition(DataExpression dataExpression) :
     base(dataExpression)
 {
     Fields.Add(CheckedField = new NumberFieldDefinition <MatchingHeader, bool>(x => x.Checked,
                                                                                "解除", accept: VisitChecked, formatter: x => x ? "レ" : ""));
     Fields.Add(CurrencyCodeField = new StringFieldDefinition <MatchingHeader>(x => x.CurrencyCode,
                                                                               "通貨", accept: VisitCurrencyCode));
     Fields.Add(CustomerCodeField = new StringFieldDefinition <MatchingHeader>(x => x.DispCustomerCode,
                                                                               "得意先コード", accept: VisitCustomerCode));
     Fields.Add(CustomerNameField = new StringFieldDefinition <MatchingHeader>(x => x.DispCustomerName,
                                                                               "得意先名(代表者)", accept: VisitCustomerName));
     Fields.Add(BillingCountField = new NumberFieldDefinition <MatchingHeader, int>(x => x.BillingCount,
                                                                                    "件数", accept: VisitBillingCount, formatter: x => x.ToString()));
     Fields.Add(BillingAmountField = new NumberFieldDefinition <MatchingHeader, decimal>(x => x.BillingAmount,
                                                                                         "金額", accept: VisitBillingAmount));
     Fields.Add(PayerNameField = new StringFieldDefinition <MatchingHeader>(x => x.PayerName,
                                                                            "振込依頼人名", accept: VisitPayerName));
     Fields.Add(ReceiptCountField = new NumberFieldDefinition <MatchingHeader, int>(x => x.ReceiptCount,
                                                                                    "件数", accept: VisitReceiptCount, formatter: x => x.ToString()));
     Fields.Add(ReceiptAmountField = new NumberFieldDefinition <MatchingHeader, decimal>(x => x.ReceiptAmount,
                                                                                         "金額", accept: VisitReceiptAmount));
     Fields.Add(ShareTransferFeeField = new StringFieldDefinition <MatchingHeader>(x => x.DispShareTransferFee,
                                                                                   "手数科", accept: VisitShareTransferFee));
     Fields.Add(DifferentField = new NumberFieldDefinition <MatchingHeader, decimal>(x => x.Different,
                                                                                     "差額", accept: VisitDifferent));
     Fields.Add(DispMemoField = new StringFieldDefinition <MatchingHeader>(x => x.DispMemo,
                                                                           "メモ", accept: VisitDispMemo));
 }
        public JuridicalPersonalityFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "法人格";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <JuridicalPersonality, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            KanaField = new StringFieldDefinition <JuridicalPersonality>(
                k => k.Kana)
            {
                FieldName   = "法人格",
                FieldNumber = 1,
                Required    = true,
                Accept      = VisitKanaField,
            };

            Fields.AddRange(new IFieldDefinition <JuridicalPersonality>[] {
                CompanyIdField, KanaField
            });
            KeyFields.AddRange(new IFieldDefinition <JuridicalPersonality>[]
            {
                KanaField,
            });
        }
Пример #5
0
        public AccountTitleFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "科目";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <AccountTitle, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            AccountTitleCodeField = new StringFieldDefinition <AccountTitle>(k => k.Code)
            {
                FieldName   = "科目コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitAccountTitleCode,
            };
            AccountTitleNameField = new StringFieldDefinition <AccountTitle>(k => k.Name)
            {
                FieldName   = "科目名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitAccountTitleName,
            };
            ContraAccountCodeField = new StringFieldDefinition <AccountTitle>(k => k.ContraAccountCode)
            {
                FieldName   = "相手科目コード",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitContraAccountCode,
            };
            ContraAccountNameField = new StringFieldDefinition <AccountTitle>(k => k.ContraAccountName)
            {
                FieldName   = "相手科目名",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitContraAccountName,
            };
            ContraAccountSubCodeField = new StringFieldDefinition <AccountTitle>(k => k.ContraAccountSubCode)
            {
                FieldName   = "相手科目補助コード",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitContraAccountSubCode,
            };

            Fields.AddRange(new IFieldDefinition <AccountTitle>[] {
                CompanyIdField, AccountTitleCodeField, AccountTitleNameField, ContraAccountCodeField, ContraAccountNameField, ContraAccountSubCodeField
            });
            KeyFields.AddRange(new IFieldDefinition <AccountTitle>[]
            {
                AccountTitleCodeField,
            });
        }
Пример #6
0
        public DepartmentFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "請求部門";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <Department, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            DepartmentCodeField = new StringFieldDefinition <Department>(k => k.Code)
            {
                FieldName   = "請求部門コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitDepartmentCode,
            };
            DepartmentNameField = new StringFieldDefinition <Department>(k => k.Name)
            {
                FieldName   = "請求部門名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitDepartmentName,
            };

            StaffIdField = new NullableForeignKeyFieldDefinition <Department, int, Staff>(
                //k => k.StaffId ?? 0, c => c.Id,
                k => k.StaffId, c => c.Id,
                k => k.StaffCode, c => c.Code)
            {
                FieldName   = "回収責任者コード",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitStaffId,
            };

            NoteField = new StringFieldDefinition <Department>(k => k.Note)
            {
                FieldName   = "備考",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitNote,
            };
            Fields.AddRange(new IFieldDefinition <Department>[] {
                CompanyIdField, DepartmentCodeField, DepartmentNameField, StaffIdField, NoteField
            });
            KeyFields.AddRange(new IFieldDefinition <Department>[]
            {
                DepartmentCodeField,
            });
        }
        private IEnumerable <IFieldDefinition <CreditAgingList> > InitializeFields()
        {
            yield return(DepartmentCodeField = new StringFieldDefinition <CreditAgingList>(x => x.DepartmentCode,
                                                                                           "請求部門コード", 1, accept: x => x.StandardString(DepartmentCodeField)));

            yield return(DepartmentNameField = new StringFieldDefinition <CreditAgingList>(k => k.DepartmentName,
                                                                                           "請求部門名", 2, accept: x => x.StandardString(DepartmentNameField)));

            yield return(StaffCodeField = new StringFieldDefinition <CreditAgingList>(k => k.StaffCode,
                                                                                      "担当者コード", 3, accept: x => x.StandardString(StaffCodeField)));

            yield return(StaffNameField = new StringFieldDefinition <CreditAgingList>(k => k.StaffName,
                                                                                      "担当者名", 4, accept: x => x.StandardString(StaffNameField)));

            yield return(CustomerCodeField = new StringFieldDefinition <CreditAgingList>(x => x.CustomerCode,
                                                                                         "得意先コード", 5, accept: x => x.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <CreditAgingList>(x => x.CustomerName,
                                                                                         "得意先名", 6, accept: x => x.StandardString(CustomerNameField)));

            yield return(CollectCategoryField = new StringFieldDefinition <CreditAgingList>(k => k.TotalText,
                                                                                            "回収条件", 7, accept: x => x.StandardString(CollectCategoryField)));

            yield return(CreditAmountField = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.CreditAmount,
                                                                                                  "当月債権総額", 8, accept: x => x.StandardNumber(CreditAmountField), formatter: x => x.ToString()));

            yield return(UnsettledRemainField = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.UnsettledRemain,
                                                                                                     "当月末未決済残高", 9, accept: x => x.StandardNumber(UnsettledRemainField), formatter: x => x.ToString()));

            yield return(BillingRemainField = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.BillingRemain,
                                                                                                   "当月請求残高", 10, accept: x => x.StandardNumber(BillingRemainField), formatter: x => x.ToString()));

            yield return(CreditLimitField = new NullableNumberFieldDefinition <CreditAgingList, decimal>(k => k.CreditLimit,
                                                                                                         "与信限度額", 11, accept: x => x.StandardNumber(CreditLimitField), formatter: x => x.ToString()));

            yield return(CreditRemainField = new NullableNumberFieldDefinition <CreditAgingList, decimal>(k => k.CreditBalance,
                                                                                                          "当月与信残高", 12, accept: x => x.StandardNumber(CreditRemainField), formatter: x => x.ToString()));

            yield return(CreditRemainStarField = new StringFieldDefinition <CreditAgingList>(k => k.CreditBalanceMark,
                                                                                             " ", 13, accept: x => x.StandardString(CreditRemainStarField)));

            yield return(ArrivalDueDate1Field = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.ArrivalDueDate1,
                                                                                                     "", 14, accept: x => x.StandardNumber(ArrivalDueDate1Field), formatter: x => x.ToString()));

            yield return(ArrivalDueDate2Field = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.ArrivalDueDate2,
                                                                                                     "", 15, accept: x => x.StandardNumber(ArrivalDueDate2Field), formatter: x => x.ToString()));

            yield return(ArrivalDueDate3Field = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.ArrivalDueDate3,
                                                                                                     "", 16, accept: x => x.StandardNumber(ArrivalDueDate3Field), formatter: x => x.ToString()));

            yield return(ArrivalDueDate4Field = new NumberFieldDefinition <CreditAgingList, decimal>(k => k.ArrivalDueDate4,
                                                                                                     "", 17, accept: x => x.StandardNumber(ArrivalDueDate4Field), formatter: x => x.ToString()));
        }
Пример #8
0
        public LogDataFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "操作ログ管理";
            FileNameToken   = DataTypeToken;

            LoggedAtField = new NumberFieldDefinition <LogData, DateTime>(k => k.LoggedAt)
            {
                FieldName   = "日時",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitLoggedAt,
                Format      = value => value.ToString(),
            };

            LoginUserCodeField = new StringFieldDefinition <LogData>(k => k.LoginUserCode)
            {
                FieldName   = "ユーザーコード",
                FieldNumber = 2,
                Required    = false,
                Accept      = VisitLoginUserCode,
            };

            LoginUserNameField = new StringFieldDefinition <LogData>(k => k.LoginUserName)
            {
                FieldName   = "ユーザー名",
                FieldNumber = 3,
                Required    = false,
                Accept      = VisitLoginUserName,
            };
            MenuNameField = new StringFieldDefinition <LogData>(k => k.MenuName)
            {
                FieldName   = "名称",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitMenuName,
            };

            OperationNameField = new StringFieldDefinition <LogData>(k => k.OperationName)
            {
                FieldName   = "操作",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitOperationName,
            };

            Fields.AddRange(new IFieldDefinition <LogData>[] {
                LoggedAtField, LoginUserCodeField, LoginUserNameField, MenuNameField, OperationNameField
            });
        }
        private IEnumerable <IFieldDefinition <Header> > GetFields()
        {
            yield return(CompanyIdField = new StandardIdToCodeFieldDefinition <Header, Company>(x => x.CompanyId, x => x.Id, null, x => x.Code,
                                                                                                "会社コード", 1, accept: x => x.OwnCompanyCode(CompanyIdField)));

            yield return(NameField = new StringFieldDefinition <Header>(x => x.Name,
                                                                        "パターン名", 2, accept: x => x.StandardString(NameField)));

            yield return(CustomerCodeField = new StringFieldDefinition <Header>(x => x.CustomerCode,
                                                                                "得意先コード", 3, accept: x => x.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <Header>(x => x.CustomerName,
                                                                                "得意先名", 4, accept: x => x.StandardString(CustomerNameField)));

            yield return(DestinationCodeField = new StringFieldDefinition <Header>(x => x.DestinationCode,
                                                                                   "仕向先コード", 5, accept: x => x.StandardString(DestinationCodeField)));

            yield return(BilledCycleStatusField = new StringFieldDefinition <Header>(x => x.BilledCycleStatus,
                                                                                     "請求サイクル", 6, accept: x => x.StandardString(BilledCycleStatusField)));

            yield return(BilledDayField = new NumberFieldDefinition <Header, int>(x => x.BilledDay,
                                                                                  "請求日", 7, accept: x => x.StandardNumber(BilledDayField), formatter: x => x.ToString()));

            yield return(StartMonthField = new NumberFieldDefinition <Header, DateTime>(x => x.StartMonth,
                                                                                        "開始月", 8, accept: x => x.StandardNumber(StartMonthField), formatter: x => x.ToString(YearMonthFormat)));

            yield return(EndMonthField = new NullableNumberFieldDefinition <Header, DateTime>(x => x.EndMonth,
                                                                                              "終了月", 9, accept: x => x.StandardNumber(EndMonthField), formatter: x => x.ToString(YearMonthFormat)));

            yield return(InvoiceCodeField = new StringFieldDefinition <Header>(x => x.InvoiceCode,
                                                                               "請求書番号", 10, accept: x => x.StandardString(InvoiceCodeField)));

            yield return(SetNote1Field = new NumberFieldDefinition <Header, int>(x => x.SetBillingNote1,
                                                                                 "備考1設定", 11, accept: x => x.StandardNumber(SetNote1Field), formatter: x => x.ToString()));

            yield return(SetNote2Field = new NumberFieldDefinition <Header, int>(x => x.SetBillingNote2,
                                                                                 "備考2設定", 12, accept: x => x.StandardNumber(SetNote2Field), formatter: x => x.ToString()));

            yield return(BillingAmountField = new NumberFieldDefinition <Header, decimal>(x => x.BillingAmount,
                                                                                          "請求額合計", 13, accept: x => x.StandardNumber(BillingAmountField), formatter: x => x.ToString("0")));
        }
        public CollectionScheduleFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "回収予定表";
            FileNameToken   = DataTypeToken;

            Fields.Add(CustomerInfoField = new StringFieldDefinition <CollectionSchedule>(
                           x => x.CustomerInfo, "得意先/回収条件", accept: VisitCustomerInfoField));

            Fields.Add(ClosingDayField = new StringFieldDefinition <CollectionSchedule>(
                           k => k.Closing, "締日", accept: VisitClosingDayField));

            Fields.Add(StaffNameField = new StringFieldDefinition <CollectionSchedule>(
                           k => k.StaffName, "担当者名", accept: VisitStaffNameField));

            Fields.Add(DepartmentNameField = new StringFieldDefinition <CollectionSchedule>(
                           k => k.DepartmentName, "請求部門名", accept: VisitDepartmentNameField));

            Fields.Add(CategoryNameField = new StringFieldDefinition <CollectionSchedule>(
                           k => k.CollectCategoryName, "区分", accept: VisitCategoryNameField));

            Fields.Add(UncollectedAmountLastField = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmountLast, accept: VisitUncollectedAmountLastField));

            Fields.Add(UncollectedAmount0Field = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmount0, accept: VisitUncollectedAmount0Field));

            Fields.Add(UncollectedAmount1Field = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmount1, accept: VisitUncollectedAmount1Field));

            Fields.Add(UncollectedAmount2Field = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmount2, accept: VisitUncollectedAmount2Field));

            Fields.Add(UncollectedAmount3Field = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmount3, accept: VisitUncollectedAmount3Field));

            Fields.Add(UncollectedAmountTotalField = new NullableNumberFieldDefinition <CollectionSchedule, decimal>(
                           k => k.UncollectedAmountTotal, "合計", accept: VisitUncollectedAmountTotalField));
        }
Пример #11
0
        public IgnoreKanaFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "除外カナ";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <IgnoreKana, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = true,
                Accept      = VisitCompanyId,
            };
            KanaField = new StringFieldDefinition <IgnoreKana>(k => k.Kana)
            {
                FieldName   = "カナ名",
                FieldNumber = 2,
                Required    = false,
                Accept      = VisitKana,
            };
            ExcludeCategoryIdField = new StandardIdToCodeFieldDefinition <IgnoreKana, Category>(
                k => k.ExcludeCategoryId, c => c.Id,
                k => k.ExcludeCategoryCode, c => c.Code)
            {
                FieldName   = "対象外区分コード",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitExcludeCategoryId,
            };

            Fields.AddRange(new IFieldDefinition <IgnoreKana>[] {
                CompanyIdField, KanaField, ExcludeCategoryIdField
            });
            KeyFields.AddRange(new IFieldDefinition <IgnoreKana>[]
            {
                KanaField,
            });
        }
Пример #12
0
        private IEnumerable <IFieldDefinition <BankAccount> > GetFields()
        {
            var id = 0;

            //return null;
            yield return(CompanyIdField = new StandardIdToCodeFieldDefinition <BankAccount, Company>(k => k.CompanyId, c => c.Id, null, c => c.Code,
                                                                                                     "会社コード", ++id, accept: x => x.OwnCompanyCode(CompanyIdField)));

            yield return(BankCodeField = new StringFieldDefinition <BankAccount>(k => k.BankCode,
                                                                                 "銀行コード", ++id, required: true, accept: x => x.BankCode(BankCodeField)));

            yield return(BankNameField = new StringFieldDefinition <BankAccount>(k => k.BankName,
                                                                                 "銀行名", ++id, required: true, accept: x => x.BankName(BankNameField)));

            yield return(BranchCodeField = new StringFieldDefinition <BankAccount>(k => k.BranchCode,
                                                                                   "支店コード", ++id, required: true, accept: x => x.BranchCode(BranchCodeField)));

            yield return(BranchNameField = new StringFieldDefinition <BankAccount>(x => x.BranchName,
                                                                                   "支店名", ++id, required: true, accept: x => x.BranchName(BranchNameField)));

            yield return(AccountTypeIdField = new NumberFieldDefinition <BankAccount, int>(k => k.AccountTypeId,
                                                                                           "預金種別", ++id, required: true, accept: x => x.AccountTypeId(AccountTypeIdField), formatter: x => x.ToString()));

            yield return(AccountNumberField = new StringFieldDefinition <BankAccount>(k => k.AccountNumber,
                                                                                      "口座番号", ++id, required: true, accept: x => x.AccountNumber(AccountNumberField)));

            yield return(CategoryIdField = new NullableForeignKeyFieldDefinition <BankAccount, int, Category>(
                             k => k.ReceiptCategoryId, c => c.Id,
                             k => k.ReceiptCategoryCode, c => c.Code,
                             "入金区分コード", ++id, required: true, accept: x => x.CategoryCode(CategoryIdField)));

            yield return(ImportSkippingField = new NumberFieldDefinition <BankAccount, int>(k => k.ImportSkipping,
                                                                                            "取込対象外", ++id, required: true, accept: x => x.UseValueDate(ImportSkippingField), formatter: x => x.ToString()));

            yield return(SectionIdField = new NullableForeignKeyFieldDefinition <BankAccount, int, Section>(
                             k => k.SectionId, c => c.Id,
                             k => k.SectionCode, c => c.Code,
                             "入金部門コード", ++id, accept: x => x.SectionCode(SectionIdField)));
        }
Пример #13
0
        public MatchingJournalizingCancelFileDefinition(DataExpression applicationControl)
            : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "消込仕訳出力取消";
            FileNameToken   = DataTypeToken;

            CompanyIdField = new StandardIdToCodeFieldDefinition <MatchingJournalizingDetail, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };

            CreateAtField = new NullableNumberFieldDefinition <MatchingJournalizingDetail, DateTime>(k => k.CreateAt)
            {
                FieldName   = "更新日時",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitCreateAtField,
                Format      = value => value.ToString(),
            };

            JournalizingNameField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.JournalizingName)
            {
                FieldName   = "仕訳区分",
                FieldNumber = 3,
                Required    = false,
                Accept      = VisitJournalizingName,
            };

            CustomerCodeField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitCustomerCode,
            };

            CustomerNameField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitCustomerName,
            };

            CurrencyCodeField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.CurrencyCode)
            {
                FieldName   = "通貨コード",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitCurrencyCode,
            };

            AmountField = new NumberFieldDefinition <MatchingJournalizingDetail, decimal>(k => k.Amount)
            {
                FieldName   = "金額",
                FieldNumber = 7,
                Required    = true,
                Accept      = VisitAmount,
                Format      = value => value.ToString(),
            };

            OutputAtField = new NullableNumberFieldDefinition <MatchingJournalizingDetail, DateTime>(k => k.OutputAt)
            {
                FieldName   = "仕訳日",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitOutputAtField,
                Format      = value => value.ToString(),
            };

            ReceiptAmountField = new NumberFieldDefinition <MatchingJournalizingDetail, decimal>(k => k.ReceiptAmount)
            {
                FieldName   = "入金額",
                FieldNumber = 9,
                Required    = true,
                Accept      = VisitReceiptAmount,
                Format      = value => value.ToString(),
            };

            RecordedAtField = new NullableNumberFieldDefinition <MatchingJournalizingDetail, DateTime>(k => k.RecordedAt)
            {
                FieldName   = "入金日",
                FieldNumber = 10,
                Required    = true,
                Accept      = VisitRecordedAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };

            PayerNameField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.PayerName)
            {
                FieldName   = "振込依頼人名",
                FieldNumber = 11,
                Required    = false,
                Accept      = VisitPayerName,
            };

            BilledAtField = new NullableNumberFieldDefinition <MatchingJournalizingDetail, DateTime>(k => k.BilledAt)
            {
                FieldName   = "請求日",
                FieldNumber = 12,
                Required    = true,
                Accept      = VisitBillingAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };

            InvoiceCodeField = new StringFieldDefinition <MatchingJournalizingDetail>(k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = 13,
                Required    = false,
                Accept      = VisitInvoiceCode,
            };

            BillingAmountField = new NullableNumberFieldDefinition <MatchingJournalizingDetail, decimal>(k => k.BillingAmount)
            {
                FieldName   = "請求額",
                FieldNumber = 14,
                Required    = true,
                Accept      = VisitBillingAmount,
                Format      = value => value.ToString(),
            };

            Fields.AddRange(new IFieldDefinition <MatchingJournalizingDetail>[] {
                CompanyIdField, CreateAtField, JournalizingNameField, CustomerCodeField, CustomerNameField, CurrencyCodeField, AmountField, OutputAtField,
                ReceiptAmountField, RecordedAtField, PayerNameField, BilledAtField, InvoiceCodeField, BillingAmountField
            });
        }
Пример #14
0
        public PaymentScheduleInputFileDefinition(DataExpression expression, List <GridSetting> GridSettingInfo) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金予定入力";
            FileNameToken   = DataTypeToken;

            int fieldNumber = 1;

            foreach (GridSetting gs in GridSettingInfo)
            {
                Func <DateTime, string> dateTimeFormatter = value => value.ToString("yyyy/MM/dd");
                fieldNumber++;
                IFieldDefinition <Billing> field = null;
                switch (gs.ColumnName)
                {
                case nameof(Billing.BillingId):
                    field = (IdField = new NumberFieldDefinition <Billing, long>(k => k.Id,
                                                                                 accept: VisitIdField,
                                                                                 formatter: value => value.ToString()));
                    break;

                case nameof(Billing.InvoiceCode):
                    field = (InvoiceCodeField = new StringFieldDefinition <Billing>(k => k.InvoiceCode,
                                                                                    accept: VisitInvoiceCodeField));
                    break;

                case nameof(Billing.CustomerCode):
                    field = (CustomerCodeField = new StringFieldDefinition <Billing>(k => k.CustomerCode,
                                                                                     accept: VisitCustomerCodeField));
                    break;

                case nameof(Billing.CustomerName):
                    field = (CustomerNameField = new StringFieldDefinition <Billing>(k => k.CustomerName,
                                                                                     accept: VisitCustomerNameField));
                    break;

                case nameof(Billing.DepartmentCode):
                    field = (DepartmentCodeField = new StringFieldDefinition <Billing>(k => k.DepartmentCode,
                                                                                       accept: VisitDepartmentCodeField));
                    break;

                case nameof(Billing.DepartmentName):
                    field = (DepartmentNameField = new StringFieldDefinition <Billing>(k => k.DepartmentName,
                                                                                       accept: VisitDepartmentNameField));
                    break;

                case nameof(Billing.CurrencyCode):
                    field = (CurrencyCodeField = new StringFieldDefinition <Billing>(k => k.CurrencyCode,
                                                                                     accept: VisitCurrencyCodeField));
                    break;

                case nameof(Billing.BillingAmount):
                    field = (BillingAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.BillingAmount,
                                                                                               accept: VisitBillingAmountField,
                                                                                               formatter: value => value.ToString()));
                    break;

                case "DiscountAmountSummary":
                    field = (DiscountAmountSummaryField = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount,
                                                                                                       accept: VisitDiscountAmountSummaryField,
                                                                                                       formatter: value => value.ToString()));
                    break;

                case nameof(Billing.RemainAmount):
                    field = (RemainAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.RemainAmount,
                                                                                              accept: VisitRemainAmountField,
                                                                                              formatter: value => value.ToString()));
                    break;

                case nameof(Billing.PaymentAmount):
                    field = (PaymentAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.PaymentAmount,
                                                                                               accept: VisitPaymentAmountField,
                                                                                               formatter: value => value.ToString()));
                    break;

                case nameof(Billing.OffsetAmount):
                    field = (OffsetAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.OffsetAmount,
                                                                                              accept: VisitOffsetAmountField,
                                                                                              formatter: value => value.ToString()));
                    break;

                case nameof(Billing.BilledAt):
                    field = (BilledAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.BilledAt,
                                                                                           accept: VisitBilledAtField,
                                                                                           formatter: dateTimeFormatter));
                    break;

                case nameof(Billing.BillingDueAt):
                    field = (BillingDueAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.BillingDueAt,
                                                                                               accept: VisitBillingDueAtField,
                                                                                               formatter: dateTimeFormatter));
                    break;

                case "BillingCategory":
                    field = (BillingCategoryField = new StringFieldDefinition <Billing>(k => k.BillingCategoryCodeAndName,
                                                                                        accept: VisitBillingCategoryField));
                    break;

                case nameof(Billing.ScheduledPaymentKey):
                    field = (ScheduledPaymentKeyField = new StringFieldDefinition <Billing>(k => k.ScheduledPaymentKey,
                                                                                            accept: VisitScheduledPaymentKeyField));
                    break;

                case nameof(Billing.SalesAt):
                    field = (SalesAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.SalesAt,
                                                                                          accept: VisitSalesAtField,
                                                                                          formatter: dateTimeFormatter));
                    break;

                case nameof(Billing.ClosingAt):
                    field = (ClosingAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.ClosingAt,
                                                                                            accept: VisitClosingAtField,
                                                                                            formatter: dateTimeFormatter));
                    break;

                case "CollectCategory":
                    field = (CollectCategoryField = new StringFieldDefinition <Billing>(k => k.CollectCategoryCodeAndName,
                                                                                        accept: VisitCollectCategoryField));
                    break;

                case nameof(Billing.Note1):
                    field = (Note1Field = new StringFieldDefinition <Billing>(k => k.Note1,
                                                                              accept: VisitNote1Field));
                    break;

                case nameof(Billing.Note2):
                    field = (Note2Field = new StringFieldDefinition <Billing>(k => k.Note2,
                                                                              accept: VisitNote2Field));
                    break;

                case nameof(Billing.Note3):
                    field = (Note3Field = new StringFieldDefinition <Billing>(k => k.Note3,
                                                                              accept: VisitNote3Field));
                    break;

                case nameof(Billing.Note4):
                    field = (Note4Field = new StringFieldDefinition <Billing>(k => k.Note4,
                                                                              accept: VisitNote4Field));
                    break;

                case nameof(Billing.StaffCode):
                    field = (StaffCodeField = new StringFieldDefinition <Billing>(k => k.StaffCode,
                                                                                  accept: VisitStaffCodeField));
                    break;

                case nameof(Billing.StaffName):
                    field = (StaffNameField = new StringFieldDefinition <Billing>(k => k.StaffName,
                                                                                  accept: VisitStaffNameField));
                    break;

                case nameof(Billing.InputType):
                    field = (InputTypeField = new StringFieldDefinition <Billing>(k => k.InputTypeName,
                                                                                  accept: VisitInputTypeField));
                    break;

                case nameof(Billing.Memo):
                    field = (BillingMemoField = new StringFieldDefinition <Billing>(k => k.Memo,
                                                                                    accept: VisitBillingMemoField));
                    break;

                case nameof(Billing.Note5):
                    field = (Note5Field = new StringFieldDefinition <Billing>(k => k.Note5,
                                                                              accept: VisitNote5Field));
                    break;

                case nameof(Billing.Note6):
                    field = (Note6Field = new StringFieldDefinition <Billing>(k => k.Note6,
                                                                              accept: VisitNote6Field));
                    break;

                case nameof(Billing.Note7):
                    field = (Note7Field = new StringFieldDefinition <Billing>(k => k.Note7,
                                                                              accept: VisitNote7Field));
                    break;

                case nameof(Billing.Note8):
                    field = (Note8Field = new StringFieldDefinition <Billing>(k => k.Note8,
                                                                              accept: VisitNote8Field));
                    break;

                default:
                    break;
                }
                if (field == null)
                {
                    continue;
                }
                field.FieldName   = gs.ColumnNameJp;
                field.FieldNumber = fieldNumber;
                Fields.Add(field);
            }
        }
Пример #15
0
        //public NumberFieldDefinition<CustomerLedger, int> RecordTypeField { get; private set; }

        public CustomerLedgerFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "得意先別消込台帳";
            FileNameToken   = DataTypeToken;

            RecordedAtField = new StringFieldDefinition <CustomerLedger>(
                k => k.RecordTypeName)
            {
                FieldName   = "日付",
                FieldNumber = 1,
                Required    = true,
                Accept      = VisitRecordedAtField,
            };
            ParentCustomerCodeField = new StringFieldDefinition <CustomerLedger>(
                k => k.ParentCustomerCode)
            {
                FieldName   = "代表得意先コード",
                FieldNumber = 2,
                Required    = false,
                Accept      = VisitParentCustomerCodeField,
            };
            ParentCustomerNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.ParentCustomerName)
            {
                FieldName   = "代表得意先名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitParentCustomerNameField,
            };
            CurrencyCodeField = new StringFieldDefinition <CustomerLedger>(
                k => k.CurrencyCode)
            {
                FieldName   = "通貨コード",
                FieldNumber = 9,
                Required    = true,
                Accept      = VisitCurrencyCodeField,
            };
            SectionNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.SectionName)
            {
                FieldName   = "入金部門",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitSectionNameField,
            };
            DepartmentNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.DepartmentName)
            {
                FieldName   = "請求部門",
                FieldNumber = 5,
                Required    = true,
                Accept      = VisitDepartmentNameField,
            };
            InvoiceCodeField = new StringFieldDefinition <CustomerLedger>(
                k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitInvoiceCodeField,
            };
            CategoryNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.CategoryName)
            {
                FieldName   = "区分",
                FieldNumber = 7,
                Required    = true,
                Accept      = VisitCategoryNameField,
            };
            DebitAccountTitleNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.AccountTitleName)
            {
                FieldName   = "債権科目",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitDebitAccountTitleNameField,
            };
            MatchingSymbolBillingField = new StringFieldDefinition <CustomerLedger>(
                k => k.MatchingSymbolBilling)
            {
                FieldName   = "消込記号_請求",
                FieldNumber = 10,
                Required    = false,
                Accept      = VisitMatchingSymbolBillingField,
            };
            BillingAmountField = new  NullableNumberFieldDefinition <CustomerLedger, decimal>(
                k => k.BillingAmount)
            {
                FieldName   = "請求額",
                FieldNumber = 11,
                Required    = true,
                Accept      = VisitBillingAmountField,
                Format      = value => value.ToString(),
            };
            SlipTotalField = new NullableNumberFieldDefinition <CustomerLedger, decimal>(
                k => k.SlipTotal)
            {
                FieldName   = "伝票合計",
                FieldNumber = 12,
                Required    = true,
                Accept      = VisitSlipTotalField,
                Format      = value => value.ToString(),
            };
            ReceiptAmountField = new NullableNumberFieldDefinition <CustomerLedger, decimal>(
                k => k.ReceiptAmount)
            {
                FieldName   = "入金額",
                FieldNumber = 13,
                Required    = true,
                Accept      = VisitReceiptAmountField,
                Format      = value => value.ToString(),
            };

            MatchingSymbolReceiptField = new StringFieldDefinition <CustomerLedger>(
                k => k.MatchingSymbolReceipt)
            {
                FieldName   = "消込記号_消込",
                FieldNumber = 14,
                Required    = false,
                Accept      = VisitMatchingSymbolReceiptField,
            };
            MatchingAmountField = new NullableNumberFieldDefinition <CustomerLedger, decimal>(
                k => k.MatchingAmount)
            {
                FieldName   = "消込額",
                FieldNumber = 15,
                Required    = true,
                Accept      = VisitMatchingAmountField,
                Format      = value => value.ToString(),
            };
            RemainAmountField = new NullableNumberFieldDefinition <CustomerLedger, decimal>(
                k => k.RemainAmount)
            {
                FieldName   = "残高",
                FieldNumber = 16,
                Required    = true,
                Accept      = VisitRemainAmountField,
                Format      = value => value.ToString(),
            };
            CustomerCodeField = new StringFieldDefinition <CustomerLedger>(
                k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = 17,
                Required    = false,
                Accept      = VisitCustomerCodeField,
            };
            CustomerNameField = new StringFieldDefinition <CustomerLedger>(
                k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 18,
                Required    = true,
                Accept      = VisitCustomerNameField,
            };

            Fields.AddRange(new IFieldDefinition <CustomerLedger>[] {
                RecordedAtField, ParentCustomerCodeField, ParentCustomerNameField, SectionNameField, DepartmentNameField
                , InvoiceCodeField, CategoryNameField, DebitAccountTitleNameField, CurrencyCodeField, MatchingSymbolBillingField
                , BillingAmountField, SlipTotalField, ReceiptAmountField, MatchingSymbolReceiptField, MatchingAmountField
                , RemainAmountField, CustomerCodeField, CustomerNameField
            });
        }
Пример #16
0
        private IEnumerable <IFieldDefinition <MatchingJournalizing> > InitializeFields()
        {
            yield return(CompanyCodeField = new StandardIdToCodeFieldDefinition <MatchingJournalizing, Company>(
                             k => k.CompanyId, c => c.Id, null, c => c.Code,
                             "会社コード", 1, accept: x => x.OwnCompanyCode(CompanyCodeField)));

            yield return(RecordedAtField = new NumberFieldDefinition <MatchingJournalizing, DateTime>(k => k.RecordedAt,
                                                                                                      "伝票日付", 2, accept: x => x.StandardNumber(RecordedAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));

            yield return(SlipNumberField = new NumberFieldDefinition <MatchingJournalizing, long>(k => k.SlipNumber,
                                                                                                  "伝票番号", 3, accept: x => x.StandardNumber(SlipNumberField), formatter: value => value.ToString()));

            yield return(DebitDepartmentCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitDepartmentCode,
                                                                                                     "借方部門コード", 4, accept: x => x.StandardString(DebitDepartmentCodeField)));

            yield return(DebitDepartmentNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitDepartmentName,
                                                                                                     "借方部門名", 5, accept: x => x.StandardString(DebitDepartmentNameField)));

            yield return(DebitAccountTitleCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitAccountTitleCode,
                                                                                                       "借方科目コード", 6, accept: x => x.StandardString(DebitAccountTitleCodeField)));

            yield return(DebitAccountTitleNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitAccountTitleName,
                                                                                                       "借方科目名", 7, accept: x => x.StandardString(DebitAccountTitleNameField)));

            yield return(DebitSubCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitSubCode,
                                                                                              "借方補助コード", 8, accept: x => x.StandardString(DebitSubCodeField)));

            yield return(DebitSubNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitSubName,
                                                                                              "借方補助名", 9, accept: x => x.StandardString(DebitSubNameField)));

            yield return(CreditDepartmentCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditDepartmentCode,
                                                                                                      "貸方部門コード", 10, accept: x => x.StandardString(CreditDepartmentCodeField)));

            yield return(CreditDepartmentNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditDepartmentName,
                                                                                                      "貸方部門名", 11, accept: x => x.StandardString(CreditDepartmentNameField)));

            yield return(CreditAccountTitleCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditAccountTitleCode,
                                                                                                        "貸方科目コード", 12, accept: x => x.StandardString(CreditAccountTitleCodeField)));

            yield return(CreditAccountTitleNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditAccountTitleName,
                                                                                                        "貸方科目名", 13, accept: x => x.StandardString(CreditAccountTitleNameField)));

            yield return(CreditSubCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditSubCode,
                                                                                               "貸方補助コード", 14, accept: x => x.StandardString(CreditSubCodeField)));

            yield return(CreditSubNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditSubName,
                                                                                               "貸方補助名", 15, accept: x => x.StandardString(CreditSubNameField)));

            yield return(AmountField = new NumberFieldDefinition <MatchingJournalizing, decimal>(k => k.Amount,
                                                                                                 "金額", 16, accept: x => x.StandardNumber(AmountField), formatter: value => value.ToString()));

            yield return(NoteField = new StringFieldDefinition <MatchingJournalizing>(k => k.Note,
                                                                                      "備考", 17, accept: x => x.StandardString(NoteField)));

            yield return(CustomerCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CustomerCode,
                                                                                              "得意先コード", 18, accept: x => x.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CustomerName,
                                                                                              "得意先名", 19, accept: x => x.StandardString(CustomerNameField)));

            yield return(InvoiceCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.InvoiceCode,
                                                                                             "請求書番号", 20, accept: x => x.StandardString(InvoiceCodeField)));

            yield return(StaffCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.StaffCode,
                                                                                           "担当者コード", 21, accept: x => x.StandardString(StaffCodeField)));

            yield return(PayerCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.PayerCode,
                                                                                           "振込依頼人コード", 22, accept: x => x.StandardString(PayerCodeField)));

            yield return(PayerNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.PayerName,
                                                                                           "振込依頼人名", 23, accept: x => x.StandardString(PayerNameField)));

            yield return(SourceBankNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.SourceBankName,
                                                                                                "仕向銀行", 24, accept: x => x.StandardString(SourceBankNameField)));

            yield return(SourceBranchNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.SourceBranchName,
                                                                                                  "仕向支店", 25, accept: x => x.StandardString(SourceBranchNameField)));

            yield return(DueDateField = new NumberFieldDefinition <MatchingJournalizing, DateTime>(k => k.DueDate,
                                                                                                   "期日", 26, accept: x => x.StandardNumber(DueDateField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));

            yield return(BankCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.BankCode,
                                                                                          "銀行コード", 27, accept: x => x.StandardString(BankCodeField)));

            yield return(BankNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.BankName,
                                                                                          "銀行名", 28, accept: x => x.StandardString(BankNameField)));

            yield return(BranchCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.BranchCode,
                                                                                            "支店コード", 29, accept: x => x.StandardString(BranchCodeField)));

            yield return(BranchNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.BranchName,
                                                                                            "支店名", 30, accept: x => x.StandardString(BranchNameField)));

            yield return(AccountTypeIdField = new NullableNumberFieldDefinition <MatchingJournalizing, int>(k => k.AccountTypeId,
                                                                                                            "預金種別", 31, accept: x => x.StandardNumber(AccountTypeIdField), formatter: value => value.ToString()));

            yield return(AccountNumberField = new StringFieldDefinition <MatchingJournalizing>(k => k.AccountNumber,
                                                                                               "口座番号", 32, accept: x => x.StandardString(AccountNumberField)));

            yield return(TaxClassIdField = new NullableNumberFieldDefinition <MatchingJournalizing, int>(k => k.TaxClassId,
                                                                                                         "税区分コード", 33, accept: x => x.StandardNumber(TaxClassIdField), formatter: value => value.ToString()));

            yield return(CurrencyCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CurrencyCode,
                                                                                              "通貨コード", 34, accept: x => x.StandardString(CurrencyCodeField)));
        }
        public BillingJournalizingFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "請求仕訳出力";
            FileNameToken   = DataTypeToken;
            OutputHeader    = false;

            CompanyCodeField = new StandardIdToCodeFieldDefinition <BillingJournalizing, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyCode,
            };
            BilledAtField = new NumberFieldDefinition <BillingJournalizing, DateTime>(
                k => k.BilledAt)
            {
                FieldName   = "伝票日付",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitBilledAt,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            SlipNumberField = new NumberFieldDefinition <BillingJournalizing, long>(
                k => k.SlipNumber)
            {
                FieldName   = "伝票番号",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitSlipNumber,
                Format      = value => value.ToString(),
            };
            DebitDepartmentCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitDepartmentCode)
            {
                FieldName   = "借方部門コード",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitDebitDepartmentCode,
            };
            DebitDepartmentNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitDepartmentName)
            {
                FieldName   = "借方部門名",
                FieldNumber = 5,
                Required    = true,
                Accept      = VisitDebitDepartmentCode,
            };
            DebitAccountTitleCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitAccountTitleCode)
            {
                FieldName   = "借方科目コード",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitDebitAccountTitleCode,
            };
            DebitAccountTitleNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitAccountTitleName)
            {
                FieldName   = "借方科目名",
                FieldNumber = 7,
                Required    = true,
                Accept      = VisitDebitAccountTitleName,
            };
            DebitSubCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitSubCode)
            {
                FieldName   = "借方補助コード",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitDebitSubCode,
            };
            DebitSubNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.DebitSubName)
            {
                FieldName   = "借方補助名",
                FieldNumber = 9,
                Required    = true,
                Accept      = VisitDebitSubName,
            };
            CreditDepartmentCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditDepartmentCode)
            {
                FieldName   = "貸方部門コード",
                FieldNumber = 10,
                Required    = true,
                Accept      = VisitCreditDepartmentCode,
            };
            CreditDepartmentNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditDepartmentName)
            {
                FieldName   = "貸方部門名",
                FieldNumber = 11,
                Required    = true,
                Accept      = VisitCreditDepartmentName,
            };
            CreditAccountTitleCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditAccountTitleCode)
            {
                FieldName   = "貸方科目コード",
                FieldNumber = 12,
                Required    = true,
                Accept      = VisitCreditAccountTitleCode,
            };
            CreditAccountTitleNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditAccountTitleName)
            {
                FieldName   = "貸方科目名",
                FieldNumber = 13,
                Required    = true,
                Accept      = VisitCreditAccountTitleName,
            };
            CreditSubCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditSubCode)
            {
                FieldName   = "貸方補助コード",
                FieldNumber = 14,
                Required    = true,
                Accept      = VisitCreditSubCode,
            };
            CreditSubNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CreditSubName)
            {
                FieldName   = "貸方補助名",
                FieldNumber = 15,
                Required    = true,
                Accept      = VisitCreditSubName,
            };
            BillingAmountField = new NumberFieldDefinition <BillingJournalizing, decimal>(
                k => k.BillingAmount)
            {
                FieldName   = "仕訳金額",
                FieldNumber = 16,
                Required    = true,
                Accept      = VisitBillingAmount,
                Format      = value => value.ToString(),
            };
            NoteField = new StringFieldDefinition <BillingJournalizing>(
                k => k.Note)
            {
                FieldName   = "備考",
                FieldNumber = 17,
                Required    = true,
                Accept      = VisitNote,
            };
            CustomerCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = 18,
                Required    = true,
                Accept      = VisitCustomerCode,
            };
            CustomerNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 19,
                Required    = true,
                Accept      = VisitCustomerName,
            };
            InvoiceCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = 20,
                Required    = true,
                Accept      = VisitInvoiceCode,
            };
            StaffCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.StaffCode)
            {
                FieldName   = "担当者コード",
                FieldNumber = 21,
                Required    = true,
                Accept      = VisitStaffCode,
            };
            PayerCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.PayerCode)
            {
                FieldName   = "振込依頼人コード",
                FieldNumber = 22,
                Required    = true,
                Accept      = VisitPayerCode,
            };
            PayerNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.PayerName)
            {
                FieldName   = "振込依頼人名",
                FieldNumber = 23,
                Required    = true,
                Accept      = VisitPayerName,
            };
            SourceBankNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.SourceBankName)
            {
                FieldName   = "仕向銀行",
                FieldNumber = 24,
                Required    = true,
                Accept      = VisitSourceBankName,
            };
            SourceBranchNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.SourceBranchName)
            {
                FieldName   = "仕向支店",
                FieldNumber = 25,
                Required    = true,
                Accept      = VisitSourceBranchName,
            };
            DueAtField = new NumberFieldDefinition <BillingJournalizing, DateTime>(
                k => k.DueAt)
            {
                FieldName   = "期日",
                FieldNumber = 26,
                Required    = true,
                Accept      = VisitDueAt,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToString(),
            };
            BankCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.BankCode)
            {
                FieldName   = "銀行コード",
                FieldNumber = 27,
                Required    = true,
                Accept      = VisitBankCode,
            };
            BankNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.BankName)
            {
                FieldName   = "銀行名",
                FieldNumber = 28,
                Required    = true,
                Accept      = VisitBankName,
            };
            BranchCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.BranchCode)
            {
                FieldName   = "支店コード",
                FieldNumber = 29,
                Required    = true,
                Accept      = VisitBranchCode,
            };
            BranchNameField = new StringFieldDefinition <BillingJournalizing>(
                k => k.BranchName)
            {
                FieldName   = "支店名",
                FieldNumber = 30,
                Required    = true,
                Accept      = VisitBranchName,
            };
            AccountTypeField = new NullableNumberFieldDefinition <BillingJournalizing, int>(
                k => k.AccountType)
            {
                FieldName   = "預金種別",
                FieldNumber = 31,
                Required    = true,
                Accept      = VisitAccountType,
                Format      = value => value.ToString(),
            };
            AccountNumberField = new StringFieldDefinition <BillingJournalizing>(
                k => k.AccountNumber)
            {
                FieldName   = "口座番号",
                FieldNumber = 32,
                Required    = true,
                Accept      = VisitAccountNumber,
            };
            CurrencyCodeField = new StringFieldDefinition <BillingJournalizing>(
                k => k.CurrencyCode)
            {
                FieldName   = "通貨コード",
                FieldNumber = 33,
                Required    = true,
                Accept      = VisitCurrencyCode,
            };

            Fields.AddRange(new IFieldDefinition <BillingJournalizing>[]
            {
                CompanyCodeField, BilledAtField, SlipNumberField, DebitDepartmentCodeField,
                DebitDepartmentNameField, DebitAccountTitleCodeField, DebitAccountTitleNameField,
                DebitSubCodeField, DebitSubNameField, CreditDepartmentCodeField,
                CreditDepartmentNameField, CreditAccountTitleCodeField, CreditAccountTitleNameField,
                CreditSubCodeField, CreditSubNameField, BillingAmountField,
                NoteField, CustomerCodeField, CustomerNameField,
                InvoiceCodeField, StaffCodeField, PayerCodeField,
                PayerNameField, SourceBankNameField, SourceBranchNameField,
                DueAtField, BankCodeField, BankNameField,
                BranchCodeField, BranchNameField, AccountTypeField,
                AccountNumberField, CurrencyCodeField
            });
        }
Пример #18
0
        public ReceiptSearchFileDefinition(DataExpression expression, List <GridSetting> GridSettingInfo)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金データ";
            FileNameToken   = DataTypeToken;

            int fieldNumber = 1;

            Fields.Add(DeleteAtField = new NullableNumberFieldDefinition <Receipt, DateTime>(k => k.DeleteAt,
                                                                                             fieldName: "削除日", fieldNumber: fieldNumber,
                                                                                             accept: VisitDeleteAtField,
                                                                                             formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));

            foreach (GridSetting gs in GridSettingInfo)
            {
                fieldNumber++;
                IFieldDefinition <Receipt> field = null;
                switch (gs.ColumnName)
                {
                case "ExcludeFlag":
                    field = (ExcludeFlagField = new NumberFieldDefinition <Receipt, int>(k => k.ExcludeFlag,
                                                                                         accept: VisitExcludeFlagField,
                                                                                         formatter: value => value.ToString()));
                    break;

                case "ExcludeCategory":
                    field = (ExcludeCategoryNameField = new StringFieldDefinition <Receipt>(k => k.ExcludeCategoryName,
                                                                                            accept: VisitExcludeCategoryNameField));
                    break;

                case "Id":
                    field = (IdField = new NumberFieldDefinition <Receipt, long>(k => k.Id,
                                                                                 accept: VisitIdField,
                                                                                 formatter: value => value.ToString()));
                    break;

                case "AssignmentState":
                    field = (AssignmentFlagNameField = new StringFieldDefinition <Receipt>(k => k.AssignmentFlagName,
                                                                                           accept: VisitAssignmentFlagNameField));
                    break;

                case "RecordedAt":
                    field = (RecordedAtField = new NumberFieldDefinition <Receipt, DateTime>(k => k.RecordedAt,
                                                                                             accept: VisitRecordedAtField,
                                                                                             formatter: value => (value == null) ? "" : value.ToShortDateString()));
                    break;

                case "CustomerCode":
                    field = (CustomerCodeField = new StandardNullableIdToCodeFieldDefinition <Receipt, Customer>(
                                 k => k.CustomerId, c => c.Id, k => k.CustomerCode, c => c.Code,
                                 accept: VisitCustomerCodeField));
                    break;

                case "CustomerName":
                    field = (CustomerNameField = new StringFieldDefinition <Receipt>(k => k.CustomerName,
                                                                                     accept: VisitCustomerNameField));
                    break;

                case "PayerName":
                    field = (PayerNameField = new StringFieldDefinition <Receipt>(k => k.PayerName,
                                                                                  accept: VisitPayerNameField));
                    break;

                case "CurrencyCode":
                    field = (CurrencyIdField = new StandardIdToCodeFieldDefinition <Receipt, Currency>(
                                 k => k.CurrencyId, c => c.Id,
                                 k => k.CurrencyCode, c => c.Code,
                                 accept: VisitCurrencyIdField));
                    break;

                case "ReceiptAmount":
                    field = (ReceiptAmountField = new NumberFieldDefinition <Receipt, decimal>(k => k.ReceiptAmount,
                                                                                               accept: VisitReceiptAmountField,
                                                                                               formatter: value => value.ToString()));
                    break;

                case "RemainAmount":
                    field = (RemainAmountField = new NumberFieldDefinition <Receipt, decimal>(k => k.RemainAmount,
                                                                                              accept: VisitRemainAmountField,
                                                                                              formatter: value => value.ToString()));
                    break;

                case "ExcludeAmount":
                    field = (ExcludeAmountField = new NumberFieldDefinition <Receipt, decimal>(k => k.ExcludeAmount,
                                                                                               accept: VisitExcludeAmountField,
                                                                                               formatter: value => value.ToString()));
                    break;

                case "ReceiptCategoryName":
                    field = (ReceiptCategoryNameField = new StringFieldDefinition <Receipt>(k => k.CategoryCodeName,
                                                                                            accept: VisitReceiptCategoryNameField));
                    break;

                case "InputType":
                    field = (InputTypeField = new StringFieldDefinition <Receipt>(k => k.InputTypeName,
                                                                                  accept: VisitInputTypeField));
                    break;

                case "Note1":
                    field = (Note1Field = new StringFieldDefinition <Receipt>(k => k.Note1,
                                                                              accept: VisitNote1Field));
                    break;

                case "Note2":
                    field = (Note2Field = new StringFieldDefinition <Receipt>(k => k.Note2,
                                                                              accept: VisitNote2Field));
                    break;

                case "Note3":
                    field = (Note3Field = new StringFieldDefinition <Receipt>(k => k.Note3,
                                                                              accept: VisitNote3Field));
                    break;

                case "Note4":
                    field = (Note4Field = new StringFieldDefinition <Receipt>(k => k.Note4,
                                                                              accept: VisitNote4Field));
                    break;

                case "Memo":
                    field = (ReceiptMemoField = new StringFieldDefinition <Receipt>(k => k.ReceiptMemo,
                                                                                    accept: VisitReceiptMemoField));
                    break;

                case "DueAt":
                    field = (DueAtField = new NullableNumberFieldDefinition <Receipt, DateTime>(k => k.DueAt,
                                                                                                accept: VisitDueAtField,
                                                                                                formatter: value => (value == null) ? "" : value.ToShortDateString()));
                    break;

                case "SectionCode":
                    field = (SectionIdField = new StandardNullableIdToCodeFieldDefinition <Receipt, Section>(
                                 k => k.SectionId, c => c.Id,
                                 k => k.SectionCode, c => c.Code,
                                 accept: VisitSectionIdField));
                    break;

                case "SectionName":
                    field = (SectionNameField = new StringFieldDefinition <Receipt>(k => k.SectionName,
                                                                                    accept: VisitSectionNameField));
                    break;

                case "BankCode":
                    field = (BankCodeField = new StringFieldDefinition <Receipt>(k => k.BankCode,
                                                                                 accept: VisitBankCodeField));
                    break;

                case "BankName":
                    field = (BankNameField = new StringFieldDefinition <Receipt>(k => k.BankName,
                                                                                 accept: VisitBankNameField));
                    break;

                case "BranchCode":
                    field = (BranchCodeField = new StringFieldDefinition <Receipt>(k => k.BranchCode,
                                                                                   accept: VisitBranchCodeField));
                    break;

                case "BranchName":
                    field = (BranchNameField = new StringFieldDefinition <Receipt>(k => k.BranchName,
                                                                                   accept: VisitBranchNameField));
                    break;

                case "AccountNumber":
                    field = (AccountNumberField = new StringFieldDefinition <Receipt>(k => k.AccountNumber,
                                                                                      accept: VisitAccountNumberField));
                    break;

                case "SourceBankName":
                    field = (SourceBankNameField = new StringFieldDefinition <Receipt>(k => k.SourceBankName,
                                                                                       accept: VisitSourceBankNameField));
                    break;

                case "SourceBranchName":
                    field = (SourceBranchNameField = new StringFieldDefinition <Receipt>(k => k.SourceBranchName,
                                                                                         accept: VisitSourceBranchNameField));
                    break;

                case "VirtualBranchCode":
                    field = (PayerCodePrefixField = new StringFieldDefinition <Receipt>(k => k.PayerCodePrefix,
                                                                                        accept: VisitPayerCodePrefixField));
                    break;

                case "VirtualAccountNumber":
                    field = (PayerCodeSuffixField = new StringFieldDefinition <Receipt>(k => k.PayerCodeSuffix,
                                                                                        accept: VisitPayerCodeSuffixField));
                    break;

                case "OutputAt":
                    field = (OutputAtField = new NullableNumberFieldDefinition <Receipt, DateTime>(k => k.OutputAt,
                                                                                                   accept: VisitOutputAtField,
                                                                                                   formatter: value => (value == null) ? "" : value.ToString()));
                    break;

                case "BillNumber":
                    field = (BillNumberField = new StringFieldDefinition <Receipt>(k => k.BillNumber,
                                                                                   accept: VisitBillNumberField));
                    break;

                case "BillBankCode":
                    field = (BillBankCodeField = new StringFieldDefinition <Receipt>(k => k.BillBankCode,
                                                                                     accept: VisitBillBankCodeField));
                    break;

                case "BillBranchCode":
                    field = (BillBranchCodeField = new StringFieldDefinition <Receipt>(k => k.BillBranchCode,
                                                                                       accept: VisitBillBranchCodeField));
                    break;

                case "BillDrawAt":
                    field = (BillDrawAtField = new NullableNumberFieldDefinition <Receipt, DateTime>(k => k.BillDrawAt,
                                                                                                     accept: VisitBillDrawAtField,
                                                                                                     formatter: value => (value == null) ? "" : value.ToShortDateString()));
                    break;

                case "BillDrawer":
                    field = (BillDrawerField = new StringFieldDefinition <Receipt>(k => k.BillDrawer,
                                                                                   accept: VisitBillDrawerField));
                    break;
                }
                if (field == null)
                {
                    continue;
                }
                field.FieldName   = gs.ColumnNameJp;
                field.FieldNumber = fieldNumber;
                Fields.Add(field);
            }

            KeyFields.AddRange(new IFieldDefinition <Receipt>[]
            {
                CurrencyIdField,
                CustomerCodeField,
                SectionIdField,
            });
        }
Пример #19
0
        public BankBranchFileDefinition(DataExpression applicationControl) : base(applicationControl)
        {
            OutputHeader      = false;
            StartLineNumber   = 0;
            DataTypeToken     = "銀行・支店";
            FileNameToken     = DataTypeToken + "マスター";
            DuplicateAdoption = DuplicateAdoption.First; // 重複データは先勝ち
            TreatDuplicateAs  = TreatDuplicateAs.Ignore;

            // FieldNumber 1 銀行コード
            BankCodeField = new StringFieldDefinition <BankBranch>(
                cd => cd.BankCode)
            {
                FieldName   = "銀行コード",
                FieldNumber = 1,
                Required    = true,
                Accept      = VisitBankCode,
            };

            // FieldNumber 2 支店コード
            BranchCodeField = new StringFieldDefinition <BankBranch>(
                cd => cd.BranchCode)
            {
                FieldName   = "支店コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitBranchCode,
            };

            // FieldNumber 3 銀行名カナ
            BankKanaField = new StringFieldDefinition <BankBranch>(
                cd => cd.BankKana)
            {
                FieldName   = "銀行名カナ",
                FieldNumber = 3,
                Required    = false,
                Accept      = VisitBankKana,
            };

            // FieldNumber 4 銀行名
            BankNameField = new StringFieldDefinition <BankBranch>(
                cd => cd.BankName)
            {
                FieldName   = "銀行名",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitBankName,
            };

            // FieldNumber 5 支店名カナ
            BranchKanaField = new StringFieldDefinition <BankBranch>(
                cd => cd.BranchKana)
            {
                FieldName   = "支店名カナ",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitBranchKana,
            };

            // FieldNumber 6 支店名
            BranchNameField = new StringFieldDefinition <BankBranch>(
                cd => cd.BranchName)
            {
                FieldName   = "支店名",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitBranchName,
            };

            Fields.AddRange(new IFieldDefinition <BankBranch>[] {
                BankCodeField
                , BranchCodeField
                , BankKanaField
                , BankNameField
                , BranchKanaField
                , BranchNameField
            });
            KeyFields.AddRange(new IFieldDefinition <BankBranch>[]
            {
                BankCodeField,
                BranchCodeField,
            });
        }
Пример #20
0
        private IEnumerable <IFieldDefinition <MatchedReceipt> > GetFields(
            IEnumerable <ExportFieldSetting> settings,
            List <ColumnNameSetting> columnNames)
        {
            var fieldNumber = 0;

            foreach (var setting in settings.Where(x => x.IsStandardField && x.AllowExport == 1))
            {
                fieldNumber++;
                if (setting.ColumnName == "CompanyCode")
                {
                    yield return(CompanyCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.CompanyCode, setting.Caption, fieldNumber, accept: x => x.StandardString(CompanyCodeField)));
                }
                if (setting.ColumnName == "SlipNumber")
                {
                    yield return(SlipNumberField = new NumberFieldDefinition <MatchedReceipt, long>(
                                     k => k.SlipNumber, setting.Caption, fieldNumber, accept: x => x.StandardNumber(SlipNumberField), formatter: x => x.ToString()));
                }

                if (setting.ColumnName == "CustomerCode")
                {
                    yield return(CustomerCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.CustomerCode, setting.Caption, fieldNumber, accept: x => x.StandardString(CustomerCodeField)));
                }

                if (setting.ColumnName == "CustomerName")
                {
                    yield return(CustomerNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.CustomerName, setting.Caption, fieldNumber, accept: x => x.StandardString(CustomerNameField)));
                }

                if (setting.ColumnName == "InvoiceCode")
                {
                    yield return(InvoiceCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.InvoiceCode, setting.Caption, fieldNumber, accept: x => x.StandardString(InvoiceCodeField)));
                }

                if (setting.ColumnName == "BilledAt")
                {
                    yield return(BilledAtField = new NumberFieldDefinition <MatchedReceipt, DateTime>(
                                     k => k.BilledAt, setting.Caption, fieldNumber, accept: x => x.StandardNumber(BilledAtField), formatter: x => x.ToString(setting.DateFormat)));
                }

                if (setting.ColumnName == "ReceiptCategoryCode")
                {
                    yield return(ReceiptCategoryCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptCategoryCode, setting.Caption, fieldNumber, accept: x => x.StandardString(ReceiptCategoryCodeField)));
                }

                if (setting.ColumnName == "ReceiptCategoryName")
                {
                    yield return(ReceiptCategoryNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptCategoryName, setting.Caption, fieldNumber, accept: x => x.StandardString(ReceiptCategoryNameField)));
                }

                if (setting.ColumnName == "RecordedAt")
                {
                    yield return(RecordedAtField = new NumberFieldDefinition <MatchedReceipt, DateTime>(
                                     k => k.RecordedAt, setting.Caption, fieldNumber, accept: x => x.StandardNumber(RecordedAtField), formatter: x => x.ToString(setting.DateFormat)));
                }

                if (setting.ColumnName == "DueAt")
                {
                    yield return(DueAtField = new NullableNumberFieldDefinition <MatchedReceipt, DateTime>(
                                     k => k.DueAt, setting.Caption, fieldNumber, accept: x => x.StandardNumber(DueAtField), formatter: x => x.ToString(setting.DateFormat)));
                }

                if (setting.ColumnName == "Amount")
                {
                    yield return(AmountField = new NumberFieldDefinition <MatchedReceipt, decimal>(
                                     k => k.Amount, setting.Caption, fieldNumber, accept: x => x.StandardNumber(AmountField), formatter: x => x.ToString()));
                }

                if (setting.ColumnName == "DepartmentCode")
                {
                    yield return(DepartmentCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.DepartmentCode, setting.Caption, fieldNumber, accept: x => x.StandardString(DepartmentCodeField)));
                }

                if (setting.ColumnName == "DepartmentName")
                {
                    yield return(DepartmentNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.DepartmentName, setting.Caption, fieldNumber, accept: x => x.StandardString(DepartmentNameField)));
                }

                if (setting.ColumnName == "CurrencyCode")
                {
                    yield return(CurrencyCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.CurrencyCode, setting.Caption, fieldNumber, accept: x => x.StandardString(CurrencyCodeField)));
                }

                if (setting.ColumnName == "ReceiptAmount")
                {
                    yield return(ReceiptAmountField = new NumberFieldDefinition <MatchedReceipt, decimal>(
                                     k => k.ReceiptAmount, setting.Caption, fieldNumber, accept: x => x.StandardNumber(ReceiptAmountField), formatter: x => x.ToString()));
                }

                if (setting.ColumnName == "ReceiptId")
                {
                    yield return(IdField = new NumberFieldDefinition <MatchedReceipt, long>(
                                     k => k.Id, setting.Caption, fieldNumber, accept: x => x.StandardNumber(IdField), formatter: x => x.ToString()));
                }

                if (setting.ColumnName == "BillingNote1")
                {
                    yield return(BillingNote1Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillingNote1, GetColumnNames(columnNames, nameof(Billing), "Note1", "備考"), fieldNumber, accept: x => x.StandardString(BillingNote1Field)));
                }

                if (setting.ColumnName == "BillingNote2")
                {
                    yield return(BillingNote2Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillingNote2, GetColumnNames(columnNames, nameof(Billing), "Note2", "備考2"), fieldNumber, accept: x => x.StandardString(BillingNote2Field)));
                }

                if (setting.ColumnName == "BillingNote3")
                {
                    yield return(BillingNote3Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillingNote3, GetColumnNames(columnNames, nameof(Billing), "Note3", "備考3"), fieldNumber, accept: x => x.StandardString(BillingNote3Field)));
                }

                if (setting.ColumnName == "BillingNote4")
                {
                    yield return(BillingNote4Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillingNote4, GetColumnNames(columnNames, nameof(Billing), "Note4", "備考4"), fieldNumber, accept: x => x.StandardString(BillingNote4Field)));
                }

                if (setting.ColumnName == "ReceiptNote1")
                {
                    yield return(ReceiptNote1Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptNote1, GetColumnNames(columnNames, nameof(Receipt), "Note1", "備考"), fieldNumber, accept: x => x.StandardString(ReceiptNote1Field)));
                }

                if (setting.ColumnName == "ReceiptNote2")
                {
                    yield return(ReceiptNote2Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptNote2, GetColumnNames(columnNames, nameof(Receipt), "Note2", "備考2"), fieldNumber, accept: x => x.StandardString(ReceiptNote2Field)));
                }

                if (setting.ColumnName == "ReceiptNote3")
                {
                    yield return(ReceiptNote3Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptNote3, GetColumnNames(columnNames, nameof(Receipt), "Note3", "備考3"), fieldNumber, accept: x => x.StandardString(ReceiptNote3Field)));
                }

                if (setting.ColumnName == "ReceiptNote4")
                {
                    yield return(ReceiptNote4Field = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptNote4, GetColumnNames(columnNames, nameof(Receipt), "Note4", "備考4"), fieldNumber, accept: x => x.StandardString(ReceiptNote4Field)));
                }

                if (setting.ColumnName == "BillNumber")
                {
                    yield return(BillNumberField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillNumber, setting.Caption, fieldNumber, accept: x => x.StandardString(BillNumberField)));
                }

                if (setting.ColumnName == "BillBankCode")
                {
                    yield return(BillBankCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillBankCode, setting.Caption, fieldNumber, accept: x => x.StandardString(BillBankCodeField)));
                }

                if (setting.ColumnName == "BillBranchCode")
                {
                    yield return(BillBranchCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillBranchCode, setting.Caption, fieldNumber, accept: x => x.StandardString(BillBranchCodeField)));
                }

                if (setting.ColumnName == "BillDrawAt")
                {
                    yield return(BillDrawAtField = new NullableNumberFieldDefinition <MatchedReceipt, DateTime>(
                                     k => k.BillDrawAt, setting.Caption, fieldNumber, accept: x => x.StandardNumber(BillDrawAtField), formatter: x => x.ToString(setting.DateFormat)));
                }

                if (setting.ColumnName == "BillDrawer")
                {
                    yield return(BillDrawerField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillDrawer, setting.Caption, fieldNumber, accept: x => x.StandardString(BillDrawerField)));
                }

                if (setting.ColumnName == "BillingMemo")
                {
                    yield return(BillingMemoField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BillingMemo, setting.Caption, fieldNumber, accept: x => x.StandardString(BillingMemoField)));
                }

                if (setting.ColumnName == "ReceiptMemo")
                {
                    yield return(ReceiptMemoField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptMemo, setting.Caption, fieldNumber, accept: x => x.StandardString(ReceiptMemoField)));
                }

                if (setting.ColumnName == "MatchingMemo")
                {
                    yield return(MatchingMemoField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.MatchingMemo, setting.Caption, fieldNumber, accept: x => x.StandardString(MatchingMemoField)));
                }

                if (setting.ColumnName == "BankCode")
                {
                    yield return(BankCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BankCode, setting.Caption, fieldNumber, accept: x => x.StandardString(BankCodeField)));
                }

                if (setting.ColumnName == "BankName")
                {
                    yield return(BankNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BankName, setting.Caption, fieldNumber, accept: x => x.StandardString(BankNameField)));
                }

                if (setting.ColumnName == "BranchCode")
                {
                    yield return(BranchCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BranchCode, setting.Caption, fieldNumber, accept: x => x.StandardString(BranchCodeField)));
                }

                if (setting.ColumnName == "BranchName")
                {
                    yield return(BranchNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.BranchName, setting.Caption, fieldNumber, accept: x => x.StandardString(BranchNameField)));
                }

                if (setting.ColumnName == "AccountNumber")
                {
                    yield return(AccountNumberField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.AccountNumber, setting.Caption, fieldNumber, accept: x => x.StandardString(AccountNumberField)));
                }

                if (setting.ColumnName == "SourceBankName")
                {
                    yield return(SourceBankNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.SourceBankName, setting.Caption, fieldNumber, accept: x => x.StandardString(SourceBankNameField)));
                }

                if (setting.ColumnName == "SourceBranchName")
                {
                    yield return(SourceBranchNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.SourceBranchName, setting.Caption, fieldNumber, accept: x => x.StandardString(SourceBranchNameField)));
                }

                if (setting.ColumnName == "VirtualBranchCode")
                {
                    yield return(VirtualBranchCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.VirtualBranchCode, setting.Caption, fieldNumber, accept: x => x.StandardString(VirtualBranchCodeField)));
                }

                if (setting.ColumnName == "VirtualAccountNumber")
                {
                    yield return(VirtualAccountNumberField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.VirtualAccountNumber, setting.Caption, fieldNumber, accept: x => x.StandardString(VirtualAccountNumberField)));
                }

                if (setting.ColumnName == "SectionCode")
                {
                    yield return(SectionCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.SectionCode, setting.Caption, fieldNumber, accept: x => x.StandardString(SectionCodeField)));
                }

                if (setting.ColumnName == "SectionName")
                {
                    yield return(SectionNameField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.SectionName, setting.Caption, fieldNumber, accept: x => x.StandardString(SectionNameField)));
                }

                if (setting.ColumnName == "ReceiptCategoryExternalCode")
                {
                    yield return(ReceiptCategoryExternalCodeField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.ReceiptCategoryExternalCode, setting.Caption, fieldNumber, accept: x => x.StandardString(ReceiptCategoryExternalCodeField)));
                }

                if (setting.ColumnName == "OriginalReceiptId")
                {
                    yield return(OriginalReceiptIdField = new NumberFieldDefinition <MatchedReceipt, long>(
                                     k => k.OriginalReceiptId, setting.Caption, fieldNumber, accept: x => x.StandardNumber(OriginalReceiptIdField), formatter: x => x.ToString()));
                }

                if (setting.ColumnName == "JournalizingCategory")
                {
                    yield return(JournalizingCategoryField = new StringFieldDefinition <MatchedReceipt>(
                                     k => k.JournalizingCategory, setting.Caption, fieldNumber, accept: x => x.StandardString(JournalizingCategoryField)));
                }
            }
        }
        public KanaHistoryCustomerFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "得意先学習履歴";
            FileNameToken   = DataTypeToken;

            CompanyIdField = new StandardIdToCodeFieldDefinition <KanaHistoryCustomer, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            PayerNameField = new StringFieldDefinition <KanaHistoryCustomer>(k => k.PayerName)
            {
                FieldName   = "振込依頼人名",
                FieldNumber = 2,
                Required    = false,
                Accept      = VisitKana,
            };
            CustomerIdField = new StandardIdToCodeFieldDefinition <KanaHistoryCustomer, Customer>(
                k => k.CustomerId, c => c.Id,
                k => k.CustomerCode, c => c.Code)
            {
                FieldName   = "得意先コード",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitcustomerId,
            };
            SourceBankNameField = new StringFieldDefinition <KanaHistoryCustomer>(k => k.SourceBankName)
            {
                FieldName   = "仕向銀行",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitSourceBankName,
            };
            SourceBrankNameField = new StringFieldDefinition <KanaHistoryCustomer>(k => k.SourceBranchName)
            {
                FieldName   = "仕向支店",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitSourceBrankName,
            };
            HitCountField = new NumberFieldDefinition <KanaHistoryCustomer, int>(k => k.HitCount)
            {
                FieldName   = "消込回数",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitHitCount,
                Format      = value => value.ToString(),
            };

            Fields.AddRange(new IFieldDefinition <KanaHistoryCustomer>[] {
                CompanyIdField, PayerNameField, CustomerIdField, SourceBankNameField, SourceBrankNameField, HitCountField
            });
            KeyFields.AddRange(new IFieldDefinition <KanaHistoryCustomer>[]
            {
                PayerNameField,
                CustomerIdField,
                SourceBankNameField,
                SourceBrankNameField,
            });
        }
Пример #22
0
        public BillingSearchFileDefinition(DataExpression expression, List <GridSetting> GridSettingInfo) : base(expression)
        {
            Func <DateTime, string> dateTimeFormatter = value => value.ToString("yyyy/MM/dd");

            StartLineNumber = 1;
            DataTypeToken   = "請求データ";
            FileNameToken   = DataTypeToken;

            Fields.Add(DeleteAtField = new NullableNumberFieldDefinition <Billing, DateTime>(k => k.DeleteAt,
                                                                                             fieldName: "削除日", fieldNumber: 1,
                                                                                             accept: VisitDeleteAtField,
                                                                                             formatter: dateTimeFormatter));

            int fieldNumber = 1;

            foreach (GridSetting gs in GridSettingInfo)
            {
                fieldNumber++;
                IFieldDefinition <Billing> field = null;
                switch (gs.ColumnName)
                {
                case "Id":
                    field = (IdField = new NumberFieldDefinition <Billing, long>(k => k.Id,
                                                                                 accept: VisitIdField,
                                                                                 formatter: value => value.ToString()));
                    break;

                case "InvoiceCode":
                    field = (InvoiceCodeField = new StringFieldDefinition <Billing>(k => k.InvoiceCode,
                                                                                    accept: VisitInvoiceCodeField));
                    break;

                case "BillingCategory":
                    field = (BillingCategoryField = new StringFieldDefinition <Billing>(k => k.BillingCategoryCodeAndName,
                                                                                        accept: VisitBillingCategoryField));
                    break;

                case "CollectCategory":
                    field = (CollectCategoryField = new StringFieldDefinition <Billing>(k => k.CollectCategoryCodeAndName,
                                                                                        accept: VisitCollectCategoryField));
                    break;

                case "InputType":
                    field = (InputTypeField = new StringFieldDefinition <Billing>(k => k.InputTypeName,
                                                                                  accept: VisitInputTypeField));
                    break;

                case "Note1":
                    field = (Note1Field = new StringFieldDefinition <Billing>(k => k.Note1, accept: VisitNote1Field));
                    break;

                case "Note2":
                    field = (Note2Field = new StringFieldDefinition <Billing>(k => k.Note2, accept: VisitNote2Field));
                    break;

                case "Note3":
                    field = (Note3Field = new StringFieldDefinition <Billing>(k => k.Note3, accept: VisitNote3Field));
                    break;

                case "Note4":
                    field = (Note4Field = new StringFieldDefinition <Billing>(k => k.Note4, accept: VisitNote4Field));
                    break;

                case "Note5":
                    field = (Note5Field = new StringFieldDefinition <Billing>(k => k.Note5, accept: x => x.StandardString(Note5Field)));
                    break;

                case "Note6":
                    field = (Note6Field = new StringFieldDefinition <Billing>(k => k.Note6, accept: x => x.StandardString(Note6Field)));
                    break;

                case "Note7":
                    field = (Note7Field = new StringFieldDefinition <Billing>(k => k.Note7, accept: x => x.StandardString(Note7Field)));
                    break;

                case "Note8":
                    field = (Note8Field = new StringFieldDefinition <Billing>(k => k.Note8, accept: x => x.StandardString(Note8Field)));
                    break;

                case "Memo":
                    field = (BillingMemoField = new StringFieldDefinition <Billing>(k => k.Memo,
                                                                                    accept: VisitBillingMemoField));
                    break;

                case "CustomerCode":
                    field = (CustomerCodeField = new StringFieldDefinition <Billing>(k => k.CustomerCode,
                                                                                     accept: VisitCustomerCodeField));
                    break;

                case "StaffCode":
                    field = (StaffCodeField = new StringFieldDefinition <Billing>(k => k.StaffCode,
                                                                                  accept: VisitStaffCodeField));
                    break;

                case "ResultCode":
                    field = (ResultCodeField = new StringFieldDefinition <Billing>(k => k.ResultCodeName,
                                                                                   accept: VisitResultCodeField));
                    break;

                case "ContractNumber":
                    field = (ContractNumberField = new StringFieldDefinition <Billing>(k => k.ContractNumber,
                                                                                       accept: VisitContractNumberField));
                    break;

                case "Confirm":
                    field = (ConfirmField = new StringFieldDefinition <Billing>(k => k.ConfirmName,
                                                                                accept: VisitConfirmField));
                    break;

                case "CurrencyCode":
                    field = (CurrencyCodeField = new StringFieldDefinition <Billing>(k => k.CurrencyCode,
                                                                                     accept: VisitCurrencyCodeField));
                    break;

                case "CustomerName":
                    field = (CustomerNameField = new StringFieldDefinition <Billing>(k => k.CustomerName,
                                                                                     accept: VisitCustomerNameField));
                    break;

                case "StaffName":
                    field = (StaffNameField = new StringFieldDefinition <Billing>(k => k.StaffName,
                                                                                  accept: VisitStaffNameField));
                    break;

                case "AssignmentState":
                    field = (AssignmentFlagField = new StringFieldDefinition <Billing>(k => k.AssignmentFlagName,
                                                                                       accept: VisitAssignmentFlagField));
                    break;

                case "BilledAt":
                    field = (BilledAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.BilledAt,
                                                                                           accept: VisitBilledAtField,
                                                                                           formatter: dateTimeFormatter));
                    break;

                case "SalesAt":
                    field = (SalesAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.SalesAt,
                                                                                          accept: VisitSalesAtField,
                                                                                          formatter: dateTimeFormatter));
                    break;

                case "ClosingAt":
                    field = (ClosingAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.ClosingAt,
                                                                                            accept: VisitClosingAtField,
                                                                                            formatter: dateTimeFormatter));
                    break;

                case "DueAt":
                    field = (DueAtField = new NumberFieldDefinition <Billing, DateTime>(k => k.DueAt,
                                                                                        accept: VisitDueAtField,
                                                                                        formatter: dateTimeFormatter));
                    break;

                case "RequestDate":
                    field = (RequestDateField = new NullableNumberFieldDefinition <Billing, DateTime>(k => k.RequestDate,
                                                                                                      accept: VisitRequestField,
                                                                                                      formatter: dateTimeFormatter));
                    break;

                case "BillingAmount":
                    field = (BillingAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.BillingAmount,
                                                                                               accept: VisitBillingAmountField,
                                                                                               formatter: value => value.ToString()));
                    break;

                case "RemainAmount":
                    field = (RemainAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.RemainAmount,
                                                                                              accept: VisitRemainAmountField,
                                                                                              formatter: value => value.ToString()));
                    break;

                case "DiscountAmount1":
                    field = (DiscountAmount1Field = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount1,
                                                                                                 accept: VisitDiscountAmount1Field,
                                                                                                 formatter: value => value.ToString()));
                    break;

                case "DiscountAmount2":
                    field = (DiscountAmount2Field = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount2,
                                                                                                 accept: VisitDiscountAmount2Field,
                                                                                                 formatter: value => value.ToString()));
                    break;

                case "DiscountAmount3":
                    field = (DiscountAmount3Field = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount3,
                                                                                                 accept: VisitDiscountAmount3Field,
                                                                                                 formatter: value => value.ToString()));
                    break;

                case "DiscountAmount4":
                    field = (DiscountAmount4Field = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount4,
                                                                                                 accept: VisitDiscountAmount4Field,
                                                                                                 formatter: value => value.ToString()));
                    break;

                case "DiscountAmount5":
                    field = (DiscountAmount5Field = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount5,
                                                                                                 accept: VisitDiscountAmount5Field,
                                                                                                 formatter: value => value.ToString()));
                    break;

                case "DepartmentCode":
                    field = (DepartmentCodeField = new StringFieldDefinition <Billing>(k => k.DepartmentCode,
                                                                                       accept: VisitDepartmentCodeField));
                    break;

                case "DepartmentName":
                    field = (DepartmentNameField = new StringFieldDefinition <Billing>(k => k.DepartmentName,
                                                                                       accept: VisitDepartmentNameField));
                    break;

                case "DiscountAmountSummary":
                    field = (DiscountAmountTotalField = new NumberFieldDefinition <Billing, decimal>(k => k.DiscountAmount,
                                                                                                     accept: VisitDiscountAmountTotalField,
                                                                                                     formatter: value => value.ToString()));
                    break;

                case "FirstRecordedAt":
                    field = (FirstRecordedAtField = new NullableNumberFieldDefinition <Billing, DateTime>(k => k.FirstRecordedAt,
                                                                                                          accept: VisitFirstRecordedAtField,
                                                                                                          formatter: dateTimeFormatter));
                    break;

                case "LastRecordedAt":
                    field = (LastRecordedAtField = new NullableNumberFieldDefinition <Billing, DateTime>(k => k.LastRecordedAt,
                                                                                                         accept: VisitLastRecordedAtField,
                                                                                                         formatter: dateTimeFormatter));
                    break;

                case "Price":
                    field = (PriceField = new NumberFieldDefinition <Billing, decimal>(k => k.BillingAmountExcludingTax,
                                                                                       accept: VisitPriceField,
                                                                                       formatter: value => value.ToString()));
                    break;

                case "TaxAmount":
                    field = (TaxAmountField = new NumberFieldDefinition <Billing, decimal>(k => k.TaxAmount,
                                                                                           accept: VisitTaxAmountField,
                                                                                           formatter: value => value.ToString()));
                    break;

                default:
                    break;
                }
                if (field == null)
                {
                    continue;
                }
                field.FieldName   = gs.ColumnNameJp;
                field.FieldNumber = fieldNumber;
                Fields.Add(field);
            }
        }
        private IEnumerable <IFieldDefinition <ExportMatchingIndividual> > GetFields()
        {
            var fieldNumber = 0;

            yield return(CurrencyCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.CurrencyCode,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "通貨コード",
                                                                                                  accept: visitor => visitor.StandardString(CurrencyCodeField)));

            yield return(BillCheckField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillCheck,
                                                                                               fieldNumber: ++fieldNumber, fieldName: "消",
                                                                                               accept: visitor => visitor.StandardString(BillCheckField)));

            yield return(CustomerCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.CustomerCode,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "得意先コード",
                                                                                                  accept: visitor => visitor.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.CustomerName,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "得意先名",
                                                                                                  accept: visitor => visitor.StandardString(CustomerNameField)));

            yield return(BilledAtField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.BilledAt,
                                                                                                                fieldNumber: ++fieldNumber, fieldName: "請求日",
                                                                                                                accept: visitor => visitor.StandardNumber(BilledAtField),
                                                                                                                formatter: value => value.ToShortDateString()));

            yield return(SalesAtField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.SalesAt,
                                                                                                               fieldNumber: ++fieldNumber, fieldName: "売上日",
                                                                                                               accept: visitor => visitor.StandardNumber(SalesAtField),
                                                                                                               formatter: value => value.ToShortDateString()));

            yield return(DueAtField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.DueAt,
                                                                                                             fieldNumber: ++fieldNumber, fieldName: "予定日",
                                                                                                             accept: visitor => visitor.StandardNumber(DueAtField),
                                                                                                             formatter: value => value.ToShortDateString()));

            yield return(BillingAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.BillingAmount,
                                                                                                                    fieldNumber: ++fieldNumber, fieldName: "請求額",
                                                                                                                    accept: visitor => visitor.StandardNumber(BillingAmountField),
                                                                                                                    formatter: value => value.ToString()));

            yield return(RemainAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.RemainAmount,
                                                                                                                   fieldNumber: ++fieldNumber, fieldName: "請求残",
                                                                                                                   accept: visitor => visitor.StandardNumber(RemainAmountField),
                                                                                                                   formatter: value => value.ToString()));

            yield return(DiscountAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.DiscountAmount,
                                                                                                                     fieldNumber: ++fieldNumber, fieldName: "歩引額",
                                                                                                                     accept: visitor => visitor.StandardNumber(DiscountAmountField),
                                                                                                                     formatter: value => value.ToString()));

            yield return(TargetAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.TargetAmount,
                                                                                                                   fieldNumber: ++fieldNumber, fieldName: "消込対象額",
                                                                                                                   accept: visitor => visitor.StandardNumber(TargetAmountField),
                                                                                                                   formatter: value => value.ToString()));

            yield return(InvoiceCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.InvoiceCode,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "請求番号",
                                                                                                 accept: visitor => visitor.StandardString(InvoiceCodeField)));

            yield return(BillingCategoryField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillingCategoryCodeAndName,
                                                                                                     fieldNumber: ++fieldNumber, fieldName: "請求区分",
                                                                                                     accept: visitor => visitor.StandardString(BillingCategoryField)));

            yield return(BillingDepartmentField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.DepartmentName,
                                                                                                       fieldNumber: ++fieldNumber, fieldName: "請求部門名",
                                                                                                       accept: visitor => visitor.StandardString(BillingDepartmentField)));

            yield return(BillingNote1Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note1,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote1Field)));

            yield return(BillingNote2Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note2,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考2",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote2Field)));

            yield return(BillingNote3Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note3,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考3",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote3Field)));

            yield return(BillingNote4Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note4,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考4",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote4Field)));

            yield return(BillingNote5Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note5,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考5",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote5Field)));

            yield return(BillingNote6Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note6,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考6",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote6Field)));

            yield return(BillingNote7Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note7,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考7",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote7Field)));

            yield return(BillingNote8Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Note8,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考8",
                                                                                                  accept: visitor => visitor.StandardString(BillingNote8Field)));

            yield return(BillingMemoField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.Memo,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "請求メモ",
                                                                                                 accept: visitor => visitor.StandardString(BillingMemoField)));

            yield return(BillingInputTypeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.InputTypeName,
                                                                                                      fieldNumber: ++fieldNumber, fieldName: "データ区分",
                                                                                                      accept: visitor => visitor.StandardString(BillingInputTypeField)));

            yield return(ScheduledPaymentKeyField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ScheduledPaymentKey,
                                                                                                         fieldNumber: ++fieldNumber, fieldName: "入金予定キー",
                                                                                                         accept: visitor => visitor.StandardString(ScheduledPaymentKeyField)));

            yield return(RecCheckField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.RecCheck,
                                                                                              fieldNumber: ++fieldNumber, fieldName: "消",
                                                                                              accept: visitor => visitor.StandardString(RecCheckField)));

            yield return(ReceiptPayerNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.PayerName,
                                                                                                      fieldNumber: ++fieldNumber, fieldName: "振込依頼人名",
                                                                                                      accept: visitor => visitor.StandardString(ReceiptPayerNameField)));

            yield return(ReceiptRecordAtField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.RecordedAt,
                                                                                                                       fieldNumber: ++fieldNumber, fieldName: "入金日",
                                                                                                                       accept: visitor => visitor.StandardNumber(ReceiptRecordAtField),
                                                                                                                       formatter: value => value.ToShortDateString()));

            yield return(ReceiptCategoryField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.CategoryName,
                                                                                                     fieldNumber: ++fieldNumber, fieldName: "区分",
                                                                                                     accept: visitor => visitor.StandardString(ReceiptCategoryField)));

            yield return(ReceiptAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.ReceiptAmount,
                                                                                                                    fieldNumber: ++fieldNumber, fieldName: "入金額",
                                                                                                                    accept: visitor => visitor.StandardNumber(ReceiptAmountField),
                                                                                                                    formatter: value => value.ToString()));

            yield return(ReceiptRemainAmountField = new NullableNumberFieldDefinition <ExportMatchingIndividual, decimal>(k => k.ReceiptRemainAmount,
                                                                                                                          fieldNumber: ++fieldNumber, fieldName: "入金残",
                                                                                                                          accept: visitor => visitor.StandardNumber(ReceiptRemainAmountField),
                                                                                                                          formatter: value => value.ToString()));

            yield return(NettingStateField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.NettingState,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "相殺",
                                                                                                  accept: visitor => visitor.StandardString(NettingStateField)));

            yield return(SourceBankInfoField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.SourceBank,
                                                                                                    fieldNumber: ++fieldNumber, fieldName: "仕向",
                                                                                                    accept: visitor => visitor.StandardString(SourceBankInfoField)));

            yield return(BankCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BankCode,
                                                                                              fieldNumber: ++fieldNumber, fieldName: "銀行コード",
                                                                                              accept: visitor => visitor.StandardString(BankCodeField)));

            yield return(BankNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BankName,
                                                                                              fieldNumber: ++fieldNumber, fieldName: "銀行名",
                                                                                              accept: visitor => visitor.StandardString(BankNameField)));

            yield return(BranchCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BranchCode,
                                                                                                fieldNumber: ++fieldNumber, fieldName: "支店コード",
                                                                                                accept: visitor => visitor.StandardString(BranchCodeField)));

            yield return(BranchNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BranchName,
                                                                                                fieldNumber: ++fieldNumber, fieldName: "支店名",
                                                                                                accept: visitor => visitor.StandardString(BranchNameField)));

            yield return(AccountTypeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.AccountTypeName,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "種別",
                                                                                                 accept: visitor => visitor.StandardString(AccountTypeField)));

            yield return(AccountNumberField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.AccountNumber,
                                                                                                   fieldNumber: ++fieldNumber, fieldName: "口座",
                                                                                                   accept: visitor => visitor.StandardString(AccountNumberField)));

            yield return(SectionCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.SectionCode,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "入金部門コード",
                                                                                                 accept: visitor => visitor.StandardString(SectionCodeField)));

            yield return(SectionNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.SectionName,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "入金部門名",
                                                                                                 accept: visitor => visitor.StandardString(SectionNameField)));

            yield return(ReceiptMemoField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptMemo,
                                                                                                 fieldNumber: ++fieldNumber, fieldName: "入金メモ",
                                                                                                 accept: visitor => visitor.StandardString(ReceiptMemoField)));

            yield return(ReceiptDueDateField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.ReceiptDueAt,
                                                                                                                      fieldNumber: ++fieldNumber, fieldName: "期日",
                                                                                                                      accept: visitor => visitor.StandardNumber(ReceiptDueDateField),
                                                                                                                      formatter: value => value.ToShortDateString()));

            yield return(ReceiptExcludeCategoryField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ExcludeCategoryName,
                                                                                                            fieldNumber: ++fieldNumber, fieldName: "対象外理由",
                                                                                                            accept: visitor => visitor.StandardString(ReceiptExcludeCategoryField)));

            yield return(PayerCodePrefixField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.PayerCodePrefix,
                                                                                                     fieldNumber: ++fieldNumber, fieldName: "仮想支店コード",
                                                                                                     accept: visitor => visitor.StandardString(PayerCodePrefixField)));

            yield return(PayerCodeSuffixField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.PayerCodeSuffix,
                                                                                                     fieldNumber: ++fieldNumber, fieldName: "仮想口座番号",
                                                                                                     accept: visitor => visitor.StandardString(PayerCodeSuffixField)));

            yield return(ReceiptCustomerCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptCustomerCode,
                                                                                                         fieldNumber: ++fieldNumber, fieldName: "得意先コード",
                                                                                                         accept: visitor => visitor.StandardString(ReceiptCustomerCodeField)));

            yield return(ReceiptCustomerNameField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptCustomerName,
                                                                                                         fieldNumber: ++fieldNumber, fieldName: "得意先名",
                                                                                                         accept: visitor => visitor.StandardString(ReceiptCustomerNameField)));

            yield return(ReceiptNote1Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptNote1,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考",
                                                                                                  accept: visitor => visitor.StandardString(ReceiptNote1Field)));

            yield return(ReceiptNote2Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptNote2,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考2",
                                                                                                  accept: visitor => visitor.StandardString(ReceiptNote2Field)));

            yield return(ReceiptNote3Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptNote3,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考3",
                                                                                                  accept: visitor => visitor.StandardString(ReceiptNote3Field)));

            yield return(ReceiptNote4Field = new StringFieldDefinition <ExportMatchingIndividual>(k => k.ReceiptNote4,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "備考4",
                                                                                                  accept: visitor => visitor.StandardString(ReceiptNote4Field)));

            yield return(BillNumberField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillNumber,
                                                                                                fieldNumber: ++fieldNumber, fieldName: "手形番号",
                                                                                                accept: visitor => visitor.StandardString(BillNumberField)));

            yield return(BillBankCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillBankCode,
                                                                                                  fieldNumber: ++fieldNumber, fieldName: "券面銀行コード",
                                                                                                  accept: visitor => visitor.StandardString(BillBankCodeField)));

            yield return(BillBranchCodeField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillBranchCode,
                                                                                                    fieldNumber: ++fieldNumber, fieldName: "券面支店コード",
                                                                                                    accept: visitor => visitor.StandardString(BillBranchCodeField)));

            yield return(BillDrawAtField = new NullableNumberFieldDefinition <ExportMatchingIndividual, DateTime>(k => k.BillDrawAt,
                                                                                                                  fieldNumber: ++fieldNumber, fieldName: "振出日",
                                                                                                                  accept: visitor => visitor.StandardNumber(BillDrawAtField),
                                                                                                                  formatter: value => value.ToShortDateString()));

            yield return(BillDrawerField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.BillDrawer,
                                                                                                fieldNumber: ++fieldNumber, fieldName: "振出人",
                                                                                                accept: visitor => visitor.StandardString(BillDrawerField)));

            yield return(ReceiptPayerNameRawField = new StringFieldDefinition <ExportMatchingIndividual>(k => k.PayerNameRaw,
                                                                                                         fieldNumber: ++fieldNumber, fieldName: "振込依頼人名(全て)",
                                                                                                         accept: visitor => visitor.StandardString(ReceiptPayerNameRawField)));
        }
Пример #24
0
        public MatchingHistoryFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "消込履歴データ";
            FileNameToken   = DataTypeToken;

            var fieldNumber = 1;

            MatchingAtField = new StringFieldDefinition <ExportMatchingHistory>(k => k.CreateAt)
            {
                FieldName   = "消込日時",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitMatchingAt,
            };
            SectionCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.SectionCode)
            {
                FieldName   = "入金部門コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitSectionCode,
            };
            SectionNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.SectionName)
            {
                FieldName   = "入金部門名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitSectionName,
            };
            DepartmentCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.DepartmentCode)
            {
                FieldName   = "請求部門コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitDepartmentCode,
            };
            DepartmentNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.DepartmentName)
            {
                FieldName   = "請求部門名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitDepartmentName,
            };
            CustomerCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitCustomerCode,
            };
            CustomerNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitCustomerName,
            };
            BilledAtField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BilledAt)
            {
                FieldName   = "請求日",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBilledAt,
            };
            SalesAtField = new StringFieldDefinition <ExportMatchingHistory>(k => k.SalesAt)
            {
                FieldName   = "売上日",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitSalesAt,
            };
            InvoiceCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitInvoiceCode,
            };
            BillingCategoryField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingCategory)
            {
                FieldName   = "請求区分",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBillingCategory,
            };
            CollectCategoryField = new StringFieldDefinition <ExportMatchingHistory>(k => k.CollectCategory)
            {
                FieldName   = "回収区分",
                FieldNumber = fieldNumber++,
                Required    = false,
                Accept      = VisitCollectCategory,
            };
            BilledAmountField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingAmount)
            {
                FieldName   = "請求額(税込)",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBilledAmount,
            };
            BilledAmountExcludingTaxField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingAmountExcludingTax)
            {
                FieldName   = "請求額(税抜)",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBilledAmountExcludingTax,
            };
            TaxAmountField = new StringFieldDefinition <ExportMatchingHistory>(k => k.TaxAmount)
            {
                FieldName   = "消費税",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitTaxAmount,
            };
            MatchingAmountField = new StringFieldDefinition <ExportMatchingHistory>(k => k.MatchingAmount)
            {
                FieldName   = "消込金額",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitMatchingAmount,
            };
            BilledRemainField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingRemain)
            {
                FieldName   = "請求残",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBilledRemain,
            };
            BillingNote1Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingNote1)
            {
                FieldName   = "備考",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBillingNote1,
            };
            BillingNote2Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingNote2)
            {
                FieldName   = "備考2",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBillingNote2,
            };
            BillingNote3Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingNote3)
            {
                FieldName   = "備考3",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBillingNote3,
            };
            BillingNote4Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.BillingNote4)
            {
                FieldName   = "備考4",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBillingNote4,
            };
            RecordedAtField = new StringFieldDefinition <ExportMatchingHistory>(k => k.RecordedAt)
            {
                FieldName   = "入金日",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitRecordedAt,
            };
            ReceiptIdField = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptId)
            {
                FieldName   = "入金ID",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptId,
            };
            ReceiptCategoryField = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptCategory)
            {
                FieldName   = "入金区分",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptCategory,
            };
            ReceiptAmountField = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptAmount)
            {
                FieldName   = "入金額",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptAmount,
            };
            AdvanceReceivedOccuredField = new StringFieldDefinition <ExportMatchingHistory>(k => k.AdvanceReceivedOccuredString)
            {
                FieldName   = "前受",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitAdvanceReceivedOccured,
            };
            ReceiptRemainField = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptRemain)
            {
                FieldName   = "入金残",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptRemain,
            };
            PayerNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.PayerName)
            {
                FieldName   = "振込依頼人名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitPayerName,
            };
            BankCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BankCode)
            {
                FieldName   = "銀行コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBankCode,
            };
            BankNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BankName)
            {
                FieldName   = "銀行名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBankName,
            };
            BranchCodeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BranchCode)
            {
                FieldName   = "支店コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBranchCode,
            };
            BranchNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.BranchName)
            {
                FieldName   = "支店名",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitBranchName,
            };
            AccountNumberField = new StringFieldDefinition <ExportMatchingHistory>(k => k.AccountNumber)
            {
                FieldName   = "口座番号",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitAccountNumber,
            };
            ReceiptNote1Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptNote1)
            {
                FieldName   = "備考",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptNote1,
            };
            ReceiptNote2Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptNote2)
            {
                FieldName   = "備考2",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptNote2,
            };
            ReceiptNote3Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptNote3)
            {
                FieldName   = "備考3",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptNote3,
            };
            ReceiptNote4Field = new StringFieldDefinition <ExportMatchingHistory>(k => k.ReceiptNote4)
            {
                FieldName   = "備考4",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitReceiptNote4,
            };
            VirtualBranchCode = new StringFieldDefinition <ExportMatchingHistory>(k => k.VirtualBranchCode)
            {
                FieldName   = "仮想支店コード",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitPayerCodeFirst,
            };
            VirtualAccountNumberField = new StringFieldDefinition <ExportMatchingHistory>(k => k.VirtualAccountNumber)
            {
                FieldName   = "仮想口座番号",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitPayerCodeLast,
            };
            LoginUserNameField = new StringFieldDefinition <ExportMatchingHistory>(k => k.LoginUserName)
            {
                FieldName   = "消込実行ユーザー",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitLoginUserName,
            };
            MatchingProcessTypeField = new StringFieldDefinition <ExportMatchingHistory>(k => k.MatchingProcessTypeString)
            {
                FieldName   = "消込",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitMatchingProcessType,
            };
            MatchingMemoField = new StringFieldDefinition <ExportMatchingHistory>(k => k.MatchingMemo)
            {
                FieldName   = "消込メモ",
                FieldNumber = fieldNumber++,
                Required    = true,
                Accept      = VisitMatchingMemo,
            };


            Fields.AddRange(new IFieldDefinition <ExportMatchingHistory>[] {
                MatchingAtField
                , SectionCodeField
                , SectionNameField
                , DepartmentCodeField
                , DepartmentNameField
                , CustomerCodeField
                , CustomerNameField
                , BilledAtField
                , SalesAtField
                , InvoiceCodeField
                , BillingCategoryField,
                CollectCategoryField,
                BilledAmountField
                , BilledAmountExcludingTaxField
                , TaxAmountField
                , MatchingAmountField
                , BilledRemainField
                , BillingNote1Field
                , BillingNote2Field
                , BillingNote3Field
                , BillingNote4Field
                , RecordedAtField
                , ReceiptIdField
                , ReceiptCategoryField
                , ReceiptAmountField
                , AdvanceReceivedOccuredField
                , ReceiptRemainField
                , PayerNameField
                , BankCodeField
                , BankNameField
                , BranchCodeField
                , BranchNameField
                , AccountNumberField
                , ReceiptNote1Field
                , ReceiptNote2Field
                , ReceiptNote3Field
                , ReceiptNote4Field
                , VirtualBranchCode
                , VirtualAccountNumberField
                , LoginUserNameField
                , MatchingProcessTypeField
                , MatchingMemoField
            });
        }
Пример #25
0
        public LoginUserFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "ログインユーザー";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <LoginUser, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };

            LoginUserCodeField = new StringFieldDefinition <LoginUser>(k => k.Code)
            {
                FieldName   = "ログインユーザーコード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitLoginUserCode,
            };

            LoginUserNameField = new StringFieldDefinition <LoginUser>(k => k.Name)
            {
                FieldName   = "ログインユーザー名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitLoginUserName,
            };

            DepartmentCodeField = new StandardIdToCodeFieldDefinition <LoginUser, Department>(
                k => k.DepartmentId, c => c.Id, l => l.DepartmentCode, c => c.Code)
            {
                FieldName   = "請求部門コード",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitDepartmentCode,
            };

            MailField = new StringFieldDefinition <LoginUser>(k => k.Mail)
            {
                FieldName   = "メールアドレス",
                FieldNumber = 5,
                Accept      = VisitMail,
            };

            MenuLevelField = new NumberFieldDefinition <LoginUser, int>(k => k.MenuLevel)
            {
                FieldName   = "権限レベル",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitMenuLevelField,
                Format      = value => value.ToString(),
            };

            FunctionLevelField = new NumberFieldDefinition <LoginUser, int>(k => k.FunctionLevel)
            {
                FieldName   = "セキュリティ",
                FieldNumber = 7,
                Required    = true,
                Accept      = VisitFunctionLevelField,
                Format      = value => value.ToString(),
            };

            UseClientField = new NumberFieldDefinition <LoginUser, int>(k => k.UseClient)
            {
                FieldName   = "V-ONE利用",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitUseClientField,
                Format      = value => value.ToString(),
            };

            UseWebViewerField = new NumberFieldDefinition <LoginUser, int>(k => k.UseWebViewer)
            {
                FieldName   = "WebViewer利用",
                FieldNumber = 9,
                Required    = true,
                Accept      = VisitUseWebViewerField,
                Format      = value => value.ToString(),
            };

            StaffCodeField = new StandardNullableIdToCodeFieldDefinition <LoginUser, Staff>(
                k => k.AssignedStaffId, c => c.Id, l => l.StaffCode, c => c.Code)
            {
                FieldName   = "営業担当者コード",
                FieldNumber = 10,
                Required    = false,
                Accept      = VisitStaffCode,
            };

            InitialPasswordField = new StringFieldDefinition <LoginUser>(k => k.InitialPassword)
            {
                FieldName   = "初回パスワード",
                FieldNumber = 11,
                Required    = false,
                Accept      = VisitInitialPassword,
            };

            Fields.AddRange(new IFieldDefinition <LoginUser>[] {
                CompanyIdField, LoginUserCodeField, LoginUserNameField, DepartmentCodeField, MailField,
                MenuLevelField, UseClientField, UseWebViewerField, FunctionLevelField, StaffCodeField,
                InitialPasswordField
            });
            KeyFields.AddRange(new IFieldDefinition <LoginUser>[]
            {
                LoginUserCodeField,
            });
        }
Пример #26
0
        public BillingAgingListDetailFileDefinition(DataExpression expression, ColumnNameSetting ColumnNameSetting)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "請求残高年齢表";
            FileNameToken   = DataTypeToken;

            CustomerCodeField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCustomerCodeField,
            };
            CustomerNameField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCustomerNameField,
            };
            CurrencyCodeField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.CurrencyCode)
            {
                FieldName   = "通貨コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCurrencyCodeField,
            };
            BilledAtField = new NumberFieldDefinition <BillingAgingListDetail, DateTime>(
                k => k.BilledAt)
            {
                FieldName   = "請求日",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitBilledAtField,
                Format      = value => value.ToShortDateString(),
            };
            DueAtField = new NumberFieldDefinition <BillingAgingListDetail, DateTime>(
                k => k.DueAt)
            {
                FieldName   = "入金予定日",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitDueAtField,
                Format      = value => value.ToShortDateString(),
            };
            SalesAtField = new NumberFieldDefinition <BillingAgingListDetail, DateTime>(
                k => k.SalesAt)
            {
                FieldName   = "売上日",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitSalesAtField,
                Format      = value => value.ToShortDateString(),
            };
            BillingAmountField = new NumberFieldDefinition <BillingAgingListDetail, decimal>(k => k.BillingAmount)
            {
                FieldName   = "請求金額",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitBillingAmountField,
                Format      = value => value.ToString(),
            };
            RemainAmountField = new NumberFieldDefinition <BillingAgingListDetail, decimal>(k => k.RemainAmount)
            {
                FieldName   = "請求残",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitRemainAmountField,
                Format      = value => value.ToString(),
            };
            StaffCodeField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.StaffCode)
            {
                FieldName   = "担当者コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitStaffCodeField,
            };
            StaffNameField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.StaffName)
            {
                FieldName   = "担当者名",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitStaffNameField,
            };
            InvoiceCodeField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitInvoiceCodeField,
            };

            NoteField = new StringFieldDefinition <BillingAgingListDetail>(
                k => k.Note)
            {
                FieldName   = ColumnNameSetting.DisplayColumnName,
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitNoteField,
            };
            Fields.AddRange(new IFieldDefinition <BillingAgingListDetail>[] {
                CustomerCodeField, CustomerNameField, CurrencyCodeField, BilledAtField, DueAtField
                , SalesAtField, BillingAmountField, RemainAmountField, StaffCodeField, StaffNameField
                , InvoiceCodeField, NoteField
            });
        }
        private IEnumerable <IFieldDefinition <Reminder> > InitializeFields(string baseDateCaption)
        {
            yield return(BaseDateField = new NumberFieldDefinition <Reminder, DateTime>(k => k.BaseDate,
                                                                                        "基準日", 1, accept: x => x.StandardNumber(BaseDateField), formatter: value => value.ToShortDateString()));

            yield return(CustomerCodeField = new StringFieldDefinition <Reminder>(k => k.CustomerCode,
                                                                                  "得意先コード", 2, accept: x => x.StandardString(CustomerCodeField)));

            yield return(CustomerNameField = new StringFieldDefinition <Reminder>(k => k.CustomerName,
                                                                                  "得意先名", 3, accept: x => x.StandardString(CustomerNameField)));

            yield return(CalculateBaseDateField = new NumberFieldDefinition <Reminder, DateTime>(k => k.CalculateBaseDate,
                                                                                                 baseDateCaption, 4, accept: x => x.StandardNumber(CalculateBaseDateField), formatter: value => value.ToShortDateString()));

            yield return(DetailCountField = new NumberFieldDefinition <Reminder, int>(k => k.DetailCount,
                                                                                      "明細件数", 5, accept: x => x.StandardNumber(DetailCountField), formatter: value => value.ToString()));

            yield return(CurrencyCodeField = new StringFieldDefinition <Reminder>(k => k.CurrencyCode,
                                                                                  "通貨コード", 6, accept: x => x.StandardString(CurrencyCodeField)));

            yield return(RemainAmountField = new NumberFieldDefinition <Reminder, decimal>(k => k.RemainAmount,
                                                                                           "請求残", 7, accept: x => x.StandardNumber(RemainAmountField), formatter: value => value.ToString()));

            yield return(ReminderAmountField = new NullableNumberFieldDefinition <Reminder, decimal>(k => k.ReminderAmount,
                                                                                                     "滞留金額", 8, accept: x => x.StandardNumber(ReminderAmountField), formatter: value => value.ToString()));

            yield return(ArrearsInterestField = new NullableNumberFieldDefinition <Reminder, decimal>(k => k.ArrearsInterest,
                                                                                                      "延滞利息", 9, accept: x => x.StandardNumber(ArrearsInterestField), formatter: value => value.ToString()));

            yield return(ArrearsDaysField = new NullableNumberFieldDefinition <Reminder, int>(k => k.ArrearsDays,
                                                                                              "滞留日数", 10, accept: x => x.StandardNumber(ArrearsDaysField), formatter: value => value.ToString()));

            yield return(StatusField = new StringFieldDefinition <Reminder>(k => k.StatusCodeAndName,
                                                                            "ステータス", 11, accept: x => x.StandardString(StatusField)));

            yield return(MemoField = new StringFieldDefinition <Reminder>(k => k.Memo,
                                                                          "対応記録", 12, accept: x => x.StandardString(MemoField)));

            yield return(ClosingAtField = new NumberFieldDefinition <Reminder, DateTime>(k => k.ClosingAt,
                                                                                         "請求締日", 13, accept: x => x.StandardNumber(ClosingAtField), formatter: value => value.ToShortDateString()));

            yield return(InvoiceCodeField = new StringFieldDefinition <Reminder>(k => k.InvoiceCode,
                                                                                 "請求書番号", 14, accept: x => x.StandardString(InvoiceCodeField)));

            yield return(CollectCategoryField = new StringFieldDefinition <Reminder>(k => k.CollectCategoryCodeAndName,
                                                                                     "回収区分", 15, accept: x => x.StandardString(CollectCategoryField)));

            yield return(DepartmentCodeField = new StringFieldDefinition <Reminder>(k => k.DepartmentCode,
                                                                                    "請求部門コード", 16, accept: x => x.StandardString(DepartmentCodeField)));

            yield return(DepartmentNameField = new StringFieldDefinition <Reminder>(k => k.DepartmentName,
                                                                                    "請求部門名", 17, accept: x => x.StandardString(DepartmentNameField)));

            yield return(StaffCodeField = new StringFieldDefinition <Reminder>(k => k.StaffCode,
                                                                               "担当者コード", 18, accept: x => x.StandardString(StaffCodeField)));

            yield return(StaffNameField = new StringFieldDefinition <Reminder>(k => k.StaffName,
                                                                               "担当者名", 19, accept: x => x.StandardString(StaffNameField)));

            yield return(DestinationCodeField = new StringFieldDefinition <Reminder>(k => k.DestinationCode,
                                                                                     "送付先コード", 20, accept: x => x.StandardString(DestinationCodeField)));
        }
Пример #28
0
        private IEnumerable <IFieldDefinition <ReminderHistory> > InitializeFields(List <GridSetting> GridSettingInfo)
        {
            var index = 0;

            foreach (var setting in GridSettingInfo.Where(x => x.DisplayWidth > 0))
            {
                index++;

                if (setting.ColumnName == nameof(ReminderHistory.CustomerCodeDisplay))
                {
                    yield return(CustomerCodeDisplayField = new StringFieldDefinition <ReminderHistory>(k => k.CustomerCodeDisplay,
                                                                                                        setting.ColumnNameJp, index, accept: x => x.StandardString(CustomerCodeDisplayField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.CustomerNameDisplay))
                {
                    yield return(CustomerNameDisplayField = new StringFieldDefinition <ReminderHistory>(k => k.CustomerNameDisplay,
                                                                                                        setting.ColumnNameJp, index, accept: x => x.StandardString(CustomerNameDisplayField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.CalculateBaseDateDisplay))
                {
                    yield return(CalculateBaseDateDisplayField = new NullableNumberFieldDefinition <ReminderHistory, DateTime>(k => k.CalculateBaseDateDisplay,
                                                                                                                               setting.ColumnNameJp, index, accept: x => x.StandardNumber(CalculateBaseDateDisplayField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));
                }
                if (setting.ColumnName == nameof(ReminderHistory.CurrencyCode))
                {
                    yield return(CurrencyCodeField = new StringFieldDefinition <ReminderHistory>(k => k.CurrencyCode,
                                                                                                 setting.ColumnNameJp, index, accept: x => x.StandardString(CurrencyCodeField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.ArrearsDaysDisplay))
                {
                    yield return(ArrearsDaysDisplayField = new NullableNumberFieldDefinition <ReminderHistory, int>(k => k.ArrearsDaysDisplay,
                                                                                                                    setting.ColumnNameJp, index, accept: x => x.StandardNumber(ArrearsDaysDisplayField), formatter: value => (value.ToString())));
                }
                if (setting.ColumnName == nameof(ReminderHistory.ReminderAmount))
                {
                    yield return(ReminderAmountField = new NullableNumberFieldDefinition <ReminderHistory, decimal>(k => k.ReminderAmount,
                                                                                                                    setting.ColumnNameJp, index, accept: x => x.StandardNumber(ReminderAmountField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.InputTypeName))
                {
                    yield return(InputTypeNameField = new StringFieldDefinition <ReminderHistory>(k => k.InputTypeName
                                                                                                  , setting.ColumnNameJp, index, accept: x => x.StandardString(InputTypeNameField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.StatusCodeAndName))
                {
                    yield return(StatusCodeAndNameField = new StringFieldDefinition <ReminderHistory>(k => k.StatusCodeAndName,
                                                                                                      setting.ColumnNameJp, index, accept: x => x.StandardString(StatusCodeAndNameField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.Memo))
                {
                    yield return(MemoField = new StringFieldDefinition <ReminderHistory>(k => k.Memo,
                                                                                         setting.ColumnNameJp, index, accept: x => x.StandardString(MemoField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.OutputFlagName))
                {
                    yield return(OutputFlagNameField = new StringFieldDefinition <ReminderHistory>(k => k.OutputFlagName,
                                                                                                   setting.ColumnNameJp, index, accept: x => x.StandardString(OutputFlagNameField)));
                }
                if (setting.ColumnName == nameof(ReminderHistory.CreateAt))
                {
                    yield return(CreateAtField = new NumberFieldDefinition <ReminderHistory, DateTime>(k => k.CreateAt,
                                                                                                       setting.ColumnNameJp, index, accept: x => x.StandardNumber(CreateAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToString("yyyy/MM/dd HH:mm:ss")));
                }
                if (setting.ColumnName == nameof(ReminderHistory.CreateByName))
                {
                    yield return(CreateByNameField = new StringFieldDefinition <ReminderHistory>(k => k.CreateByName,
                                                                                                 setting.ColumnNameJp, index, accept: x => x.StandardString(CreateByNameField)));
                }
            }
        }
Пример #29
0
        public StaffFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "営業担当者";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <Staff, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };

            StaffCodeField = new StringFieldDefinition <Staff>(k => k.Code)
            {
                FieldName   = "営業担当者コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitStaffCode,
            };

            StaffNameField = new StringFieldDefinition <Staff>(k => k.Name)
            {
                FieldName   = "営業担当者名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitStaffName,
            };

            DepartmentIdField = new StandardIdToCodeFieldDefinition <Staff, Department>(
                k => k.DepartmentId, c => c.Id,
                k => k.DepartmentCode, c => c.Code)
            {
                FieldName   = "請求部門コード",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitDepartmentId,
            };

            MailField = new StringFieldDefinition <Staff>(k => k.Mail)
            {
                FieldName   = "メールアドレス",
                FieldNumber = 5,
                Accept      = VisitStaffMail,
            };

            TelField = new StringFieldDefinition <Staff>(k => k.Tel)
            {
                FieldName   = "電話番号",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitStaffTel,
            };

            FaxField = new StringFieldDefinition <Staff>(k => k.Fax)
            {
                FieldName   = "FAX番号",
                FieldNumber = 7,
                Required    = false,
                Accept      = VisitStaffFax,
            };

            Fields.AddRange(new IFieldDefinition <Staff>[] {
                CompanyIdField, StaffCodeField, StaffNameField, DepartmentIdField, MailField, TelField, FaxField
            });
            KeyFields.AddRange(new IFieldDefinition <Staff>[]
            {
                StaffCodeField,
            });
        }
Пример #30
0
        private IEnumerable <IFieldDefinition <MatchingJournalizing> > InitializeFields()
        {
            yield return(SlipNumberField = new NumberFieldDefinition <MatchingJournalizing, long>(k => k.SlipNumber,
                                                                                                  "取引No", 1, accept: x => x.StandardNumber(SlipNumberField), formatter: value => value.ToString()));

            yield return(RecordedAtField = new NumberFieldDefinition <MatchingJournalizing, DateTime>(k => k.RecordedAt,
                                                                                                      "取引日", 2, accept: x => x.StandardNumber(RecordedAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));

            yield return(DebitAccountTitleNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitAccountTitleName,
                                                                                                       "借方勘定科目", 3, accept: x => x.StandardString(DebitAccountTitleNameField)));

            yield return(DebitSubCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitSubCode,
                                                                                              "借方補助科目", 4, accept: x => x.StandardString(DebitSubCodeField)));

            yield return(DebitTaxCategoryField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitTaxCategory,
                                                                                                  "借方税区分", 5, accept: x => x.StandardString(DebitTaxCategoryField)));

            yield return(DebitDepartmentNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.DebitDepartmentName,
                                                                                                     "借方部門", 6, accept: x => x.StandardString(DebitDepartmentNameField)));

            yield return(DebitAmountField = new NumberFieldDefinition <MatchingJournalizing, decimal>(k => k.DebitAmount,
                                                                                                      "借方金額(円)", 7, accept: x => x.StandardNumber(DebitAmountField), formatter: value => value.ToString()));

            yield return(DebitTaxAmountField = new NumberFieldDefinition <MatchingJournalizing, int>(k => k.DebitTaxAmount,
                                                                                                     "借方税額", 8, accept: x => x.StandardNumber(DebitTaxAmountField), formatter: value => value.ToString()));

            yield return(CreditAccountTitleNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditAccountTitleName,
                                                                                                        "貸方勘定科目", 9, accept: x => x.StandardString(CreditAccountTitleNameField)));

            yield return(CreditSubCodeField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditSubCode,
                                                                                               "貸方補助科目", 10, accept: x => x.StandardString(CreditSubCodeField)));

            yield return(CreditTaxCategoryField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditTaxCategory,
                                                                                                   "貸方税区分", 11, accept: x => x.StandardString(CreditTaxCategoryField)));

            yield return(CreditDepartmentNameField = new StringFieldDefinition <MatchingJournalizing>(k => k.CreditDepartmentName,
                                                                                                      "貸方部門", 12, accept: x => x.StandardString(CreditDepartmentNameField)));

            yield return(CreditAmountField = new NumberFieldDefinition <MatchingJournalizing, decimal>(k => k.CreditAmount,
                                                                                                       "貸方金額(円)", 13, accept: x => x.StandardNumber(CreditAmountField), formatter: value => value.ToString()));

            yield return(CreditTaxAmountField = new NumberFieldDefinition <MatchingJournalizing, int>(k => k.CreditTaxAmount,
                                                                                                      "貸方税額", 14, accept: x => x.StandardNumber(CreditTaxAmountField), formatter: value => value.ToString()));

            yield return(NoteField = new StringFieldDefinition <MatchingJournalizing>(k => k.Note,
                                                                                      "摘要", 15, accept: x => x.StandardString(NoteField)));

            yield return(MatchingMemoField = new StringFieldDefinition <MatchingJournalizing>(k => k.MatchingMemo,
                                                                                              "仕訳メモ", 16, accept: x => x.StandardString(MatchingMemoField)));

            yield return(MFTagField = new StringFieldDefinition <MatchingJournalizing>(k => k.MFTag,
                                                                                       "タグ", 17, accept: x => x.StandardString(MFTagField)));

            yield return(MFJournalizingTypeField = new StringFieldDefinition <MatchingJournalizing>(k => k.MFJournalizingType,
                                                                                                    "MF仕訳タイプ", 18, accept: x => x.StandardString(MFJournalizingTypeField)));

            yield return(ClosingAdjustmentField = new StringFieldDefinition <MatchingJournalizing>(k => k.ClosingAdjustment,
                                                                                                   "決算整理仕訳", 19, accept: x => x.StandardString(ClosingAdjustmentField)));

            yield return(CreateAtField = new NumberFieldDefinition <MatchingJournalizing, DateTime>(k => k.CreateAt,
                                                                                                    "作成日時", 20, accept: x => x.StandardNumber(CreateAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToString("yyyy/MM/dd HH:mm")));

            yield return(MFUpdateAtField = new NumberFieldDefinition <MatchingJournalizing, DateTime>(k => k.MFUpdateAt,
                                                                                                      "最終更新日時", 21, accept: x => x.StandardNumber(MFUpdateAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToString("yyyy/MM/dd HH:mm")));
        }