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));
 }
Esempio n. 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)));
        }
Esempio n. 3
0
        public HolidayCalendarFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "カレンダー";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <HolidayCalendar, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            HolidayField = new NumberFieldDefinition <HolidayCalendar, DateTime>(k => k.Holiday)
            {
                FieldName   = "休業日",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitHolidayField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            Fields.AddRange(new IFieldDefinition <HolidayCalendar>[] {
                CompanyIdField, HolidayField
            });
            KeyFields.AddRange(new IFieldDefinition <HolidayCalendar>[]
            {
                HolidayField,
            });
        }
        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()));
        }
Esempio n. 5
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));
        }
Esempio n. 8
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)));
        }
Esempio n. 9
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
            });
        }
        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)));
        }
Esempio n. 11
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")));
        }
        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
            });
        }
        // <===

        public TaskScheduleHistoryFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "タイムスケジューラーログ";
            FileNameToken   = DataTypeToken;

            StartAtField = new NumberFieldDefinition <TaskScheduleHistory, DateTime>(h => h.StartAt)
            {
                FieldName   = "開始日時",
                FieldNumber = 1,
                Required    = true,
                Accept      = VisitStartAt,
                Format      = value => value.ToString(),
            };

            EndAtField = new NumberFieldDefinition <TaskScheduleHistory, DateTime>(h => h.EndAt)
            {
                FieldName   = "終了日時",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitEndAt,
                Format      = value => value.ToString(),
            };

            ImportTypeField = new NumberFieldDefinition <TaskScheduleHistory, int>(h => h.ImportType)
            {
                FieldName   = "種別",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitImportType,
                Format      = value => { /* ★ */ currentImportType = value; return(ImportType[value]); },
            };

            ImportSubTypeField = new NumberFieldDefinition <TaskScheduleHistory, int>(h => h.ImportSubType)
            {
                FieldName   = "取込パターン",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitImportSubType,
                Format      = value => ImportTypeToImportSubType[/* ★ */ currentImportType][value],
            };

            ResultField = new NumberFieldDefinition <TaskScheduleHistory, int>(h => h.Result)
            {
                FieldName   = "実行結果",
                FieldNumber = 5,
                Required    = true,
                Accept      = VisitResult,
                Format      = value => Result[value],
            };

            ErrorsField = new StringFieldDefinition <TaskScheduleHistory>(h => h.Errors)
            {
                FieldName   = "エラーログ",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitErrors,
            };

            Fields.AddRange(new IFieldDefinition <TaskScheduleHistory>[] {
                StartAtField,
                EndAtField,
                ImportTypeField,
                ImportSubTypeField, // 追加順序をImportTypeFieldの後にする必要あり
                ResultField,
                ErrorsField,
            });
        }
Esempio n. 14
0
        public MatchingBillingFilterFileDefinition(DataExpression applicationControl) 
            : base(applicationControl)
        {
            //請求データ
            StartLineNumber = 1;
            DataTypeToken = "個別消込";
            FileNameToken = DataTypeToken;

            CurrencyCodeField = new StringFieldDefinition<Billing>(k => k.CurrencyCode)
            {
                FieldName = "通貨コード",
                FieldNumber = 1,
                Required = false,
                Accept = VisitCurrencyCodeField,
            };
            BillCheckField = new StringFieldDefinition<Billing>(k => k.BillCheck)
            {
                FieldName = "消",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillCheckField,
            };
            CustomerCodeField = new StringFieldDefinition<Billing>(k => k.CustomerCode)
            {
                FieldName = "得意先コード",
                FieldNumber = 1,
                Required = false,
                Accept = VisitCustomerCodeField,
            };
            CustomerNameField = new StringFieldDefinition<Billing>(k => k.CustomerName)
            {
                FieldName = "得意先名",
                FieldNumber = 1,
                Required = false,
                Accept = VisitCustomerNameField,
            };
            BilledAtField = new NumberFieldDefinition<Billing, DateTime>(k => k.BilledAt)
            {
                FieldName = "請求日",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBilledAtField,
                Format = value => value.ToShortDateString(),
            };
            DueAtField = new NumberFieldDefinition<Billing, DateTime>(k => k.DueAt)
            {
                FieldName = "予定日",
                FieldNumber = 1,
                Required = false,
                Accept = VisitDueAtField,
                Format = value => value.ToShortDateString(),
            };
            BillingAmountField = new NumberFieldDefinition<Billing, decimal>(k => k.BillingAmount)
            {
                FieldName = "請求額",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingAmountField,
                Format = value => value.ToString(),
            };
            RemainAmountField = new NumberFieldDefinition<Billing, decimal>(k => k.RemainAmount)
            {
                FieldName = "請求残",
                FieldNumber = 1,
                Required = false,
                Accept = VisitRemainAmountField,
                Format = value => value.ToString(),
            };
            TargetAmountField = new NumberFieldDefinition<Billing,decimal>(k => k.TargetAmount)
            {
                FieldName = "消込対象額",
                FieldNumber = 1,
                Required = false,
                Accept = VisitTargetAmountField,
                Format = value => value.ToString(),
            };
            DiscountAmountField = new NumberFieldDefinition<Billing, decimal>(k => k.DiscountAmount)
            {
                FieldName = "歩引額",
                FieldNumber = 1,
                Required = false,
                Accept = VisitDiscountAmountField,
                Format = value => value.ToString(),
            };
            InvoiceCodeField = new StringFieldDefinition<Billing>(k => k.InvoiceCode)
            {
                FieldName = "請求番号",
                FieldNumber = 1,
                Required = false,
                Accept = VisitInvoiceCode,
            };
            BillingCategoryField = new StringFieldDefinition<Billing>(k => k.BillingCategoryCodeAndName)
            {
                FieldName = "請求区分",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingCategoryField,
            };
            BillingDepartmentField = new StringFieldDefinition<Billing>(k => k.DepartmentName)
            {
                FieldName = "請求部門名",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingDepartmentField,
            };
            BillingNote1Field = new StringFieldDefinition<Billing>(k => k.Note1)
            {
                FieldName = "備考",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingNote1Field,
            };
            BillingNote2Field = new StringFieldDefinition<Billing>(k => k.Note2)
            {
                FieldName = "備考2",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingNote2Field,
            };
            BillingNote3Field = new StringFieldDefinition<Billing>(k => k.Note3)
            {
                FieldName = "備考3",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingNote3Field,
            };
            BillingNote4Field = new StringFieldDefinition<Billing>(k => k.Note4)
            {
                FieldName = "備考4",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingNote4Field,
            };
            BillingMemoField = new StringFieldDefinition<Billing>(k => k.Memo)
            {
                FieldName = "請求メモ",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingMemoField,
            };
            BillingInputTypeField = new StringFieldDefinition<Billing>(k => k.InputTypeName)
            {
                FieldName = "データ区分",
                FieldNumber = 1,
                Required = false,
                Accept = VisitBillingInputTypeField,
            };
            ScheduledPaymentKeyField = new StringFieldDefinition<Billing>(k => k.ScheduledPaymentKey)
            {
                FieldName = "入金予定キー",
                FieldNumber = 1,
                Required = false,
                Accept = VisitScheduledPaymentKeyField,
            };

            Fields.AddRange(new IFieldDefinition<Billing>[]
           {
                CurrencyCodeField
                ,BillCheckField
                ,CustomerCodeField
                ,CustomerNameField
                ,BilledAtField
                ,DueAtField
                ,BillingAmountField
                ,RemainAmountField
                ,TargetAmountField
                ,DiscountAmountField
                ,InvoiceCodeField
                ,BillingCategoryField
                ,BillingDepartmentField
                ,BillingNote1Field
                ,BillingNote2Field
                ,BillingNote3Field
                ,BillingNote4Field
                ,BillingMemoField
                ,BillingInputTypeField
                ,ScheduledPaymentKeyField
           });
        }
