public override global::System.Data.DataSet Clone()
        {
            ArchivePlanInfoDataSet cln = ((ArchivePlanInfoDataSet)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            ArchivePlanInfoDataSet ds = new ArchivePlanInfoDataSet();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
        public DataProviderMock()
        {
            detailDataSet = new DetailDataDataSet();
            CreateNewTextRow(1, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Titel,
                             ScopeArchivDatenElementTyp.Text, "Title of Archive Record", 1);
            CreateNewTextRow(2, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Signatur,
                             ScopeArchivDatenElementTyp.Text, "Reference Code", 1);
            CreateNewTextRow(3, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Signatur,
                             ScopeArchivDatenElementTyp.Text, "Reference Code Second Line", 2);
            CreateNewTextRow(4, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Darin,
                             ScopeArchivDatenElementTyp.Memo, "Some long text ", 1);
            CreateNewTextRow(5, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Darin,
                             ScopeArchivDatenElementTyp.Memo, "that continues on several lines ", 2);
            CreateNewTextRow(6, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Darin,
                             ScopeArchivDatenElementTyp.Memo, "to be stiched together ", 3);
            CreateNewDateRangeRow(7, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.Entstehungszeitraum,
                                  ScopeArchivDatenElementTyp.Datumsbereich, ScopeArchivDateOperator.FromTo, "+1940", "+1950", new DateTime(1940, 1, 1),
                                  new DateTime(1950, 12, 31), false, true, 1);
            CreateNewTextRow(8, ScopeArchivGeschaeftsObjektKlasse.Verzeichnungseinheiten, ScopeArchivDatenElementId.AblieferungLink,
                             ScopeArchivDatenElementTyp.Verknüpfung, "1950 Ablieferung Link", 1);

            containerDataSet = new ContainerDataSet();
            var containerRow = containerDataSet.StorageContainer.NewStorageContainerRow();

            containerRow.BHLTN_TYP_NM           = "Box";
            containerRow.BHLTN_DEF_STAND_ORT_CD = "1/5.03";
            containerRow.GSFT_OBJ_KURZ_NM       = "Box 1/5.03";
            containerDataSet.StorageContainer.AddStorageContainerRow(containerRow);

            referencesDataSet = new ReferencesDataSet();
            var referenceRow = referencesDataSet.References.NewReferencesRow();

            referenceRow.GSFT_OBJ_ID             = 9999;
            referenceRow.GSFT_OBJ_BZHNG_ROLLE_NM = "see also";
            referenceRow.GSFT_OBJ_KURZ_NM        = "Archive Record Title";
            referencesDataSet.References.AddReferencesRow(referenceRow);

            descriptorDataSet = new DescriptorDataSet();
            var descriptorRow = descriptorDataSet.Descriptor.NewDescriptorRow();

            descriptorRow.DSKRP_BENUTZT_FUER_LISTE = "used for 1; used for 2";
            descriptorRow.DSKRP_BSR               = "Just some description";
            descriptorRow.DSKRP_FREMD_SPR_NM      = "Basle";
            descriptorRow.DSKRP_ID                = 9999;
            descriptorRow.DSKRP_NM                = "Basel";
            descriptorRow.GSFT_OBJ_BZHNG_ROLLE_NM = null;
            descriptorRow.GSFT_OBJ_KURZ_NM        = "Basel (Place)";
            descriptorRow.THSRS_NM                = "Place";
            descriptorDataSet.Descriptor.AddDescriptorRow(descriptorRow);

            nodeInfoDataSet = new NodeInfoDataSet();
            nodeInfoDataSet.NodeInfo.AddNodeInfoRow(800, "000000000100000008000000001000", 1, 0, 12);

            archiveRecordDataSet = new ArchiveRecordDataSet();
            var ar = archiveRecordDataSet.ArchiveRecord.NewArchiveRecordRow();

            ar.VRZNG_ENHT_ID             = 1000;
            ar.AKTIV_IND                 = 1;
            ar.ERFSG_DT                  = DateTime.Today;
            ar.ERFSG_USR_CD              = "Me";
            ar.TST                       = DateTime.Today;
            ar.VRZNG_ENHT_BRBTG_STTS_ID  = 1;
            ar.VRZNG_ENHT_BWLG_TYP_ID    = 1;
            ar.VRZNG_ENHT_ENTRG_TYP_ID   = 1;
            ar.VRZNG_ENHT_INHLT_ID       = 1;
            ar.VRZNG_ENHT_SCHTZ_FRIST_ID = 1;
            ar.VRZNG_ENHT_ZGNGL_ID       = 1;
            ar.BILD_ANST_IND             = 1;
            ar.BILD_VRSCH_IND            = 1;
            ar.BLKRT_IND                 = 0;
            ar.FIND_MTL_IND              = 0;
            ar.VRZNG_ENHT_ENTRG_TYP_NM   = "Dossier";
            ar.VRZNG_ENHT_BRBTG_STTS_NM  = "Abgeschlossen";
            ar.HRCH_PFAD                 = "000000000100000008000000001000";
            ar.VRZNG_ENHT_BSTLG_IND      = 0;
            ar.SUCH_FRGB_IND             = 0;
            ar.VRZNG_ENHT_BNTZB_ID       = 1;
            ar.SCHTZ_PRSN_IND            = 0;
            ar.VRZNG_ENHT_INHLT_NM       = "Art. 9.1 BGA";
            ar.VRZNG_ENHT_SCHTZ_FRIST_NM = "Creation Period End";
            ar.SCHTZ_FRIST_DAUER         = 50;
            ar.SCHTZ_FRIST_BIS_DT        = DateTime.Today;
            ar.SCHTZ_FRIST_MIN_IND       = 0;
            ar.SCHTZ_FRIST_MTTN_IND      = 0;
            ar.SCHTZ_FRIST_NTZ           = "Just a note";
            ar.VRZNG_ENHT_BWLG_TYP_NM    = "None";
            ar.VRZNG_ENHT_BNTZB_NM       = "Unrestricted";
            ar.VRZNG_ENHT_ZGNGL_NM       = "Public";
            ar.BNTZG_HNWS_TXT            = null;
            ar.ANST_FRMLR_ID             = 1;
            ar.ANST_FRMLR_NM             = "Test";
            ar.BRBTG_FRMLR_ID            = 1;
            ar.BRBTG_FRMLR_NM            = "Test";
            archiveRecordDataSet.ArchiveRecord.AddArchiveRecordRow(ar);

            archivePlanInfoDataSet = new ArchivePlanInfoDataSet();
            archivePlanInfoDataSet.ArchivePlanItem.AddArchivePlanItemRow("RefCode 1", "Just a string", "1940 - 1950", 1, "Series", 1);
            archivePlanInfoDataSet.ArchivePlanItem.AddArchivePlanItemRow("RefCode 2", "Another string", "1945 - 1949", 1, "File", 800);
            archivePlanInfoDataSet.ArchivePlanItem.AddArchivePlanItemRow("RefCode 3", "Document Title", "1947", 1, "Document", 1000);
        }
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                ArchivePlanInfoDataSet ds = new ArchivePlanInfoDataSet();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "ArchivePlanItemDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }