using MicroFour.StrataFrame.Business;
using MicroFour.StrataFrame.Security;
using MicroFour.StrataFrame.UI.Windows.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;

namespace ReportSS2.BuisnessObjects
{
    public partial class RechpositionenBO
    {

        #region Component Implementation

        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            components = new System.ComponentModel.Container();

            this.CheckRulesOnCurrentRow += new CheckRulesOnCurrentRowEventHandler(RechpositionenBO_CheckRulesOnCurrentRow);
            this.SetDefaultValues += new SetDefaultValuesEventHandler(RechpositionenBO_SetDefaultValues);
        }

        #endregion


        #region BusinessLayer Overriden Methods & Properties

        /// <summary>
        /// The collection of required fields for the business object.
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public override RequiredFieldsCollection RequiredFields
        {
            get
            {
                return base.RequiredFields;
            }
            set
            {
                base.RequiredFields = value;
            }
        }

        /// <summary>
        /// Defines the constraint that defines the parent-child relationship between this business object type and another business object type.
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public override IBusinessParentRelationship ParentRelationship
        {
            get
            {
                return base.ParentRelationship;
            }
            set
            {
                base.ParentRelationship = value;
            }
        }

        /// <summary>
        /// Returns all of the field names in a single string in the form of [field1],[field2],...  This must be used in the place of '*' in select statements if Query Notifications are to be registered.
        /// </summary>
        /// <remarks></remarks>
        protected override String AllFieldNames
        {
            get
            {
                return "[ID],[RechkopfID],[PositionsNr],[SachkontoID],[SachkontoKennzf],[SachkontoBezeichnung],[SteuerschluesselID],[SteuerschluesselKennzf],[SteuerschluesselBezeichnung],[SteuerschluesselSteuersatz],[KostenstellenID],[KostenstellenKennzf],[KostenstellenBezeichnung],[BetragBrutto],[BetragNetto],[BetragSteuer]";
            }
        }

        /// <summary>
        /// The name of the database that contains the table to which this business object is mapped.
        /// </summary>
        /// <remarks></remarks>
        public override String Database
        {
            get
            {
                return "ERV";
            }
        }

        private static string[] _PrimaryKeyFields = new string[] { };
        /// <summary>
        /// Gets the field or fields that comprise the primary key for the business object.
        /// </summary>
        /// <remarks></remarks>
        public override string[] PrimaryKeyFields
        {
            get
            {
                return _PrimaryKeyFields;
            }
        }

        /// <summary>
        /// The name of the table in the database to which this business object is mapped.
        /// </summary>
        /// <remarks></remarks>
        public override String TableName
        {
            get
            {
                return "Rechpositionen";
            }
        }

        /// <summary>
        /// The schema of the table in the database to which this business object is mapped.
        /// </summary>
        /// <remarks></remarks>
        public override String TableSchema
        {
            get
            {
                return "dbo";
            }
        }

        /// <summary>
        /// Creates and returns an array of DataColumns that contains the schema for the table.  This is used to prevent a round trip to the server to aquire the initial schema for the internal DataTable.
        /// </summary>
        /// <remarks></remarks>
        protected override DataColumn[] CreateTableSchema()
        {
            return new DataColumn[] {
new DataColumn("ID", typeof(System.Decimal)),
new DataColumn("RechkopfID", typeof(System.Decimal)),
new DataColumn("PositionsNr", typeof(System.Int32)),
new DataColumn("SachkontoID", typeof(System.Int32)),
new DataColumn("SachkontoKennzf", typeof(System.Decimal)),
new DataColumn("SachkontoBezeichnung", typeof(System.String)),
new DataColumn("SteuerschluesselID", typeof(System.Int32)),
new DataColumn("SteuerschluesselKennzf", typeof(System.Decimal)),
new DataColumn("SteuerschluesselBezeichnung", typeof(System.String)),
new DataColumn("SteuerschluesselSteuersatz", typeof(System.Decimal)),
new DataColumn("KostenstellenID", typeof(System.Int32)),
new DataColumn("KostenstellenKennzf", typeof(System.Decimal)),
new DataColumn("KostenstellenBezeichnung", typeof(System.String)),
new DataColumn("BetragBrutto", typeof(System.Decimal)),
new DataColumn("BetragNetto", typeof(System.Decimal)),
new DataColumn("BetragSteuer", typeof(System.Decimal))};
        }