Esempio n. 15
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)));
                }
            }
        }
        public MatchingSequentialFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken = "一括消込チェックリスト";
            FileNameToken = DataTypeToken;

            CheckedField = new NumberFieldDefinition<Collation, bool>(
                k => k.Checked)
            {
                FieldName = "一括",
                FieldNumber = 1,
                Required = false,
                Accept = VisitChecked,
                Format = value => (value == false) ? "  " : "レ",
            };
            CurrencyCodeField = new StringFieldDefinition<Collation>(
                k => k.CurrencyCode )
            {
                FieldName = "通貨",
                FieldNumber = 2,
                Required = false,
                Accept = VisitCurrencyCode,
            };
            CustomerCodeField = new StringFieldDefinition<Collation>(
                k => k.DispCustomerCode)
            {
                FieldName = "得意先コード",
                FieldNumber = 3,
                Required = false,
                Accept = VisitCustomerCode,
            };
            CustomerNameField = new StringFieldDefinition<Collation>(
               k => k.DispCustomerName)
            {
                FieldName = "得意先名(代表者)",
                FieldNumber = 4,
                Required = false,
                Accept = VisitCustomerName,
            };
            BillingCountField = new NullableNumberFieldDefinition<Collation, int>(
              k => k.DispBillingCount)
            {
                FieldName = "件数",
                FieldNumber = 5,
                Required = false,
                Accept = VisitBillingCount,
                Format = value => (value == 0) ? " " : value.ToString(""),
            };
            BillingAmountField = new NullableNumberFieldDefinition<Collation, decimal>(
             k => k.DispBillingAmount)
            {
                FieldName = "金額",
                FieldNumber = 6,
                Required = false,
                Accept = VisitBillingAmount,
                Format = value => (value == 0) ? " " : value.ToString(""),
            };
            PayerNameField = new StringFieldDefinition<Collation>(
            k => k.PayerName)
            {
                FieldName = "振込依頼人名",
                FieldNumber = 7,
                Required = false,
                Accept = VisitPayerName,
            };
            ReceiptCountField = new NullableNumberFieldDefinition<Collation, int>(
            k => k.DispReceiptCount)
            {
                FieldName = "件数",
                FieldNumber = 8,
                Required = false,
                Accept = VisitReceiptCount,
                Format = value => (value == 0) ? " " : value.ToString(""),
            };
            ReceiptAmountField = new NullableNumberFieldDefinition<Collation, decimal>(
            k => k.DispReceiptAmount)
            {
                FieldName = "金額",
                FieldNumber = 9,
                Required = false,
                Accept = VisitReceiptAmount,
                Format = value => (value == 0) ? " " : value.ToString(""),
            };
            ShareTransferFee = new StringFieldDefinition<Collation>(
            k => k.DispShareTransferFee)
            {
                FieldName = "手数科",
                FieldNumber = 10,
                Required = false,
                Accept = VisitShareTransferfee,
            };
            Different = new NullableNumberFieldDefinition<Collation, decimal>(
            k => k.DispDifferent)
            {
                FieldName = "差額",
                FieldNumber = 11,
                Required = false,
                Accept = VisitDifferent,
                Format = value => (value == 0) ? " " : value.ToString(""),
            };
            DisDispAdvanceReceivedCountField = new StringFieldDefinition<Collation>(
            k => k.DispAdvanceReceivedCount)
            {
                FieldName = "前受",
                FieldNumber = 12,
                Required = false,
                Accept = VisitorDisDispAdvanceReceivedCount,
            };
            Fields.AddRange(new IFieldDefinition<Collation>[] {
                       CheckedField,CurrencyCodeField, CustomerCodeField,
                       CustomerNameField, BillingCountField, BillingAmountField,
                       PayerNameField, ReceiptCountField, ReceiptAmountField,
                       ShareTransferFee, Different, DisDispAdvanceReceivedCountField});
        }
