コード例 #1
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,
            });
        }
コード例 #2
0
        public SectionFileDefinition(DataExpression applicationControl) : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金部門";
            FileNameToken   = DataTypeToken + "マスター";

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

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

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

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

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

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

            Fields.AddRange(new IFieldDefinition <Section>[] {
                CompanyIdField, SectionCodeField, SectionNameField, NoteField, PayerCodeLeftField, PayerCodeRightField
            });
            KeyFields.AddRange(new IFieldDefinition <Section>[] { SectionCodeField });
        }
コード例 #3
0
        public JuridicalPersonalityFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "法人格";
            FileNameToken   = DataTypeToken + "マスター";

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

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

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

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

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

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

            NoteField = new StringFieldDefinition <Department>(k => k.Note)
            {
                FieldName   = "備考",
                FieldNumber = 5,
                Required    = false,
                Accept      = VisitNote,
            };
            Fields.AddRange(new IFieldDefinition <Department>[] {
                CompanyIdField, DepartmentCodeField, DepartmentNameField, StaffIdField, NoteField
            });
            KeyFields.AddRange(new IFieldDefinition <Department>[]
            {
                DepartmentCodeField,
            });
        }
コード例 #6
0
        public CustomerGroupFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "債権代表者";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <CustomerGroup, Company>(
                null, null,     //k => k.CompanyId, c => c.Id,
                null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            ParentCustomerField = new StandardIdToCodeFieldDefinition <CustomerGroup, Customer>(
                k => k.ParentCustomerId, c => c.Id,
                null, c => c.Code)
            {
                FieldName       = "債権代表者コード",
                FieldNumber     = 2,
                Required        = true,
                Accept          = VisitCustomerGroupCode,
                GetModelsByCode = val => GetCustomerDictionary(val),
            };
            ChildCustomerField = new StandardIdToCodeFieldDefinition <CustomerGroup, Customer>(
                k => k.ChildCustomerId, c => c.Id,
                null, c => c.Code)
            {
                FieldName          = "得意先コード",
                FieldNumber        = 3,
                Required           = true,
                Accept             = VisitCustomerCode,
                GetModelsByCode    = val => GetCustomerDictionary(val),
                ValidateAdditional = ValidateAdditionalChildCustomerField,
            };
            Fields.AddRange(new IFieldDefinition <CustomerGroup>[] {
                CompanyIdField, ParentCustomerField, ChildCustomerField
            });
            KeyFields.AddRange(new IFieldDefinition <CustomerGroup>[]
            {
                ParentCustomerField,
                ChildCustomerField,
            });
        }
コード例 #7
0
        public SectionWithDepartmentFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金・請求部門対応";
            FileNameToken   = DataTypeToken + "マスター";

            CompanyIdField = new StandardIdToCodeFieldDefinition <SectionWithDepartment, Company>(
                null, null,
                null, c => c.Code)
            {
                FieldName   = "会社コード",
                FieldNumber = 1,
                Required    = false,
                Accept      = VisitCompanyId,
            };
            SectionCodeField = new StandardIdToCodeFieldDefinition <SectionWithDepartment, Section>(
                swd => swd.SectionId, s => s.Id,
                swd => swd.SectionCode, s => s.Code)
            {
                FieldName   = "入金部門コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitSectionCode,
            };

            DepartmentCodeField = new StandardIdToCodeFieldDefinition <SectionWithDepartment, Department>(
                swd => swd.DepartmentId, d => d.Id,
                swd => swd.DepartmentCode, d => d.Code)
            {
                FieldName   = "請求部門コード",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitDepartmentCode
            };
            Fields.AddRange(new IFieldDefinition <SectionWithDepartment>[] {
                CompanyIdField, SectionCodeField, DepartmentCodeField
            });
            KeyFields.AddRange(new IFieldDefinition <SectionWithDepartment>[]
            {
                SectionCodeField,
                DepartmentCodeField,
            });
        }