        /// <summary>
        /// Adds a broken rule to the business object's collection
        /// </summary>
        /// <remarks></remarks>
        protected void AddBrokenRule(RechpositionenBOFieldNames Field, string ErrorMessage)
        {
            base.AddBrokenRule(Field, ErrorMessage);
        }

        /// <summary>
        /// Adds a broken rule to the business object's collection
        /// </summary>
        /// <remarks></remarks>
        protected new void AddBrokenRule(string FieldName, string ErrorMessage)
        {
            base.AddBrokenRule(FieldName, ErrorMessage);
        }

        /// <summary>
        /// Adds a broken rules to the business object's collection using the given message key to pull the error message from the localization database
        /// </summary>
        /// <remarks></remarks>
        protected void AddBrokenRuleByKey(RechpositionenBOFieldNames Field, string ErrorMessageKey)
        {
            base.AddBrokenRuleByKey(Field, ErrorMessageKey);
        }

        /// <summary>
        /// Adds a broken rules to the business object's collection using the given message key to pull the error message from the localization database
        /// </summary>
        /// <remarks></remarks>
        protected new void AddBrokenRuleByKey(string FieldName, string ErrorMessageKey)
        {
            base.AddBrokenRuleByKey(FieldName, ErrorMessageKey);
        }

        /// <summary>
        /// Gets a collection of the names for all fields that belong to this business object and map to the database.
        /// </summary>
        /// <remarks></remarks>
        public override List<string> AllFieldsList
        {
            get
            {
                return _AllFieldsList;
            }
        }

        /// <summary>
        /// Gets a dictionary of the DbTypes for all fields that belong to this business object and map to the database.
        /// </summary>
        /// <remarks></remarks>
        public override Dictionary<string, DbType> FieldDbTypes
        {
            get
            {
                return _FieldDbTypes;
            }
        }

        /// <summary>
        /// Gets a dictionary of all fields within this business object that map to the FieldNames enumeration for this business object.
        /// </summary>
        /// <remarks></remarks>
        public override BusinessLayerFieldEnumDictionary FieldEnums
        {
            get
            {
                return _FieldEnums;
            }
        }

        /// <summary>
        /// Gets a dictionary of all of the lengths for all fields within this business object that map to a field in the database.
        /// </summary>
        /// <remarks></remarks>
        public override Dictionary<string, int> FieldLengths
        {
            get
            {
                return _FieldLengths;
            }
        }

        /// <summary>
        /// Gets a dictionary of the native DbType (SqlDbType, OracleType, OleDbType, etc.) for all fields within this buisness object that map to a field in the database.
        /// </summary>
        /// <remarks></remarks>
        public override Dictionary<string, int> FieldNativeDbTypes
        {
            get
            {
                return _FieldNativeDbTypes;
            }
        }

        /// <summary>
        /// Gets a dictionary of the security permission keys for each field in the business object.
        /// </summary>
        /// <remarks></remarks>
        public override Dictionary<string, string> FieldPermissionKeys
        {
            get
            {
                return _FieldPermissionKeys;
            }
        }

        #endregion

        #region Field Properties