Esempio n. 17
0
        public CustomerDiscountFileDefinition(DataExpression applicationControl)
            : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "得意先";
            FileNameToken   = DataTypeToken + "マスター";

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

            // FieldNumber 2 得意先コード
            CustomerIdField = new StandardIdToCodeFieldDefinition <CustomerDiscount, Customer>(
                cd => cd.CustomerId, c => c.Id, cd => cd.CustomerCode, c => c.Code)
            {
                FieldName   = "得意先コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitCustomerId,
            };

            // FieldNumber 3 得意先名
            CustomerNameField = new StringFieldDefinition <CustomerDiscount>(cd => cd.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 3,
                Required    = false,
                Accept      = VisitCustomerName,
            };

            // FieldNumber 4 最低実行金額
            MinValueField = new NumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.MinValue)
            {
                FieldName   = "最低実行金額",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitMinValue,
                Format      = value => value.ToString(),
            };

            // FieldNumber 5 歩引率1
            Rate1Field = new NullableNumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.Rate1)
            {
                FieldName   = "歩引率1",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitRate1,
                Format      = value => value.ToString(),
            };

            // FieldNumber 6 端数処理1
            RoundingMode1Field = new NumberFieldDefinition <CustomerDiscount, int>(cd => cd.RoundingMode1)
            {
                FieldName   = "端数処理1",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitRoundingMode1,
                Format      = value => value.ToString(),
            };

            // FieldNumber 7 部門コード1
            DepartmentId1Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, Department>(
                cd => cd.DepartmentId1, d => d.Id, null, d => d.Code)
            {
                FieldName   = "部門コード1",
                FieldNumber = 7,
                Required    = false,
                Accept      = VisitDepartmentId1,
            };

            // FieldNumber 8 科目コード1
            AccountTitleId1Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, AccountTitle>(
                cd => cd.AccountTitleId1, a => a.Id, null, a => a.Code)
            {
                FieldName   = "科目コード1",
                FieldNumber = 8,
                Required    = false,
                Accept      = VisitAccountTitleId1,
            };

            // FieldNumber 9 補助コード1
            SubCode1Field = new StringFieldDefinition <CustomerDiscount>(cd => cd.SubCode1)
            {
                FieldName   = "補助コード1",
                FieldNumber = 9,
                Required    = false,
                Accept      = VisitSubCode1,
            };

            // FieldNumber 10 歩引率2
            Rate2Field = new NullableNumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.Rate2)
            {
                FieldName   = "歩引率2",
                FieldNumber = 10,
                Required    = false,
                Accept      = VisitRate2,
                Format      = value => value.ToString(),
            };

            // FieldNumber 11 端数処理2
            RoundingMode2Field = new NumberFieldDefinition <CustomerDiscount, int>(cd => cd.RoundingMode2)
            {
                FieldName   = "端数処理2",
                FieldNumber = 11,
                Required    = true,
                Accept      = VisitRoundingMode2,
                Format      = value => value.ToString(),
            };

            // FieldNumber 12 部門コード2
            DepartmentId2Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, Department>(
                cd => cd.DepartmentId2, d => d.Id, null, d => d.Code)
            {
                FieldName   = "部門コード2",
                FieldNumber = 12,
                Required    = false,
                Accept      = VisitDepartmentId2,
            };

            // FieldNumber 13 科目コード2
            AccountTitleId2Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, AccountTitle>(
                cd => cd.AccountTitleId2, a => a.Id, null, a => a.Code)
            {
                FieldName   = "科目コード2",
                FieldNumber = 13,
                Required    = false,
                Accept      = VisitAccountTitleId2,
            };

            // FieldNumber 14 補助コード2
            SubCode2Field = new StringFieldDefinition <CustomerDiscount>(cd => cd.SubCode2)
            {
                FieldName   = "補助コード2",
                FieldNumber = 14,
                Required    = false,
                Accept      = VisitSubCode2,
            };

            // FieldNumber 15 歩引率3
            Rate3Field = new NullableNumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.Rate3)
            {
                FieldName   = "歩引率3",
                FieldNumber = 15,
                Required    = false,
                Accept      = VisitRate3,
                Format      = value => value.ToString(),
            };

            // FieldNumber 16 端数処理3
            RoundingMode3Field = new NumberFieldDefinition <CustomerDiscount, int>(cd => cd.RoundingMode3)
            {
                FieldName   = "端数処理3",
                FieldNumber = 16,
                Required    = true,
                Accept      = VisitRoundingMode3,
                Format      = value => value.ToString(),
            };

            // FieldNumber 17 部門コード3
            DepartmentId3Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, Department>(
                cd => cd.DepartmentId3, d => d.Id, null, d => d.Code)
            {
                FieldName   = "部門コード3",
                FieldNumber = 17,
                Required    = false,
                Accept      = VisitDepartmentId3,
            };

            // FieldNumber 18 科目コード3
            AccountTitleId3Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, AccountTitle>(
                cd => cd.AccountTitleId3, a => a.Id, null, a => a.Code)
            {
                FieldName   = "科目コード3",
                FieldNumber = 18,
                Required    = false,
                Accept      = VisitAccountTitleId3,
            };

            // FieldNumber 19 補助コード3
            SubCode3Field = new StringFieldDefinition <CustomerDiscount>(cd => cd.SubCode3)
            {
                FieldName   = "補助コード3",
                FieldNumber = 19,
                Required    = false,
                Accept      = VisitSubCode3,
            };

            // FieldNumber 20 歩引率4
            Rate4Field = new NullableNumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.Rate4)
            {
                FieldName   = "歩引率4",
                FieldNumber = 20,
                Required    = false,
                Accept      = VisitRate4,
                Format      = value => value.ToString(),
            };

            // FieldNumber 21 端数処理4
            RoundingMode4Field = new NumberFieldDefinition <CustomerDiscount, int>(cd => cd.RoundingMode4)
            {
                FieldName   = "端数処理4",
                FieldNumber = 21,
                Required    = true,
                Accept      = VisitRoundingMode4,
                Format      = value => value.ToString(),
            };

            // FieldNumber 22 部門コード4
            DepartmentId4Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, Department>(
                cd => cd.DepartmentId4, d => d.Id, null, d => d.Code)
            {
                FieldName   = "部門コード4",
                FieldNumber = 22,
                Required    = false,
                Accept      = VisitDepartmentId4,
            };

            // FieldNumber 23 科目コード4
            AccountTitleId4Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, AccountTitle>(
                cd => cd.AccountTitleId4, a => a.Id, null, a => a.Code)
            {
                FieldName   = "科目コード4",
                FieldNumber = 23,
                Required    = false,
                Accept      = VisitAccountTitleId4,
            };

            // FieldNumber 24 補助コード4
            SubCode4Field = new StringFieldDefinition <CustomerDiscount>(cd => cd.SubCode4)
            {
                FieldName   = "補助コード4",
                FieldNumber = 24,
                Required    = false,
                Accept      = VisitSubCode4,
            };

            // FieldNumber 25 歩引率5
            Rate5Field = new NullableNumberFieldDefinition <CustomerDiscount, decimal>(cd => cd.Rate5)
            {
                FieldName   = "歩引率5",
                FieldNumber = 25,
                Required    = false,
                Accept      = VisitRate5,
                Format      = value => value.ToString(),
            };

            // FieldNumber 26 端数処理5
            RoundingMode5Field = new NumberFieldDefinition <CustomerDiscount, int>(cd => cd.RoundingMode5)
            {
                FieldName   = "端数処理5",
                FieldNumber = 26,
                Required    = true,
                Accept      = VisitRoundingMode5,
                Format      = value => value.ToString(),
            };

            // FieldNumber 27 部門コード5
            DepartmentId5Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, Department>(
                cd => cd.DepartmentId5, d => d.Id, null, d => d.Code)
            {
                FieldName   = "部門コード5",
                FieldNumber = 27,
                Required    = false,
                Accept      = VisitDepartmentId5,
            };

            // FieldNumber 28 科目コード5
            AccountTitleId5Field = new NullableForeignKeyFieldDefinition <CustomerDiscount, int, AccountTitle>(
                cd => cd.AccountTitleId5, a => a.Id, null, a => a.Code)
            {
                FieldName   = "科目コード5",
                FieldNumber = 28,
                Required    = false,
                Accept      = VisitAccountTitleId5,
            };

            // FieldNumber 29 補助コード5
            SubCode5Field = new StringFieldDefinition <CustomerDiscount>(cd => cd.SubCode5)
            {
                FieldName   = "補助コード5",
                FieldNumber = 29,
                Required    = false,
                Accept      = VisitSubCode5,
            };

            Fields.AddRange(new IFieldDefinition <CustomerDiscount>[] {
                CompanyIdField
                , CustomerIdField
                , CustomerNameField
                , MinValueField
                , Rate1Field
                , RoundingMode1Field
                , DepartmentId1Field
                , AccountTitleId1Field
                , SubCode1Field
                , Rate2Field
                , RoundingMode2Field
                , DepartmentId2Field
                , AccountTitleId2Field
                , SubCode2Field
                , Rate3Field
                , RoundingMode3Field
                , DepartmentId3Field
                , AccountTitleId3Field
                , SubCode3Field
                , Rate4Field
                , RoundingMode4Field
                , DepartmentId4Field
                , AccountTitleId4Field
                , SubCode4Field
                , Rate5Field
                , RoundingMode5Field
                , DepartmentId5Field
                , AccountTitleId5Field
                , SubCode5Field
            });
            KeyFields.AddRange(new IFieldDefinition <CustomerDiscount>[]
            {
                CustomerIdField,
            });
        }
