예제 #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 Key(params Field[] fields)
 {
     if (fields != null)
     {
         KeyFields.AddRange(fields.Where(f => f != null));
     }
 }
예제 #3
0
        internal List <Field> GetNavigationFields()
        {
            // was: FirstOrDefault
            var hierarchy = RelationshipsAsChild.SingleOrDefault(r => r.Hierarchy);

            var result = new List <Field>();

            foreach (var field in KeyFields.OrderBy(f => f.SortPriority))
            {
                // exclude field if hierarchichal parent has field of same name
                // this is used to ignore/exclude a multi-field primary key on an entity that
                // is a hierarchical child of the repeated parent key.
                // example: WRC project: customer is hierarchical parent of consumption.
                //          key on consumption = customer + consumptionSet.
                //          url must NOT be: customer/:customerId/consumption/:customerId/:consumptionSetId
                //          as that would repeat the :customerId param, which is not allowed.
                //  because it is hierarchical, just need the parent's :customerId

                if (hierarchy == null || !hierarchy.ParentEntity.KeyFields.Any(f => f.Name == field.Name))
                {
                    result.Add(field);
                }
            }

            if (hierarchy != null)
            {
                var parentResult = hierarchy.ParentEntity.GetNavigationFields();
                result.InsertRange(0, parentResult);
            }

            return(result);
        }
        /// <summary>
        /// Inseire/Atualiza/Remove os registros da tabela verificando as diferenças entre o enum e  o
        /// banco de dados
        /// </summary>
        public new void UpdateValues()
        {
            RaiseBeforeLoadValues();

            var dblist = from obj in GetData().AsEnumerable()
                         select new
            {
                ID          = obj.Field <Int32>(KeyFields.First().Name),
                Description = obj.Field <string>(FieldsName.Description)
            };

            var newList = InicialValues
                          .Where(c => dblist.All(d => d.ID != c.Collumns[FieldsName.ID].GetInt32()))
                          .ToList();

            newList.SetState(eState.eAdd);

            var upList = InicialValues
                         .Where(c => newList.All(p => c.Collumns[FieldsName.ID].GetInt32() != p.Collumns[FieldsName.ID].GetInt32()) &&
                                dblist.All(d => d.Description != c.Collumns[FieldsName.Description].GetString())).ToList();

            upList.SetState(eState.eUpdate);
            newList.AddRange(upList);

            SaveLines(newList);

            RaiseAfterLoadValues();
        }
예제 #5
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 });
        }
        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,
            });
        }
예제 #7
0
        public void FillAttributeGroupItems(/*OrmAttributeGroup @group,*/ Dictionary <string, Defaultable> result)
        {
            string keyFields = string.Join(",",
                                           KeyFields.Select(
                                               node =>
                                               string.Format("{0}{1}", node.DisplayValue,
                                                             node.IconIndex == TreeNodeProxy.ICON_INDEX_SORT_DESC ? ":DESC" : string.Empty)));

            Defaultable <string[]> defKeyFields = new Defaultable <string[]>();

            defKeyFields.SetAsCustom(keyFields.Split(','));
            result.Add(ATTRIBUTE_GROUP_ITEM_KEY_FIELDS, defKeyFields);

            string includedFields = string.Join(",", IncludedFields.Select(node => node.DisplayValue));
            Defaultable <string[]> defIncludedFields = new Defaultable <string[]>();

            if (string.IsNullOrEmpty(includedFields))
            {
                defIncludedFields.SetAsDefault();
            }
            else
            {
                defIncludedFields.SetAsCustom(includedFields.Split(','));
            }
            result.Add(ATTRIBUTE_GROUP_ITEM_INCLUDED_FIELDS, defIncludedFields);
        }
예제 #8
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,
            });
        }
예제 #9
0
        /// <summary>
        /// Atribui os valores das chaves autoincremental
        /// </summary>
        protected void SetIdentityValue(long value)
        {
            var keyIdentiyField = KeyFields.SingleOrDefault(f => f.Identity);

            if (keyIdentiyField != null)
            {
                keyIdentiyField.Value = value;
            }
        }
예제 #10
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,
            });
        }
예제 #11
0
        /// <summary>
        /// PReenche as colunms da atbela de acordo com as Campos TableAdapterFields
        /// Instanciano na classe base
        /// </summary>
        private void FillCollumns()
        {
            Collumns = TableAdapterColumns.GetCollumns(this);

            foreach (var item in Collumns.Where(c => c.Key))
            {
                KeyFields.Add(item);
            }

            StateRecord = eState.eAdd;
        }