        /// <summary>
        /// Eindeutiger Identifier
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description("Eindeutiger Identifier"),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal ID
        {
            get
            {
                return (System.Decimal)this.CurrentRow["ID"];
            }
            set
            {
                this.CurrentRow["ID"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal RechkopfID
        {
            get
            {
                return (System.Decimal)this.CurrentRow["RechkopfID"];
            }
            set
            {
                this.CurrentRow["RechkopfID"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Int32 PositionsNr
        {
            get
            {
                return (System.Int32)this.CurrentRow["PositionsNr"];
            }
            set
            {
                this.CurrentRow["PositionsNr"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Int32 SachkontoID
        {
            get
            {
                return (System.Int32)this.CurrentRow["SachkontoID"];
            }
            set
            {
                this.CurrentRow["SachkontoID"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal SachkontoKennzf
        {
            get
            {
                return (System.Decimal)this.CurrentRow["SachkontoKennzf"];
            }
            set
            {
                this.CurrentRow["SachkontoKennzf"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.String SachkontoBezeichnung
        {
            get
            {
                return (System.String)this.CurrentRow["SachkontoBezeichnung"];
            }
            set
            {
                this.CurrentRow["SachkontoBezeichnung"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Int32 SteuerschluesselID
        {
            get
            {
                return (System.Int32)this.CurrentRow["SteuerschluesselID"];
            }
            set
            {
                this.CurrentRow["SteuerschluesselID"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal SteuerschluesselKennzf
        {
            get
            {
                return (System.Decimal)this.CurrentRow["SteuerschluesselKennzf"];
            }
            set
            {
                this.CurrentRow["SteuerschluesselKennzf"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.String SteuerschluesselBezeichnung
        {
            get
            {
                return (System.String)this.CurrentRow["SteuerschluesselBezeichnung"];
            }
            set
            {
                this.CurrentRow["SteuerschluesselBezeichnung"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal SteuerschluesselSteuersatz
        {
            get
            {
                return (System.Decimal)this.CurrentRow["SteuerschluesselSteuersatz"];
            }
            set
            {
                this.CurrentRow["SteuerschluesselSteuersatz"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Int32 KostenstellenID
        {
            get
            {
                return (System.Int32)this.CurrentRow["KostenstellenID"];
            }
            set
            {
                this.CurrentRow["KostenstellenID"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal KostenstellenKennzf
        {
            get
            {
                return (System.Decimal)this.CurrentRow["KostenstellenKennzf"];
            }
            set
            {
                this.CurrentRow["KostenstellenKennzf"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.String KostenstellenBezeichnung
        {
            get
            {
                return (System.String)this.CurrentRow["KostenstellenBezeichnung"];
            }
            set
            {
                this.CurrentRow["KostenstellenBezeichnung"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal BetragBrutto
        {
            get
            {
                return (System.Decimal)this.CurrentRow["BetragBrutto"];
            }
            set
            {
                this.CurrentRow["BetragBrutto"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal BetragNetto
        {
            get
            {
                return (System.Decimal)this.CurrentRow["BetragNetto"];
            }
            set
            {
                this.CurrentRow["BetragNetto"] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <remarks></remarks>
        [Browsable(false),
         BusinessFieldDisplayInEditor(),
         Description(""),
         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public System.Decimal BetragSteuer
        {
            get
            {
                return (System.Decimal)this.CurrentRow["BetragSteuer"];
            }
            set
            {
                this.CurrentRow["BetragSteuer"] = value;
            }
        }

        #endregion

        #region Field Property Events

        #endregion

        #region Nested Types & Field Security

        /// <summary>
        /// Contains all of the field names that belong to the business object.
        /// </summary>
        /// <remarks></remarks>
        public enum RechpositionenBOFieldNames
        {
            ID,
            RechkopfID,
            PositionsNr,
            SachkontoID,
            SachkontoKennzf,
            SachkontoBezeichnung,
            SteuerschluesselID,
            SteuerschluesselKennzf,
            SteuerschluesselBezeichnung,
            SteuerschluesselSteuersatz,
            KostenstellenID,
            KostenstellenKennzf,
            KostenstellenBezeichnung,
            BetragBrutto,
            BetragNetto,
            BetragSteuer,
            CUSTOM_FIELD
        }

        /// <summary>
        /// Gets the System.Type of the enumeration that contains the field names for the business object.
        /// </summary>
        /// <remarks></remarks>
        public override System.Type GetFieldEnumType()
        {
            return typeof(RechpositionenBOFieldNames);
        }

        /// <summary>
        /// Creates a new CheckFieldSecurityEventArgs object that can be used with this business object type.
        /// </summary>
        /// <remarks></remarks>
        protected override CheckFieldSecurityEventArgsBase CreateNewFieldSecurityEventArgs(System.Enum Field, string CustomField, string PermissionKey, PermissionInfo Perm)
        {
            return new CheckFieldSecurityEventArgs<RechpositionenBOFieldNames>(Field, CustomField, PermissionKey, Perm);
        }

        /// <summary>
        /// Describes a method that will handle the CheckFieldScurity event.
        /// </summary>
        /// <remarks></remarks>
        public delegate void CheckFieldSecurityEventHandler(object sender, CheckFieldSecurityEventArgs<RechpositionenBOFieldNames> e);

        /// <summary>
        /// Occurs when the business objects needs to check the security on a field.
        /// </summary>
        /// <remarks></remarks>
        public event CheckFieldSecurityEventHandler CheckFieldSecurity;

        /// <summary>
        /// Raises the CheckFieldSecurity event.
        /// </summary>
        /// <remarks></remarks>
        protected override void OnCheckFieldSecurity(CheckFieldSecurityEventArgsBase e)
        {
            if (this.CheckFieldSecurity != null)
            {
                this.CheckFieldSecurity(this, (CheckFieldSecurityEventArgs<RechpositionenBOFieldNames>)e);
            }
        }

        #endregion

        #region Item Property Implementation


        private static List<string> _AllFieldsList;
        private static Dictionary<string, DbType> _FieldDbTypes;
        private static BusinessLayerFieldEnumDictionary _FieldEnums;
        private static Dictionary<string, int> _FieldLengths;
        private static Dictionary<string, int> _FieldNativeDbTypes;
        private static Dictionary<string, string> _FieldPermissionKeys;

        /// <summary>
        /// Initializes the static members of the RechpositionenBO class.
        /// </summary>
        /// <remarks></remarks>
        static RechpositionenBO()
        {
            //-- Create the new shared dictionary and populate it with an 
            //   instance of each property descriptor
            _PropertyDescriptors = new PropertyDescriptorDictionary(21);
            _PropertyDescriptors.Add("ID", new Field_ID_Descriptor());
            _PropertyDescriptors.Add("RechkopfID", new Field_RechkopfID_Descriptor());
            _PropertyDescriptors.Add("PositionsNr", new Field_PositionsNr_Descriptor());
            _PropertyDescriptors.Add("SachkontoID", new Field_SachkontoID_Descriptor());
            _PropertyDescriptors.Add("SachkontoKennzf", new Field_SachkontoKennzf_Descriptor());
            _PropertyDescriptors.Add("SachkontoBezeichnung", new Field_SachkontoBezeichnung_Descriptor());
            _PropertyDescriptors.Add("SteuerschluesselID", new Field_SteuerschluesselID_Descriptor());
            _PropertyDescriptors.Add("SteuerschluesselKennzf", new Field_SteuerschluesselKennzf_Descriptor());
            _PropertyDescriptors.Add("SteuerschluesselBezeichnung", new Field_SteuerschluesselBezeichnung_Descriptor());
            _PropertyDescriptors.Add("SteuerschluesselSteuersatz", new Field_SteuerschluesselSteuersatz_Descriptor());
            _PropertyDescriptors.Add("KostenstellenID", new Field_KostenstellenID_Descriptor());
            _PropertyDescriptors.Add("KostenstellenKennzf", new Field_KostenstellenKennzf_Descriptor());
            _PropertyDescriptors.Add("KostenstellenBezeichnung", new Field_KostenstellenBezeichnung_Descriptor());
            _PropertyDescriptors.Add("BetragBrutto", new Field_BetragBrutto_Descriptor());
            _PropertyDescriptors.Add("BetragNetto", new Field_BetragNetto_Descriptor());
            _PropertyDescriptors.Add("BetragSteuer", new Field_BetragSteuer_Descriptor());

            _AllFieldsList = new List<string>(16);
            _AllFieldsList.Add("ID");
            _AllFieldsList.Add("RechkopfID");
            _AllFieldsList.Add("PositionsNr");
            _AllFieldsList.Add("SachkontoID");
            _AllFieldsList.Add("SachkontoKennzf");
            _AllFieldsList.Add("SachkontoBezeichnung");
            _AllFieldsList.Add("SteuerschluesselID");
            _AllFieldsList.Add("SteuerschluesselKennzf");
            _AllFieldsList.Add("SteuerschluesselBezeichnung");
            _AllFieldsList.Add("SteuerschluesselSteuersatz");
            _AllFieldsList.Add("KostenstellenID");
            _AllFieldsList.Add("KostenstellenKennzf");
            _AllFieldsList.Add("KostenstellenBezeichnung");
            _AllFieldsList.Add("BetragBrutto");
            _AllFieldsList.Add("BetragNetto");
            _AllFieldsList.Add("BetragSteuer");

            _FieldDbTypes = new Dictionary<string, DbType>(16);
            _FieldDbTypes.Add("ID", DbType.Decimal);
            _FieldDbTypes.Add("RechkopfID", DbType.Decimal);
            _FieldDbTypes.Add("PositionsNr", DbType.Int32);
            _FieldDbTypes.Add("SachkontoID", DbType.Int32);
            _FieldDbTypes.Add("SachkontoKennzf", DbType.Decimal);
            _FieldDbTypes.Add("SachkontoBezeichnung", DbType.AnsiString);
            _FieldDbTypes.Add("SteuerschluesselID", DbType.Int32);
            _FieldDbTypes.Add("SteuerschluesselKennzf", DbType.Decimal);
            _FieldDbTypes.Add("SteuerschluesselBezeichnung", DbType.AnsiString);
            _FieldDbTypes.Add("SteuerschluesselSteuersatz", DbType.Decimal);
            _FieldDbTypes.Add("KostenstellenID", DbType.Int32);
            _FieldDbTypes.Add("KostenstellenKennzf", DbType.Decimal);
            _FieldDbTypes.Add("KostenstellenBezeichnung", DbType.AnsiString);
            _FieldDbTypes.Add("BetragBrutto", DbType.Decimal);
            _FieldDbTypes.Add("BetragNetto", DbType.Decimal);
            _FieldDbTypes.Add("BetragSteuer", DbType.Decimal);

            _FieldEnums = new BusinessLayerFieldEnumDictionary(17);
            _FieldEnums.Add("ID", RechpositionenBOFieldNames.ID);
            _FieldEnums.Add("RechkopfID", RechpositionenBOFieldNames.RechkopfID);
            _FieldEnums.Add("PositionsNr", RechpositionenBOFieldNames.PositionsNr);
            _FieldEnums.Add("SachkontoID", RechpositionenBOFieldNames.SachkontoID);
            _FieldEnums.Add("SachkontoKennzf", RechpositionenBOFieldNames.SachkontoKennzf);
            _FieldEnums.Add("SachkontoBezeichnung", RechpositionenBOFieldNames.SachkontoBezeichnung);
            _FieldEnums.Add("SteuerschluesselID", RechpositionenBOFieldNames.SteuerschluesselID);
            _FieldEnums.Add("SteuerschluesselKennzf", RechpositionenBOFieldNames.SteuerschluesselKennzf);
            _FieldEnums.Add("SteuerschluesselBezeichnung", RechpositionenBOFieldNames.SteuerschluesselBezeichnung);
            _FieldEnums.Add("SteuerschluesselSteuersatz", RechpositionenBOFieldNames.SteuerschluesselSteuersatz);
            _FieldEnums.Add("KostenstellenID", RechpositionenBOFieldNames.KostenstellenID);
            _FieldEnums.Add("KostenstellenKennzf", RechpositionenBOFieldNames.KostenstellenKennzf);
            _FieldEnums.Add("KostenstellenBezeichnung", RechpositionenBOFieldNames.KostenstellenBezeichnung);
            _FieldEnums.Add("BetragBrutto", RechpositionenBOFieldNames.BetragBrutto);
            _FieldEnums.Add("BetragNetto", RechpositionenBOFieldNames.BetragNetto);
            _FieldEnums.Add("BetragSteuer", RechpositionenBOFieldNames.BetragSteuer);
            _FieldEnums.Add("CUSTOM_FIELD", RechpositionenBOFieldNames.CUSTOM_FIELD);

            _FieldLengths = new Dictionary<string, int>(16);
            _FieldLengths.Add("ID", 9);
            _FieldLengths.Add("RechkopfID", 9);
            _FieldLengths.Add("PositionsNr", 4);
            _FieldLengths.Add("SachkontoID", 4);
            _FieldLengths.Add("SachkontoKennzf", 9);
            _FieldLengths.Add("SachkontoBezeichnung", 60);
            _FieldLengths.Add("SteuerschluesselID", 4);
            _FieldLengths.Add("SteuerschluesselKennzf", 9);
            _FieldLengths.Add("SteuerschluesselBezeichnung", 60);
            _FieldLengths.Add("SteuerschluesselSteuersatz", 9);
            _FieldLengths.Add("KostenstellenID", 4);
            _FieldLengths.Add("KostenstellenKennzf", 9);
            _FieldLengths.Add("KostenstellenBezeichnung", 40);
            _FieldLengths.Add("BetragBrutto", 9);
            _FieldLengths.Add("BetragNetto", 9);
            _FieldLengths.Add("BetragSteuer", 9);

            _FieldNativeDbTypes = new Dictionary<string, int>(16);
            _FieldNativeDbTypes.Add("ID", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("RechkopfID", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("PositionsNr", (int)System.Data.SqlDbType.Int);
            _FieldNativeDbTypes.Add("SachkontoID", (int)System.Data.SqlDbType.Int);
            _FieldNativeDbTypes.Add("SachkontoKennzf", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("SachkontoBezeichnung", (int)System.Data.SqlDbType.VarChar);
            _FieldNativeDbTypes.Add("SteuerschluesselID", (int)System.Data.SqlDbType.Int);
            _FieldNativeDbTypes.Add("SteuerschluesselKennzf", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("SteuerschluesselBezeichnung", (int)System.Data.SqlDbType.VarChar);
            _FieldNativeDbTypes.Add("SteuerschluesselSteuersatz", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("KostenstellenID", (int)System.Data.SqlDbType.Int);
            _FieldNativeDbTypes.Add("KostenstellenKennzf", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("KostenstellenBezeichnung", (int)System.Data.SqlDbType.VarChar);
            _FieldNativeDbTypes.Add("BetragBrutto", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("BetragNetto", (int)System.Data.SqlDbType.Decimal);
            _FieldNativeDbTypes.Add("BetragSteuer", (int)System.Data.SqlDbType.Decimal);

            _FieldPermissionKeys = new Dictionary<string, string>(16);

        }

        private static bool _AreCustomDescriptorsEvaluated = false;
        protected override bool AreCustomDescriptorsEvaluated
        {
            get
            {
                bool llReturn = _AreCustomDescriptorsEvaluated;
                _AreCustomDescriptorsEvaluated = true;
                return llReturn;
            }
        }

        private static PropertyDescriptorDictionary _PropertyDescriptors;
        protected override PropertyDescriptorDictionary PropertyDescriptors
        {
            get
            {
                return _PropertyDescriptors;
            }
        }

        /// <summary>
        /// A private field used to store the System.Type of this business object for use by the FieldPropertyDescriptor classes.
        /// </summary>
        /// <remarks></remarks>

        private static System.Type _ComponentType = typeof(RechpositionenBO);

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the ID property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_ID_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_ID_Descriptor() : base("ID") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).ID;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).ID = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the RechkopfID property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_RechkopfID_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_RechkopfID_Descriptor() : base("RechkopfID") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).RechkopfID;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).RechkopfID = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the PositionsNr property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_PositionsNr_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_PositionsNr_Descriptor() : base("PositionsNr") { }
            private System.Type _PropertyType = typeof(System.Int32);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).PositionsNr;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).PositionsNr = (System.Int32)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SachkontoID property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SachkontoID_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SachkontoID_Descriptor() : base("SachkontoID") { }
            private System.Type _PropertyType = typeof(System.Int32);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SachkontoID;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SachkontoID = (System.Int32)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SachkontoKennzf property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SachkontoKennzf_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SachkontoKennzf_Descriptor() : base("SachkontoKennzf") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SachkontoKennzf;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SachkontoKennzf = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SachkontoBezeichnung property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SachkontoBezeichnung_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SachkontoBezeichnung_Descriptor() : base("SachkontoBezeichnung") { }
            private System.Type _PropertyType = typeof(System.String);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SachkontoBezeichnung;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SachkontoBezeichnung = (System.String)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SteuerschluesselID property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SteuerschluesselID_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SteuerschluesselID_Descriptor() : base("SteuerschluesselID") { }
            private System.Type _PropertyType = typeof(System.Int32);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SteuerschluesselID;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SteuerschluesselID = (System.Int32)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SteuerschluesselKennzf property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SteuerschluesselKennzf_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SteuerschluesselKennzf_Descriptor() : base("SteuerschluesselKennzf") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SteuerschluesselKennzf;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SteuerschluesselKennzf = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SteuerschluesselBezeichnung property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SteuerschluesselBezeichnung_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SteuerschluesselBezeichnung_Descriptor() : base("SteuerschluesselBezeichnung") { }
            private System.Type _PropertyType = typeof(System.String);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SteuerschluesselBezeichnung;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SteuerschluesselBezeichnung = (System.String)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the SteuerschluesselSteuersatz property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_SteuerschluesselSteuersatz_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_SteuerschluesselSteuersatz_Descriptor() : base("SteuerschluesselSteuersatz") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).SteuerschluesselSteuersatz;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).SteuerschluesselSteuersatz = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the KostenstellenID property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_KostenstellenID_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_KostenstellenID_Descriptor() : base("KostenstellenID") { }
            private System.Type _PropertyType = typeof(System.Int32);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).KostenstellenID;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).KostenstellenID = (System.Int32)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the KostenstellenKennzf property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_KostenstellenKennzf_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_KostenstellenKennzf_Descriptor() : base("KostenstellenKennzf") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).KostenstellenKennzf;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).KostenstellenKennzf = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the KostenstellenBezeichnung property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_KostenstellenBezeichnung_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_KostenstellenBezeichnung_Descriptor() : base("KostenstellenBezeichnung") { }
            private System.Type _PropertyType = typeof(System.String);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).KostenstellenBezeichnung;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).KostenstellenBezeichnung = (System.String)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the BetragBrutto property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_BetragBrutto_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_BetragBrutto_Descriptor() : base("BetragBrutto") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).BetragBrutto;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).BetragBrutto = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the BetragNetto property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_BetragNetto_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_BetragNetto_Descriptor() : base("BetragNetto") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).BetragNetto;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).BetragNetto = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        /// <summary>
        /// A PropertyDescriptor class used to Get and Set the value of the BetragSteuer property.
        /// </summary>
        /// <remarks></remarks>
        private class Field_BetragSteuer_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_BetragSteuer_Descriptor() : base("BetragSteuer") { }
            private System.Type _PropertyType = typeof(System.Decimal);
            public override object GetValue(Object component)
            {
                return ((RechpositionenBO)component).BetragSteuer;
            }
            public override void SetValue(Object component, object Value)
            {
                ((RechpositionenBO)component).BetragSteuer = (System.Decimal)Value;
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

        #endregion

    }

}