Esempio n. 18
0
        }                                                                          //63

        public CustomerFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "得意先";
            FileNameToken   = DataTypeToken + "マスター";

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

            //2
            CustomerCodeField = new StringFieldDefinition <Customer>(k => k.Code)
            {
                FieldName   = "得意先コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitCustomerCode,
            };

            //3
            CustomerNameField = new StringFieldDefinition <Customer>(k => k.Name)
            {
                FieldName   = "得意先名",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitCustomerName,
            };

            //4
            CustomerKanaField = new StringFieldDefinition <Customer>(k => k.Kana)
            {
                FieldName   = "得意先名カナ",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitCustomerKana,
            };

            //5
            ExclusiveBankCodeField = new StringFieldDefinition <Customer>(k => k.ExclusiveBankCode)
            {
                FieldName   = "専用銀行コード",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitExclusiveBankCode,
            };

            //6
            ExclusiveBankNameField = new StringFieldDefinition <Customer>(k => k.ExclusiveBankName)
            {
                FieldName   = "専用銀行名",
                FieldNumber = 6,
                Required    = false,
                Accept      = VisitExclusiveBankName,
            };

            //7
            ExclusiveBranchCodeField = new StringFieldDefinition <Customer>(k => k.ExclusiveBranchCode)
            {
                FieldName   = "専用支店コード",
                FieldNumber = 7,
                Required    = false,
                Accept      = VisitExclusiveBranchCode,
            };

            //8
            ExclusiveBranchNameField = new StringFieldDefinition <Customer>(k => k.ExclusiveBranchName)
            {
                FieldName   = "専用支店名",
                FieldNumber = 8,
                Required    = false,
                Accept      = VisitExclusiveBranchName,
            };

            //9
            ExclusiveAccountNumberField = new StringFieldDefinition <Customer>(k => k.ExclusiveAccountNumber)
            {
                FieldName   = "専用入金口座番号",
                FieldNumber = 9,
                Required    = false,
                Accept      = VisitExclusiveAccountNumber,
            };

            //10
            ExclusiveAccountTypeIdField = new NullableNumberFieldDefinition <Customer, int>(k => k.ExclusiveAccountTypeId)
            {
                FieldName   = "預金種別",
                FieldNumber = 10,
                Required    = true,
                Accept      = VisitExclusiveAccountTypeId,
                Format      = value => value.ToString(),
            };

            //11
            ShareTransferFeeField = new NumberFieldDefinition <Customer, int>(k => k.ShareTransferFee)
            {
                FieldName   = "手数料負担区分",
                FieldNumber = 11,
                Required    = true,
                Accept      = VisitShareTransferFee,
                Format      = value => value.ToString(),
            };

            //12
            CreditLimitField = new NumberFieldDefinition <Customer, decimal>(k => k.CreditLimit)
            {
                FieldName   = "与信限度額",
                FieldNumber = 12,
                Required    = false,
                Accept      = VisitCreditLimit,
                Format      = value => value.ToString("#"),
            };

            //13
            ClosingDayField = new NumberFieldDefinition <Customer, int>(k => k.ClosingDay)
            {
                FieldName   = "締日",
                FieldNumber = 13,
                Required    = true,
                Accept      = VisitClosingDay,
                Format      = value => value.ToString("00"),
            };

            //14
            CollectCategoryIdField = new StandardIdToCodeFieldDefinition <Customer, Category>(
                k => k.CollectCategoryId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "回収方法",
                FieldNumber = 14,
                Required    = true,
                Accept      = VisitCollectCategoryId,
            };

            //15
            CollectOffsetMonthField = new NumberFieldDefinition <Customer, int>(k => k.CollectOffsetMonth)
            {
                FieldName   = "回収予定(月)",
                FieldNumber = 15,
                Required    = true,
                Accept      = VisitCollectOffsetMonth,
                Format      = value => value.ToString(),
            };

            //16
            CollectOffsetDayField = new NumberFieldDefinition <Customer, int>(k => k.CollectOffsetDay)
            {
                FieldName   = "回収予定(日)",
                FieldNumber = 16,
                Required    = true,
                Accept      = VisitCollectOffsetDay,
                Format      = value => value.ToString(),
            };

            //17
            StaffCodeField = new StandardIdToCodeFieldDefinition <Customer, Staff>(
                k => k.StaffId, c => c.Id, l => l.StaffCode, c => c.Code)
            {
                FieldName   = "営業担当者",
                FieldNumber = 17,
                Required    = true,
                Accept      = VisitStaffCodeField,
            };

            //18
            IsParentField = new NumberFieldDefinition <Customer, int>(k => k.IsParent)
            {
                FieldName   = "債権代表者フラグ",
                FieldNumber = 18,
                Required    = true,
                Accept      = VisitIsParent,
                Format      = value => value.ToString(),
            };

            //19
            PostalCodeField = new StringFieldDefinition <Customer>(k => k.PostalCode)
            {
                FieldName   = "郵便番号",
                FieldNumber = 19,
                Required    = false,
                Accept      = VisitPostalCode,
            };
            //20
            Address1Field = new StringFieldDefinition <Customer>(k => k.Address1)
            {
                FieldName   = "住所1",
                FieldNumber = 20,
                Required    = false,
                Accept      = VisitAddress1Field,
            };
            //21
            Address2Field = new StringFieldDefinition <Customer>(k => k.Address2)
            {
                FieldName   = "住所2",
                FieldNumber = 21,
                Required    = false,
                Accept      = VisitAddress2Field,
            };

            //22
            TelField = new StringFieldDefinition <Customer>(k => k.Tel)
            {
                FieldName   = "TEL番号",
                FieldNumber = 22,
                Required    = false,
                Accept      = VisitTel,
            };

            //23
            FaxField = new StringFieldDefinition <Customer>(k => k.Fax)
            {
                FieldName   = "FAX番号",
                FieldNumber = 23,
                Required    = false,
                Accept      = VisitFax,
            };

            //24
            CustomerStaffNameField = new StringFieldDefinition <Customer>(k => k.CustomerStaffName)
            {
                FieldName   = "相手先担当者名",
                FieldNumber = 24,
                Required    = false,
                Accept      = VisitCustomerStaffName,
            };

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

            //26
            UseFeeLearningField = new NumberFieldDefinition <Customer, int>(k => k.UseFeeLearning)
            {
                FieldName   = "手数料自動学習",
                FieldNumber = 26,
                Required    = true,
                Accept      = VisitUseFeeLearning,
                Format      = value => value.ToString(),
            };

            //27
            SightOfBillField = new NullableNumberFieldDefinition <Customer, int>(k => k.SightOfBill)
            {
                FieldName   = "回収サイト",
                FieldNumber = 27,
                Required    = true,
                Accept      = VisitSightOfBill,
                Format      = value => value.ToString(),
            };

            //28
            DensaiCodeField = new StringFieldDefinition <Customer>(k => k.DensaiCode)
            {
                FieldName   = "電子手形用企業コード",
                FieldNumber = 28,
                Required    = false,
                Accept      = VisitDensaiCode,
            };

            //29
            CreditCodeField = new StringFieldDefinition <Customer>(k => k.CreditCode)
            {
                FieldName   = "信用調査用企業コード",
                FieldNumber = 29,
                Required    = false,
                Accept      = VisitCreditCode,
            };

            //30
            CreditRankField = new StringFieldDefinition <Customer>(k => k.CreditRank)
            {
                FieldName   = "与信ランク",
                FieldNumber = 30,
                Required    = false,
                Accept      = VisitCreditRank,
            };

            //31
            TransferBankCodeField = new StringFieldDefinition <Customer>(k => k.TransferBankCode)
            {
                FieldName   = "口座振替用銀行コード",
                FieldNumber = 31,
                Required    = false,
                Accept      = VisitTransferBankCode,
            };

            //32
            TransferBankNameField = new StringFieldDefinition <Customer>(k => k.TransferBankName)
            {
                FieldName   = "口座振替用銀行名",
                FieldNumber = 32,
                Required    = false,
                Accept      = VisitTransferBankName,
            };

            //33
            TransferBranchCodeField = new StringFieldDefinition <Customer>(k => k.TransferBranchCode)
            {
                FieldName   = "口座振替用支店コード",
                FieldNumber = 33,
                Required    = false,
                Accept      = VisitTransferBranchCode,
            };

            //34
            TransferBranchNameField = new StringFieldDefinition <Customer>(k => k.TransferBranchName)
            {
                FieldName   = "口座振替用支店名",
                FieldNumber = 34,
                Required    = false,
                Accept      = VisitTransferBranchName,
            };
            //35
            TransferAccountNumberField = new StringFieldDefinition <Customer>(k => k.TransferAccountNumber)
            {
                FieldName   = "口座振替用口座番号",
                FieldNumber = 35,
                Required    = false,
                Accept      = VisitTransferAccountNumber,
            };

            //36
            TransferAccountTypeIdField = new NullableNumberFieldDefinition <Customer, int>(k => k.TransferAccountTypeId)
            {
                FieldName   = "口座振替用預金種別",
                FieldNumber = 36,
                Required    = true,
                Accept      = VisitTransferAccountTypeId,
                Format      = value => value.ToString(),
            };

            //37
            TransferCustomerCodeField = new StringFieldDefinition <Customer>(k => k.TransferCustomerCode)
            {
                FieldName   = "口座振替用顧客コード",
                FieldNumber = 37,
                Required    = false,
                Accept      = VisitTransferCustomerCode,
            };

            //38
            TransferNewCodeField = new StringFieldDefinition <Customer>(k => k.TransferNewCode)
            {
                FieldName   = "口座振替用新規コード",
                FieldNumber = 38,
                Required    = false,
                Accept      = VisitTransferNewCode,
            };

            //39
            TransferAccountNameField = new StringFieldDefinition <Customer>(k => k.TransferAccountName)
            {
                FieldName   = "口座振替用預金者名",
                FieldNumber = 39,
                Required    = false,
                Accept      = VisitTransferAccountName,
            };

            //40
            ThresholdValueField = new NumberFieldDefinition <Customer, decimal>(k => k.ThresholdValue)
            {
                FieldName   = "約定金額",
                FieldNumber = 40,
                Required    = true,
                Accept      = VisitThresholdValue,
                Format      = value => value.ToString("#"),
            };

            //41
            LessThanCollectCategoryIdField = new StandardIdToCodeFieldDefinition <Customer, Category>(
                k => k.LessThanCollectCategoryId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "約定金額未満",
                FieldNumber = 41,
                Required    = true,
                Accept      = VisitLessThanCollectCategoryId,
            };

            //42
            GreaterThanCollectCategoryId1Field = new StandardIdToCodeFieldDefinition <Customer, Category>(
                k => k.GreaterThanCollectCategoryId1, c => c.Id, null, c => c.Code)
            {
                FieldName   = "約定金額以上1",
                FieldNumber = 42,
                Required    = true,
                Accept      = VisitGreaterThanCollectCategoryId1,
            };

            //43
            GreaterThanRate1Field = new NullableNumberFieldDefinition <Customer, decimal>(k => k.GreaterThanRate1)
            {
                FieldName   = "分割1",
                FieldNumber = 43,
                Required    = true,
                Accept      = VisitGreaterThanRate1,
                Format      = value => value.ToString(),
            };

            //44
            GreaterThanRoundingMode1Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanRoundingMode1)
            {
                FieldName   = "端数1",
                FieldNumber = 44,
                Required    = true,
                Accept      = VisitGreaterThanRoundingMode1,
                Format      = value => value.ToString(),
            };

            //45
            GreaterThanSightOfBill1Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanSightOfBill1)
            {
                FieldName   = "回収サイト1",
                FieldNumber = 45,
                Required    = true,
                Accept      = VisitGreaterThanSightOfBill1,
                Format      = value => value.ToString(),
            };

            //46
            GreaterThanCollectCategoryId2Field = new StandardNullableIdToCodeFieldDefinition <Customer, Category>(
                k => k.GreaterThanCollectCategoryId2, c => c.Id, null, c => c.Code)
            {
                FieldName   = "約定金額以上2",
                FieldNumber = 46,
                Required    = false,
                Accept      = VisitGreaterThanCollectCategoryId2,
            };

            //47
            GreaterThanRate2Field = new NullableNumberFieldDefinition <Customer, decimal>(k => k.GreaterThanRate2)
            {
                FieldName   = "分割2",
                FieldNumber = 47,
                Required    = true,
                Accept      = VisitGreaterThanRate2,
                Format      = value => value.ToString(),
            };

            //48
            GreaterThanRoundingMode2Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanRoundingMode2)
            {
                FieldName   = "端数2",
                FieldNumber = 48,
                Required    = true,
                Accept      = VisitGreaterThanRoundingMode2,
                Format      = value => value.ToString(),
            };

            //49
            GreaterThanSightOfBill2Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanSightOfBill2)
            {
                FieldName   = "回収サイト2",
                FieldNumber = 49,
                Required    = true,
                Accept      = VisitGreaterThanSightOfBill2,
                Format      = value => value.ToString(),
            };

            //50
            GreaterThanCollectCategoryId3Field = new StandardNullableIdToCodeFieldDefinition <Customer, Category>(
                k => k.GreaterThanCollectCategoryId3, c => c.Id, null, c => c.Code)
            {
                FieldName   = "約定金額以上3",
                FieldNumber = 50,
                Required    = false,
                Accept      = VisitGreaterThanCollectCategoryId3,
            };

            //51
            GreaterThanRate3Field = new NullableNumberFieldDefinition <Customer, decimal>(k => k.GreaterThanRate3)
            {
                FieldName   = "分割3",
                FieldNumber = 51,
                Required    = true,
                Accept      = VisitGreaterThanRate3,
                Format      = value => value.ToString(),
            };

            //52
            GreaterThanRoundingMode3Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanRoundingMode3)
            {
                FieldName   = "端数3",
                FieldNumber = 52,
                Required    = true,
                Accept      = VisitGreaterThanRoundingMode3,
                Format      = value => value.ToString(),
            };

            //53
            GreaterThanSightOfBill3Field = new NullableNumberFieldDefinition <Customer, int>(k => k.GreaterThanSightOfBill3)
            {
                FieldName   = "回収サイト3",
                FieldNumber = 53,
                Required    = true,
                Accept      = VisitGreaterThanSightOfBill3,
                Format      = value => value.ToString(),
            };

            //54
            UseKanaLearningField = new NumberFieldDefinition <Customer, int>(k => k.UseKanaLearning)
            {
                FieldName   = "カナ自動学習",
                FieldNumber = 54,
                Required    = true,
                Accept      = VisitUseKanaLearning,
                Format      = value => value.ToString(),
            };

            //55
            HolidayFlagField = new NumberFieldDefinition <Customer, int>(k => k.HolidayFlag)
            {
                FieldName   = "休業日設定",
                FieldNumber = 55,
                Required    = true,
                Accept      = VisitHolidayFlag,
                Format      = value => value.ToString(),
            };

            //56
            UseFeeToleranceField = new NumberFieldDefinition <Customer, int>(k => k.UseFeeTolerance)
            {
                FieldName   = "手数料誤差利用",
                FieldNumber = 56,
                Required    = true,
                Accept      = VisitUseFeeTolerance,
                Format      = value => value.ToString(),
            };

            //57
            PrioritizeMatchingIndividuallyField = new NumberFieldDefinition <Customer, int>(k => k.PrioritizeMatchingIndividually)
            {
                FieldName   = "一括消込対象外",
                FieldNumber = 57,
                Required    = true,
                Accept      = VisitPrioritizeMatchingIndividually,
                Format      = value => value.ToString(),
            };

            //58
            CollationKeyField = new StringFieldDefinition <Customer>(k => k.CollationKey)
            {
                FieldName   = "照合番号",
                FieldNumber = 58,
                Required    = false,
                Accept      = VisitCollationKey,
            };

            //60
            ExcludeInvoicePublishField = new NumberFieldDefinition <Customer, int>(k => k.ExcludeInvoicePublish)
            {
                FieldName   = "請求書発行対象外",
                FieldNumber = 60,
                Required    = true,
                Accept      = VisitExcludeInvoicePublish,
                Format      = value => value.ToString(),
            };

            //61
            ExcludeReminderPublishField = new NumberFieldDefinition <Customer, int>(k => k.ExcludeReminderPublish)
            {
                FieldName   = "督促状発行対象外",
                FieldNumber = 61,
                Required    = true,
                Accept      = VisitExcludeReminderPublish,
                Format      = value => value.ToString(),
            };

            //62
            DestinationDepartmentNameField = new StringFieldDefinition <Customer>(k => k.DestinationDepartmentName)
            {
                FieldName   = "相手先部署",
                FieldNumber = 62,
                Required    = false,
                Accept      = VisitDestinationDepartmentName,
            };

            //63
            HonorificField = new StringFieldDefinition <Customer>(k => k.Honorific)
            {
                FieldName   = "敬称",
                FieldNumber = 63,
                Required    = false,
                Accept      = VisitHonorific,
            };

            Fields.AddRange(new IFieldDefinition <Customer>[] {
                CompanyIdField, CustomerCodeField, CustomerNameField, CustomerKanaField, ExclusiveBankCodeField,

                ExclusiveBankNameField, ExclusiveBranchCodeField, ExclusiveBranchNameField, ExclusiveAccountNumberField, ExclusiveAccountTypeIdField

                , ShareTransferFeeField, CreditLimitField, ClosingDayField, CollectCategoryIdField, CollectOffsetMonthField

                , CollectOffsetDayField, StaffCodeField, IsParentField, PostalCodeField, Address1Field,

                Address2Field, TelField, FaxField, CustomerStaffNameField, NoteField,

                UseFeeLearningField, SightOfBillField, DensaiCodeField, CreditCodeField, CreditRankField,

                TransferBankCodeField, TransferBankNameField, TransferBranchCodeField, TransferBranchNameField, TransferAccountNumberField,

                TransferAccountTypeIdField, TransferCustomerCodeField, TransferNewCodeField, TransferAccountNameField,

                ThresholdValueField, LessThanCollectCategoryIdField, GreaterThanCollectCategoryId1Field, GreaterThanRate1Field,

                GreaterThanRoundingMode1Field, GreaterThanSightOfBill1Field, GreaterThanCollectCategoryId2Field, GreaterThanRate2Field, GreaterThanRoundingMode2Field

                , GreaterThanSightOfBill2Field, GreaterThanCollectCategoryId3Field, GreaterThanRate3Field, GreaterThanRoundingMode3Field, GreaterThanSightOfBill3Field

                , UseKanaLearningField, HolidayFlagField, UseFeeToleranceField, PrioritizeMatchingIndividuallyField, CollationKeyField, ExcludeInvoicePublishField, ExcludeReminderPublishField

                , DestinationDepartmentNameField, HonorificField
            });

            KeyFields.AddRange(new IFieldDefinition <Customer>[]
            {
                CustomerCodeField,
            });
        }
        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,
            });
        }