예제 #12
0
        /// <summary>
        /// Atualiza a lista de valores iniciais
        /// </summary>
        public void UpdateValues()
        {
            RaiseBeforeLoadValues();

            var fieldName = InicialFieldName ?? KeyFields.First().Name;

            CheckForNewsAditionalValues(fieldName);

            CheckForUpdateAditionalValues(fieldName);

            RaiseAfterLoadValues();
        }
예제 #13
0
 private IDictionary <string, string> GetRecursiveChildMap(IDictionary <string, string> recursiveChildKeyMap)
 {
     return(recursiveChildKeyMap?
            .Select(
                kvp => new
     {
         Key = KeyFields.SingleOrDefault(x => x.Split('_')[1] == kvp.Key), DistinctChildKey = kvp.Key == kvp.Value
                               ? null
                               : DataFields.SingleOrDefault(x => x.EqualsIgnoreCase("H_" + kvp.Value))
     })
            .ToDictionary(x => x.Key, x => x.DistinctChildKey ?? x.Key, StringComparer.InvariantCultureIgnoreCase));
 }
예제 #14
0
        internal List <Field> GetNonHierarchicalKeyFields()
        {
            var parentRel = RelationshipsAsChild.SingleOrDefault(o => o.Hierarchy);

            // exclude parent entity fields
            // example: in African POT, where the Team entity has a composite key of projectid + userid
            //          and the team is a hierarchical child on the project: the url should be '/projects/{projectid}/team/{userid}
            //          without excluding, the url was: '/projects/{projectid}/team/{projectid}/{userid}
            //          i.e. duplicating projectid
            if (parentRel == null || parentRel.IsOneToOne)
            {
                return(KeyFields);
            }
            return(KeyFields.Where(o => !o.RelationshipFieldsAsChild.Any(rf => rf.ParentField.EntityId == parentRel.ParentEntityId)).ToList());
        }
예제 #15
0
        public BankAccountFileDefinition(DataExpression expression)
            : base(expression)
        {
            StartLineNumber = 1;
            DataTypeToken   = "銀行口座";
            FileNameToken   = DataTypeToken + "マスター";

            Fields.AddRange(GetFields());
            KeyFields.AddRange(new IFieldDefinition <BankAccount>[]
            {
                BankCodeField,
                BranchCodeField,
                AccountTypeIdField,
                AccountNumberField,
            });
        }
예제 #16
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,
            });
        }
예제 #17
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,
            });
        }
예제 #18
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,
            });
        }
예제 #19
0
        internal List <Field> GetNavigationFields()
        {
            var result = new List <Field>();

            foreach (var field in KeyFields.OrderBy(f => f.SortPriority))
            {
                result.Add(field);
            }

            // todo: if more than one relationship, will this FirstOrDefault randomly choose the wrong one?
            var relationship = RelationshipsAsChild.FirstOrDefault(r => r.Hierarchy);

            if (relationship != null)
            {
                var parentResult = relationship.ParentEntity.GetNavigationFields();
                result.InsertRange(0, parentResult);
            }

            return(result);
        }
예제 #20
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,
            });
        }
예제 #21
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,
            });
        }
예제 #22
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,
            });
        }
예제 #23
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,
            });
        }
예제 #24
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,
            });
        }
        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,
            });
        }
예제 #26
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,
            });
        }
        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;
        }
예제 #28
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,
            });
        }
예제 #29
0
        public BankBranchFileDefinition(DataExpression applicationControl) : base(applicationControl)
        {
            OutputHeader      = false;
            StartLineNumber   = 0;
            DataTypeToken     = "銀行・支店";
            FileNameToken     = DataTypeToken + "マスター";
            DuplicateAdoption = DuplicateAdoption.First; // 重複データは先勝ち
            TreatDuplicateAs  = TreatDuplicateAs.Ignore;

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

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

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

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

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

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

            Fields.AddRange(new IFieldDefinition <BankBranch>[] {
                BankCodeField
                , BranchCodeField
                , BankKanaField
                , BankNameField
                , BranchKanaField
                , BranchNameField
            });
            KeyFields.AddRange(new IFieldDefinition <BankBranch>[]
            {
                BankCodeField,
                BranchCodeField,
            });
        }