コード例 #8
0
        public SectionWithLoginUserFileDefinition(DataExpression applicationControl) : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金部門・担当者対応";
            FileNameToken   = DataTypeToken + "マスター";

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

            SectionCodeField = new StandardIdToCodeFieldDefinition <SectionWithLoginUser, Section>(
                k => k.SectionId, c => c.Id,
                k => k.SectionCode, c => c.Code)
            {
                FieldName   = "入金部門コード",
                FieldNumber = 2,
                Required    = true,
                Accept      = VisitSectionCode,
            };
            LoginUserCodeField = new StandardIdToCodeFieldDefinition <SectionWithLoginUser, LoginUser>(
                k => k.LoginUserId, c => c.Id,
                k => k.LoginUserCode, c => c.Code)
            {
                FieldName   = "ログインユーザーコード",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitLoginUserCode,
            };
            Fields.AddRange(new IFieldDefinition <SectionWithLoginUser>[] {
                CompanyIdField, SectionCodeField, LoginUserCodeField
            });
            KeyFields.AddRange(new IFieldDefinition <SectionWithLoginUser>[]
            {
                SectionCodeField,
                LoginUserCodeField,
            });
        }
コード例 #9
0
        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")));
        }
コード例 #10
0
        public IgnoreKanaFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "除外カナ";
            FileNameToken   = DataTypeToken + "マスター";

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

            Fields.AddRange(new IFieldDefinition <IgnoreKana>[] {
                CompanyIdField, KanaField, ExcludeCategoryIdField
            });
            KeyFields.AddRange(new IFieldDefinition <IgnoreKana>[]
            {
                KanaField,
            });
        }
コード例 #11
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)));
        }
コード例 #12
0
        public StaffFileDefinition(DataExpression expression) : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "営業担当者";
            FileNameToken   = DataTypeToken + "マスター";

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

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

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

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

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

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

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

            Fields.AddRange(new IFieldDefinition <Staff>[] {
                CompanyIdField, StaffCodeField, StaffNameField, DepartmentIdField, MailField, TelField, FaxField
            });
            KeyFields.AddRange(new IFieldDefinition <Staff>[]
            {
                StaffCodeField,
            });
        }
コード例 #13
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,
            });
        }
コード例 #14
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,
            });
        }
コード例 #15
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)));
        }
コード例 #16
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,
            });
        }
コード例 #17
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,
            });
        }
コード例 #18
0
        public ReceiptSearchFileDefinition(DataExpression expression, List <GridSetting> GridSettingInfo)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "入金データ";
            FileNameToken   = DataTypeToken;

            int fieldNumber = 1;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            KeyFields.AddRange(new IFieldDefinition <Receipt>[]
            {
                CurrencyIdField,
                CustomerCodeField,
                SectionIdField,
            });
        }
コード例 #19
0
        public 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,
            });
        }
コード例 #20
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
            });
        }
コード例 #21
0
        public CustomerRegistrationFeeFileDefinition(DataExpression applicationControl)
            : base(applicationControl)
        {
            StartLineNumber = 1;
            DataTypeToken   = "得意先";
            FileNameToken   = DataTypeToken + "マスター登録手数料";

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

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

            // FieldNumber 3 登録手数料
            FeeField = new NullableNumberFieldDefinition <CustomerFee, decimal>(cd => cd.Fee)
            {
                FieldName   = "登録手数料",
                FieldNumber = 3,
                Required    = true,
                Accept      = VisitFee,
                Format      = value => value.ToString(),
            };

            // FieldNumber 4 通貨コード
            CurrencyCodeField = new StandardIdToCodeFieldDefinition <CustomerFee, Currency>(
                cd => cd.CurrencyId, c => c.Id, l => l.CurrencyCode, c => c.Code)
            {
                FieldName   = "通貨コード",
                FieldNumber = 4,
                Required    = true,
                Accept      = VisitCurrencyCode,
            };

            Fields.AddRange(new IFieldDefinition <CustomerFee>[] {
                CompanyIdField
                , CustomerIdField
                , FeeField
                , CurrencyCodeField
            });
            if (applicationControl.UseForeignCurrency == 1)
            {
                KeyFields.AddRange(new IFieldDefinition <CustomerFee>[]
                {
                    CustomerIdField,
                    CurrencyCodeField,
                    FeeField,
                });
            }
            else
            {
                KeyFields.AddRange(new IFieldDefinition <CustomerFee>[]
                {
                    CustomerIdField,
                    FeeField,
                });
            }
            foreignflg = applicationControl.UseForeignCurrency;
        }
コード例 #22
0
        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
            });
        }