Esempio n. 20
0
        public BillingAgingListFileDefinition(DataExpression expression,
                                              string Remain0Header,
                                              string Remain1Header,
                                              string Remain2Header,
                                              string Remain3Header)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "請求残高年齢表";
            FileNameToken   = DataTypeToken;

            Fields.Add(DepartmentCodeField = new StringFieldDefinition <BillingAgingList>(k => k.DepartmentCode,
                                                                                          fieldName: "請求部門コード",
                                                                                          accept: VisitDepartmentCodeField));
            Fields.Add(DepartmentNameField = new StringFieldDefinition <BillingAgingList>(k => k.DepartmentName,
                                                                                          fieldName: "請求部門名",
                                                                                          accept: VisitDepartmentNameField));
            Fields.Add(StaffCodeField = new StringFieldDefinition <BillingAgingList>(k => k.StaffCode,
                                                                                     fieldName: "担当者コード",
                                                                                     accept: VisitStaffCodeField));
            Fields.Add(StaffNameField = new StringFieldDefinition <BillingAgingList>(k => k.StaffName,
                                                                                     fieldName: "担当者名",
                                                                                     accept: VisitStaffNameField));
            Fields.Add(CustomerCodeField = new StringFieldDefinition <BillingAgingList>(k => k.CustomerCode,
                                                                                        fieldName: "得意先コード",
                                                                                        accept: VisitCustomerCodeField));

            Fields.Add(CustomerNameField = new StringFieldDefinition <BillingAgingList>(k => k.CustomerName,
                                                                                        fieldName: "得意先名",
                                                                                        accept: VisitCustomerNameField));

            Fields.Add(LastMonthRemainField = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.LastMonthRemain,
                                                                                                            fieldName: "前月請求残",
                                                                                                            accept: VisitLastMonthRemainField,
                                                                                                            formatter: value => value.ToString()));

            Fields.Add(CurrenctMonthSaleField = new NumberFieldDefinition <BillingAgingList, decimal>(k => k.CurrentMonthSales,
                                                                                                      fieldName: "当月売上高",
                                                                                                      accept: VisitCurrentMonthSaleField,
                                                                                                      formatter: value => value.ToString()));

            Fields.Add(CurrentMonthReceiptField = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.CurrentMonthReceipt,
                                                                                                                fieldName: "当月入金",
                                                                                                                accept: VisitCurrentMonthReceiptField,
                                                                                                                formatter: value => value.ToString()));

            Fields.Add(CurrentMonthMatchingField = new NumberFieldDefinition <BillingAgingList, decimal>(k => k.CurrentMonthMatching,
                                                                                                         fieldName: "当月消込",
                                                                                                         accept: VisitCurrentMonthMatchingField,
                                                                                                         formatter: value => value.ToString()));

            Fields.Add(CurrenttMonthRemainField = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.CurrentMonthRemain,
                                                                                                                fieldName: "当月請求残",
                                                                                                                accept: VisitCurrentMonthRemainField,
                                                                                                                formatter: value => value.ToString()));

            Fields.Add(MonthlyRemain0Field = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.MonthlyRemain0,
                                                                                                           fieldName: Remain0Header,
                                                                                                           accept: VisitMonthlyRemain0Field,
                                                                                                           formatter: value => value.ToString()));

            Fields.Add(MonthlyRemain1Field = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.MonthlyRemain1,
                                                                                                           fieldName: Remain1Header,
                                                                                                           accept: VisitMonthlyRemain1Field,
                                                                                                           formatter: value => value.ToString()));

            Fields.Add(MonthlyRemain2Field = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.MonthlyRemain2,
                                                                                                           fieldName: Remain2Header,
                                                                                                           accept: VisitMonthlyRemain2Field,
                                                                                                           formatter: value => value.ToString()));

            Fields.Add(MonthlyRemain3Field = new NullableNumberFieldDefinition <BillingAgingList, decimal>(k => k.MonthlyRemain3,
                                                                                                           fieldName: Remain3Header,
                                                                                                           accept: VisitMonthlyRemain3Field,
                                                                                                           formatter: value => value.ToString()));
        }
        public ScheduledPaymentListFileDefinition(DataExpression applicationControl, List <ColumnNameSetting> ColumnNameSettingInfo)
            : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金予定明細表";
            FileNameToken   = DataTypeToken;

            BaseDateField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.BaseDate)
            {
                FieldName   = "基準日",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitBaseDate,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            IDField = new NumberFieldDefinition <ScheduledPaymentList, int>(k => k.Id)
            {
                FieldName   = "請求ID",
                FieldNumber = 2,
                Required    = false,
                Accept      = VisitId,
                Format      = value => value.ToString(),
            };
            CustomerCodeField = new StringFieldDefinition <ScheduledPaymentList>(k => k.CustomerCode)
            {
                FieldName   = "得意先コード",
                FieldNumber = 3,
                Required    = false,
                Accept      = VisitCustomerCode,
            };
            CustomerNameField = new StringFieldDefinition <ScheduledPaymentList>(k => k.CustomerName)
            {
                FieldName   = "得意先名",
                FieldNumber = 4,
                Required    = false,
                Accept      = VisitCustomerName,
            };
            BilledAtField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.BilledAt)
            {
                FieldName   = "請求日",
                FieldNumber = 5,
                Required    = true,
                Accept      = VisitBilledAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            SalesAtField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.SalesAt)
            {
                FieldName   = "売上日",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitSalesAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            ClosingAtField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.ClosingAt)
            {
                FieldName   = "請求締日",
                FieldNumber = 7,
                Required    = true,
                Accept      = VisitClosingAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            DueAtField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.DueAt)
            {
                FieldName   = "入金予定日",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitDueAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            OriginalDueAtField = new NullableNumberFieldDefinition <ScheduledPaymentList, DateTime>(k => k.OriginalDueAt)
            {
                FieldName   = "当初予定日",
                FieldNumber = 9,
                Required    = true,
                Accept      = VisitOriginalDueAtField,
                Format      = value => (value == DateTime.MinValue) ? "" : value.ToShortDateString(),
            };
            CurrencyCodeField = new StringFieldDefinition <ScheduledPaymentList>(k => k.CurrencyCode)
            {
                FieldName   = "通貨コード",
                FieldNumber = 10,
                Required    = false,
                Accept      = VisitCurrencyCode,
            };
            AmountField = new NumberFieldDefinition <ScheduledPaymentList, decimal>(k => k.RemainAmount)
            {
                FieldName   = "回収予定金額",
                FieldNumber = 11,
                Required    = true,
                Accept      = VisitAmount,
                Format      = value => value.ToString(),
            };
            DelayDivisionField = new StringFieldDefinition <ScheduledPaymentList>(k => k.DelayDivision)
            {
                FieldName   = "遅延",
                FieldNumber = 12,
                Required    = false,
                Accept      = VisitDelayDivisionField,
            };
            CodeAndNameField = new StringFieldDefinition <ScheduledPaymentList>(k => k.CodeAndName)
            {
                FieldName   = "回収区分",
                FieldNumber = 13,
                Required    = false,
                Accept      = VisitCodeAndNameField,
            };
            InvoiceCodeField = new StringFieldDefinition <ScheduledPaymentList>(k => k.InvoiceCode)
            {
                FieldName   = "請求書番号",
                FieldNumber = 14,
                Required    = false,
                Accept      = VisitInvoiceCodeField,
            };
            DepartmentCodeField = new StringFieldDefinition <ScheduledPaymentList>(k => k.DepartmentCode)
            {
                FieldName   = "請求部門コード",
                FieldNumber = 15,
                Required    = false,
                Accept      = VisitDepartmentCodeField,
            };
            DepartmentNameField = new StringFieldDefinition <ScheduledPaymentList>(k => k.DepartmentName)
            {
                FieldName   = "請求部門名",
                FieldNumber = 16,
                Required    = false,
                Accept      = VisitDepartmentNameField,
            };
            StaffCodeField = new StringFieldDefinition <ScheduledPaymentList>(k => k.StaffCode)
            {
                FieldName   = "担当者コード",
                FieldNumber = 17,
                Required    = false,
                Accept      = VisitStaffCodeField,
            };
            StaffNameField = new StringFieldDefinition <ScheduledPaymentList>(k => k.StaffName)
            {
                FieldName   = "担当者名",
                FieldNumber = 18,
                Required    = false,
                Accept      = VisitStaffNameField,
            };
            foreach (ColumnNameSetting gs in ColumnNameSettingInfo)
            {
                switch (gs.ColumnName)
                {
                case "Note1":
                    Note1Field = new StringFieldDefinition <ScheduledPaymentList>(k => k.Note1)
                    {
                        FieldName   = gs.DisplayColumnName,
                        FieldNumber = 19,
                        Required    = false,
                        Accept      = VisitNote1Field,
                    };
                    break;

                case "Note2":
                    Note2Field = new StringFieldDefinition <ScheduledPaymentList>(k => k.Note2)
                    {
                        FieldName   = gs.DisplayColumnName,
                        FieldNumber = 20,
                        Required    = false,
                        Accept      = VisitNote2Field,
                    };
                    break;

                case "Note3":
                    Note3Field = new StringFieldDefinition <ScheduledPaymentList>(k => k.Note3)
                    {
                        FieldName   = gs.DisplayColumnName,
                        FieldNumber = 21,
                        Required    = false,
                        Accept      = VisitNote3Field,
                    };
                    break;

                case "Note4":
                    Note4Field = new StringFieldDefinition <ScheduledPaymentList>(k => k.Note4)
                    {
                        FieldName   = gs.DisplayColumnName,
                        FieldNumber = 22,
                        Required    = false,
                        Accept      = VisitNote4Field,
                    };
                    break;
                }
            }

            Fields.AddRange(new IFieldDefinition <ScheduledPaymentList>[] {
                BaseDateField, IDField, CustomerCodeField, CustomerNameField, BilledAtField, SalesAtField, ClosingAtField,
                DueAtField, OriginalDueAtField, CurrencyCodeField, AmountField, DelayDivisionField,
                CodeAndNameField, InvoiceCodeField, DepartmentCodeField, DepartmentNameField, StaffCodeField, StaffNameField, Note1Field,
                Note2Field, Note3Field, Note4Field
            });
        }
Esempio n. 22
0
        public CurrencyFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "通貨";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <Currency, Company>(
                k => k.CompanyId, c => c.Id, null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            CurrencyCodeField = new StringFieldDefinition <Currency>(k => k.Code)
            {
                FieldName   = "通貨コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitCurrencyCode,
            };
            CurrencyNameField = new StringFieldDefinition <Currency>(k => k.Name)
            {
                FieldName   = "名称",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitCurrencyName,
            };
            CurrencySymbolField = new StringFieldDefinition <Currency>(k => k.Symbol)
            {
                FieldName   = "単位",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitCurrencySymbol,
            };
            CurrencyPrecisionField = new NumberFieldDefinition <Currency, int>(k => k.Precision)
            {
                FieldName   = "小数点以下桁数",
                FieldNumber = 5,
                Required    = true,
                Accept      = VisitCurrencyPrecision,
                Format      = value => value.ToString(),
            };
            CurrencyDisplayOrderField = new NumberFieldDefinition <Currency, int>(k => k.DisplayOrder)
            {
                FieldName   = "表示順番",
                FieldNumber = 6,
                Required    = true,
                Accept      = VisitCurrencyDisplayOrder,
                Format      = value => value.ToString(),
            };
            CurrencyNoteField = new StringFieldDefinition <Currency>(k => k.Note)
            {
                FieldName   = "備考",
                FieldNumber = 7,
                Required    = false,
                Accept      = VisitCurrencyNote,
            };
            CurrencyToleranceField = new NumberFieldDefinition <Currency, decimal>(k => k.Tolerance)
            {
                FieldName   = "手数料誤差金額",
                FieldNumber = 8,
                Required    = true,
                Accept      = VisitCurrencyTolerance,
                Format      = value => value.ToString(),
            };

            Fields.AddRange(new IFieldDefinition <Currency>[] {
                CompanyIdField, CurrencyCodeField, CurrencyNameField, CurrencySymbolField, CurrencyPrecisionField
                , CurrencyDisplayOrderField, CurrencyNoteField, CurrencyToleranceField
            });
            KeyFields.AddRange(new IFieldDefinition <Currency>[]
            {
                CurrencyCodeField,
            });
        }
Esempio n. 23
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,
            });
        }
Esempio n. 24
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);
            }
        }
Esempio n. 25
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)));
        }
Esempio n. 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
            });
        }
Esempio n. 27
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,
            });
        }
        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)));
                }
            }
        }
Esempio n. 29
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);
            }
        }
Esempio n. 30
0
        private IEnumerable <IFieldDefinition <BillingInvoice> > InitializeFields(List <GridSetting> GridSettingInfo)
        {
            var index = 0;

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

                if (setting.ColumnName == nameof(BillingInvoice.Checked))
                {
                    yield return(CheckedField = new NumberFieldDefinition <BillingInvoice, int>(k => k.Checked,
                                                                                                setting.ColumnNameJp, index, accept: x => x.StandardNumber(CheckedField), formatter: value => value.ToString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.InvoiceTemplateCode))
                {
                    yield return(InvoiceTemplateCodeField = new StringFieldDefinition <BillingInvoice>(k => k.InvoiceTemplateCode,
                                                                                                       setting.ColumnNameJp, index, accept: x => x.StandardString(InvoiceTemplateCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.InvoiceCode))
                {
                    yield return(InvoiceCodeField = new StringFieldDefinition <BillingInvoice>(k => k.InvoiceCode,
                                                                                               setting.ColumnNameJp, index, accept: x => x.StandardString(InvoiceCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.DetailsCount))
                {
                    yield return(DetailsCountField = new NumberFieldDefinition <BillingInvoice, int>(k => k.DetailsCount,
                                                                                                     setting.ColumnNameJp, index, accept: x => x.StandardNumber(DetailsCountField), formatter: value => value.ToString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.CustomerCode))
                {
                    yield return(CustomerCodeField = new StringFieldDefinition <BillingInvoice>(k => k.CustomerCode,
                                                                                                setting.ColumnNameJp, index, accept: x => x.StandardString(CustomerCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.CustomerName))
                {
                    yield return(CustomerNameField = new StringFieldDefinition <BillingInvoice>(k => k.CustomerName,
                                                                                                setting.ColumnNameJp, index, accept: x => x.StandardString(CustomerNameField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.AmountSum))
                {
                    yield return(AmountSumField = new NumberFieldDefinition <BillingInvoice, decimal>(k => k.AmountSum,
                                                                                                      setting.ColumnNameJp, index, accept: x => x.StandardNumber(AmountSumField), formatter: value => value.ToString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.RemainAmountSum))
                {
                    yield return(RemainAmountSumField = new NumberFieldDefinition <BillingInvoice, decimal>(k => k.RemainAmountSum,
                                                                                                            setting.ColumnNameJp, index, accept: x => x.StandardNumber(RemainAmountSumField), formatter: value => value.ToString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.CollectCategoryCodeAndNeme))
                {
                    yield return(CollectCategoryCodeAndNemeField = new StringFieldDefinition <BillingInvoice>(k => k.CollectCategoryCodeAndNeme,
                                                                                                              setting.ColumnNameJp, index, accept: x => x.StandardString(CollectCategoryCodeAndNemeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.ClosingAt))
                {
                    yield return(ClosingAtField = new NumberFieldDefinition <BillingInvoice, DateTime>(k => k.ClosingAt,
                                                                                                       setting.ColumnNameJp, index, accept: x => x.StandardNumber(ClosingAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.BilledAt))
                {
                    yield return(BilledAtField = new NumberFieldDefinition <BillingInvoice, DateTime>(k => k.BilledAt,
                                                                                                      setting.ColumnNameJp, index, accept: x => x.StandardNumber(BilledAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.DepartmentCode))
                {
                    yield return(DepartmentCodeField = new StringFieldDefinition <BillingInvoice>(k => k.DepartmentCode,
                                                                                                  setting.ColumnNameJp, index, accept: x => x.StandardString(DepartmentCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.DepartmentName))
                {
                    yield return(DepartmentNameField = new StringFieldDefinition <BillingInvoice>(k => k.DepartmentName,
                                                                                                  setting.ColumnNameJp, index, accept: x => x.StandardString(DepartmentNameField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.StaffCode))
                {
                    yield return(StaffCodeField = new StringFieldDefinition <BillingInvoice>(k => k.StaffCode,
                                                                                             setting.ColumnNameJp, index, accept: x => x.StandardString(StaffCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.StaffName))
                {
                    yield return(StaffNameField = new StringFieldDefinition <BillingInvoice>(k => k.StaffName,
                                                                                             setting.ColumnNameJp, index, accept: x => x.StandardString(StaffNameField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.DestnationCode))
                {
                    yield return(DestnationCodeField = new StringFieldDefinition <BillingInvoice>(k => k.DestnationCode,
                                                                                                  setting.ColumnNameJp, index, accept: x => x.StandardString(DestnationCodeField)));
                }
                if (setting.ColumnName == nameof(BillingInvoice.PublishAt))
                {
                    yield return(PublishAtField = new NumberFieldDefinition <BillingInvoice, DateTime>(k => k.PublishAt,
                                                                                                       setting.ColumnNameJp, index, accept: x => x.StandardNumber(PublishAtField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));
                }
                if (setting.ColumnName == nameof(BillingInvoice.PublishAt1st))
                {
                    yield return(PublishAt1stField = new NumberFieldDefinition <BillingInvoice, DateTime>(k => k.PublishAt1st,
                                                                                                          setting.ColumnNameJp, index, accept: x => x.StandardNumber(PublishAt1stField), formatter: value => (value == DateTime.MinValue) ? "" : value.ToShortDateString()));
                }
            }
        }