private void initClass() { DataSetName = "dsmeta"; Prefix = ""; Namespace = "http://tempuri.org/dsmeta.xsd"; #region create DataTables //////////////////// REGISTRY ///////////////////////////////// var tregistry = new registryTable(); tregistry.addBaseColumns("idreg", "active", "annotation", "badgecode", "birthdate", "cf", "ct", "cu", "extmatricula", "foreigncf", "forename", "gender", "idcategory", "idcentralizedcategory", "idmaritalstatus", "idnation", "idregistryclass", "idtitle", "location", "lt", "lu", "maritalsurname", "p_iva", "residence", "rtf", "surname", "title", "txt"); Tables.Add(tregistry); tregistry.defineKey("idreg"); //////////////////// ACCOUNT ///////////////////////////////// var taccount = new accountTable(); taccount.addBaseColumns("idacc", "ayear", "codeacc", "ct", "cu", "flagregistry", "flagtransitory", "flagupb", "idaccountkind", "lt", "lu", "nlevel", "paridacc", "printingorder", "rtf", "title", "txt"); Tables.Add(taccount); taccount.defineKey("idacc"); //////////////////// EPACC ///////////////////////////////// var tepacc = new MetaTable("epacc"); tepacc.defineColumn("yepacc", typeof(short), false); tepacc.defineColumn("nepacc", typeof(int), false); tepacc.defineColumn("description", typeof(string), false); tepacc.defineColumn("idreg", typeof(int)); tepacc.defineColumn("start", typeof(DateTime)); tepacc.defineColumn("stop", typeof(DateTime)); tepacc.defineColumn("txt", typeof(string)); tepacc.defineColumn("rtf", typeof(Byte[])); tepacc.defineColumn("adate", typeof(DateTime), false); tepacc.defineColumn("ct", typeof(DateTime), false); tepacc.defineColumn("cu", typeof(string), false); tepacc.defineColumn("lt", typeof(DateTime), false); tepacc.defineColumn("lu", typeof(string), false); tepacc.defineColumn("doc", typeof(string)); tepacc.defineColumn("docdate", typeof(DateTime)); tepacc.defineColumn("idrelated", typeof(string)); tepacc.defineColumn("idepacc", typeof(int), false); tepacc.defineColumn("paridepacc", typeof(int)); tepacc.defineColumn("nphase", typeof(short), false); tepacc.defineColumn("idman", typeof(int)); tepacc.defineColumn("flagvariation", typeof(string)); tepacc.defineColumn("idaccmotive", typeof(string)); Tables.Add(tepacc); tepacc.defineKey("idepacc"); //////////////////// EPACCYEAR ///////////////////////////////// var tepaccyear = new MetaTable("epaccyear"); tepaccyear.defineColumn("idepacc", typeof(int), false); tepaccyear.defineColumn("ayear", typeof(short), false); tepaccyear.defineColumn("idupb", typeof(string), false); tepaccyear.defineColumn("idacc", typeof(string), false); tepaccyear.defineColumn("amount", typeof(decimal), false); tepaccyear.defineColumn("amount2", typeof(decimal)); tepaccyear.defineColumn("amount3", typeof(decimal)); tepaccyear.defineColumn("amount4", typeof(decimal)); tepaccyear.defineColumn("amount5", typeof(decimal)); tepaccyear.defineColumn("lt", typeof(DateTime)); tepaccyear.defineColumn("lu", typeof(string)); tepaccyear.defineColumn("ct", typeof(DateTime)); tepaccyear.defineColumn("cu", typeof(string)); Tables.Add(tepaccyear); tepaccyear.defineKey("idepacc", "ayear"); //////////////////// EPACCVAR ///////////////////////////////// var tepaccvar = new MetaTable("epaccvar"); tepaccvar.defineColumn("idepacc", typeof(int), false); tepaccvar.defineColumn("nvar", typeof(int), false); tepaccvar.defineColumn("adate", typeof(DateTime), false); tepaccvar.defineColumn("amount", typeof(decimal), false); tepaccvar.defineColumn("description", typeof(string), false); tepaccvar.defineColumn("ct", typeof(DateTime), false); tepaccvar.defineColumn("cu", typeof(string), false); tepaccvar.defineColumn("lt", typeof(DateTime), false); tepaccvar.defineColumn("lu", typeof(string), false); tepaccvar.defineColumn("amount2", typeof(decimal)); tepaccvar.defineColumn("amount3", typeof(decimal)); tepaccvar.defineColumn("amount4", typeof(decimal)); tepaccvar.defineColumn("amount5", typeof(decimal)); tepaccvar.defineColumn("yvar", typeof(short), false); Tables.Add(tepaccvar); tepaccvar.defineKey("idepacc", "nvar"); //////////////////// UPB ///////////////////////////////// var tupb = new upbTable(); tupb.addBaseColumns("idupb", "active", "assured", "codeupb", "ct", "cu", "expiration", "granted", "lt", "lu", "paridupb", "previousappropriation", "previousassessment", "printingorder", "requested", "rtf", "title", "txt", "idman", "idunderwriter", "cupcode", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "flagactivity", "flagkind", "newcodeupb", "idtreasurer", "start", "stop", "cigcode"); Tables.Add(tupb); tupb.defineKey("idupb"); //////////////////// MANAGER ///////////////////////////////// var tmanager = new managerTable(); tmanager.addBaseColumns("active", "ct", "cu", "email", "lt", "lu", "passwordweb", "phonenumber", "rtf", "title", "txt", "userweb", "idman", "iddivision", "wantswarn", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "newidman", "financeactive"); Tables.Add(tmanager); tmanager.defineKey("idman"); //////////////////// EPACCSORTING ///////////////////////////////// var tepaccsorting = new MetaTable("epaccsorting"); tepaccsorting.defineColumn("amount", typeof(decimal), false); tepaccsorting.defineColumn("adate", typeof(DateTime), false); tepaccsorting.defineColumn("description", typeof(string)); tepaccsorting.defineColumn("ct", typeof(DateTime), false); tepaccsorting.defineColumn("cu", typeof(string), false); tepaccsorting.defineColumn("lt", typeof(DateTime), false); tepaccsorting.defineColumn("lu", typeof(string), false); tepaccsorting.defineColumn("idsor", typeof(int), false); tepaccsorting.defineColumn("idepacc", typeof(int), false); tepaccsorting.defineColumn("ayear", typeof(short), false); tepaccsorting.defineColumn("rownum", typeof(int), false); tepaccsorting.defineColumn("!percentuale", typeof(string)); tepaccsorting.defineColumn("!sortingkind", typeof(string)); tepaccsorting.defineColumn("!sortcode", typeof(string)); tepaccsorting.defineColumn("!sorting", typeof(string)); tepaccsorting.defineColumn("kind", typeof(string)); Tables.Add(tepaccsorting); tepaccsorting.defineKey("idepacc", "rownum"); //////////////////// SORTINGVIEW ///////////////////////////////// var tsortingview = new MetaTable("sortingview"); tsortingview.defineColumn("sortingkind", typeof(string), false); tsortingview.defineColumn("idsor", typeof(int), false); tsortingview.defineColumn("sortcode", typeof(string), false); tsortingview.defineColumn("description", typeof(string), false); tsortingview.defineColumn("idsorkind", typeof(int)); Tables.Add(tsortingview); tsortingview.defineKey("idsor"); //////////////////// EPACCSORTINGVIEW ///////////////////////////////// var tepaccsortingview = new MetaTable("epaccsortingview"); tepaccsortingview.defineColumn("idepacc", typeof(int), false); tepaccsortingview.defineColumn("rownum", typeof(int), false); tepaccsortingview.defineColumn("yepacc", typeof(short), false); tepaccsortingview.defineColumn("nepacc", typeof(int), false); tepaccsortingview.defineColumn("nphase", typeof(short), false); tepaccsortingview.defineColumn("description", typeof(string)); tepaccsortingview.defineColumn("amount", typeof(decimal), false); tepaccsortingview.defineColumn("ayear", typeof(short), false); tepaccsortingview.defineColumn("adate", typeof(DateTime), false); tepaccsortingview.defineColumn("idsorkind", typeof(int), false); tepaccsortingview.defineColumn("idsor", typeof(int), false); tepaccsortingview.defineColumn("sortingkind", typeof(string), false); tepaccsortingview.defineColumn("sortcode", typeof(string), false); tepaccsortingview.defineColumn("sorting", typeof(string), false); tepaccsortingview.defineColumn("lt", typeof(DateTime), false); tepaccsortingview.defineColumn("lu", typeof(string), false); tepaccsortingview.defineColumn("ct", typeof(DateTime), false); tepaccsortingview.defineColumn("cu", typeof(string), false); tepaccsortingview.defineColumn("kind", typeof(string)); Tables.Add(tepaccsortingview); tepaccsortingview.defineKey("idepacc", "rownum"); //////////////////// EPACCTOTAL ///////////////////////////////// var tepacctotal = new MetaTable("epacctotal"); tepacctotal.defineColumn("idepacc", typeof(int), false); tepacctotal.defineColumn("ayear", typeof(short), false); tepacctotal.defineColumn("available", typeof(decimal)); tepacctotal.defineColumn("available2", typeof(decimal)); tepacctotal.defineColumn("available3", typeof(decimal)); tepacctotal.defineColumn("available4", typeof(decimal)); tepacctotal.defineColumn("available5", typeof(decimal)); tepacctotal.defineColumn("curramount", typeof(decimal)); tepacctotal.defineColumn("curramount2", typeof(decimal)); tepacctotal.defineColumn("curramount3", typeof(decimal)); tepacctotal.defineColumn("curramount4", typeof(decimal)); tepacctotal.defineColumn("curramount5", typeof(decimal)); Tables.Add(tepacctotal); tepacctotal.defineKey("idepacc", "ayear"); //////////////////// ACCMOTIVE ///////////////////////////////// var taccmotive = new accmotiveTable(); taccmotive.addBaseColumns("idaccmotive", "active", "codemotive", "ct", "cu", "lt", "lu", "paridaccmotive", "title", "flagdep", "flagamm", "expensekind"); Tables.Add(taccmotive); taccmotive.defineKey("idaccmotive"); #endregion #region DataRelation creation this.defineRelation("sortingview_epaccsorting", "sortingview", "epaccsorting", "idsor"); this.defineRelation("epacc_epaccsorting", "epacc", "epaccsorting", "idepacc"); this.defineRelation("epacc_epaccvar", "epacc", "epaccvar", "idepacc"); this.defineRelation("account_epaccyear", "account", "epaccyear", "idacc"); this.defineRelation("upb_epaccyear", "upb", "epaccyear", "idupb"); this.defineRelation("epacc_epaccyear", "epacc", "epaccyear", "idepacc"); this.defineRelation("accmotive_epacc", "accmotive", "epacc", "idaccmotive"); var cPar = new [] { epacc.Columns["idepacc"] }; var cChild = new [] { epacc.Columns["paridepacc"] }; Relations.Add(new DataRelation("epacc_epacc", cPar, cChild, false)); this.defineRelation("registry_epacc", "registry", "epacc", "idreg"); this.defineRelation("manager_epacc", "manager", "epacc", "idman"); #endregion }
private void initClass() { DataSetName = "dsmeta"; Prefix = ""; Namespace = "http://tempuri.org/dsmeta.xsd"; #region create DataTables //////////////////// REGISTRY ///////////////////////////////// var tregistry = new registryTable(); tregistry.addBaseColumns("idreg", "active", "annotation", "badgecode", "birthdate", "cf", "ct", "cu", "extmatricula", "foreigncf", "forename", "gender", "idcategory", "idcentralizedcategory", "idmaritalstatus", "idnation", "idregistryclass", "idtitle", "location", "lt", "lu", "maritalsurname", "p_iva", "residence", "rtf", "surname", "title", "txt"); Tables.Add(tregistry); tregistry.defineKey("idreg"); //////////////////// ACCOUNT ///////////////////////////////// var taccount = new accountTable(); taccount.addBaseColumns("idacc", "ayear", "codeacc", "ct", "cu", "flagregistry", "flagtransitory", "flagupb", "idaccountkind", "lt", "lu", "nlevel", "paridacc", "printingorder", "rtf", "title", "txt"); Tables.Add(taccount); taccount.defineKey("idacc"); //////////////////// EPEXP ///////////////////////////////// var tepexp = new epexpTable(); tepexp.addBaseColumns("yepexp", "nepexp", "description", "idreg", "start", "stop", "txt", "rtf", "adate", "ct", "cu", "lt", "lu", "doc", "docdate", "idrelated", "idepexp", "paridepexp", "nphase", "idman", "flagvariation", "idaccmotive"); Tables.Add(tepexp); tepexp.defineKey("idepexp"); //////////////////// EPEXPYEAR ///////////////////////////////// var tepexpyear = new MetaTable("epexpyear"); tepexpyear.defineColumn("idepexp", typeof(int), false); tepexpyear.defineColumn("ayear", typeof(short), false); tepexpyear.defineColumn("idupb", typeof(string), false); tepexpyear.defineColumn("idacc", typeof(string), false); tepexpyear.defineColumn("amount", typeof(decimal), false); tepexpyear.defineColumn("amount2", typeof(decimal)); tepexpyear.defineColumn("amount3", typeof(decimal)); tepexpyear.defineColumn("amount4", typeof(decimal)); tepexpyear.defineColumn("amount5", typeof(decimal)); tepexpyear.defineColumn("lt", typeof(DateTime)); tepexpyear.defineColumn("lu", typeof(string)); tepexpyear.defineColumn("ct", typeof(DateTime)); tepexpyear.defineColumn("cu", typeof(string)); Tables.Add(tepexpyear); tepexpyear.defineKey("idepexp", "ayear"); //////////////////// EPEXPVAR ///////////////////////////////// var tepexpvar = new MetaTable("epexpvar"); tepexpvar.defineColumn("idepexp", typeof(int), false); tepexpvar.defineColumn("nvar", typeof(int), false); tepexpvar.defineColumn("adate", typeof(DateTime), false); tepexpvar.defineColumn("amount", typeof(decimal), false); tepexpvar.defineColumn("description", typeof(string), false); tepexpvar.defineColumn("ct", typeof(DateTime), false); tepexpvar.defineColumn("cu", typeof(string), false); tepexpvar.defineColumn("lt", typeof(DateTime), false); tepexpvar.defineColumn("lu", typeof(string), false); tepexpvar.defineColumn("amount2", typeof(decimal)); tepexpvar.defineColumn("amount3", typeof(decimal)); tepexpvar.defineColumn("amount4", typeof(decimal)); tepexpvar.defineColumn("amount5", typeof(decimal)); tepexpvar.defineColumn("yvar", typeof(short), false); Tables.Add(tepexpvar); tepexpvar.defineKey("idepexp", "nvar"); //////////////////// UPB ///////////////////////////////// var tupb = new upbTable(); tupb.addBaseColumns("idupb", "active", "assured", "codeupb", "ct", "cu", "expiration", "granted", "lt", "lu", "paridupb", "previousappropriation", "previousassessment", "printingorder", "requested", "rtf", "title", "txt", "idman", "idunderwriter", "cupcode", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "flagactivity", "flagkind", "newcodeupb", "idtreasurer", "start", "stop", "cigcode"); Tables.Add(tupb); tupb.defineKey("idupb"); //////////////////// MANAGER ///////////////////////////////// var tmanager = new managerTable(); tmanager.addBaseColumns("active", "ct", "cu", "email", "lt", "lu", "passwordweb", "phonenumber", "rtf", "title", "txt", "userweb", "idman", "iddivision", "wantswarn", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "newidman", "financeactive"); Tables.Add(tmanager); tmanager.defineKey("idman"); //////////////////// EPEXPSORTING ///////////////////////////////// var tepexpsorting = new MetaTable("epexpsorting"); tepexpsorting.defineColumn("amount", typeof(decimal), false); tepexpsorting.defineColumn("adate", typeof(DateTime), false); tepexpsorting.defineColumn("description", typeof(string)); tepexpsorting.defineColumn("ct", typeof(DateTime), false); tepexpsorting.defineColumn("cu", typeof(string), false); tepexpsorting.defineColumn("lt", typeof(DateTime), false); tepexpsorting.defineColumn("lu", typeof(string), false); tepexpsorting.defineColumn("idsor", typeof(int), false); tepexpsorting.defineColumn("idepexp", typeof(int), false); tepexpsorting.defineColumn("ayear", typeof(short), false); tepexpsorting.defineColumn("rownum", typeof(int), false); tepexpsorting.defineColumn("!percentuale", typeof(string)); tepexpsorting.defineColumn("!sortingkind", typeof(string)); tepexpsorting.defineColumn("!sortcode", typeof(string)); tepexpsorting.defineColumn("!sorting", typeof(string)); tepexpsorting.defineColumn("kind", typeof(string)); Tables.Add(tepexpsorting); tepexpsorting.defineKey("idepexp", "rownum"); //////////////////// SORTINGVIEW ///////////////////////////////// var tsortingview = new MetaTable("sortingview"); tsortingview.defineColumn("sortingkind", typeof(string), false); tsortingview.defineColumn("idsor", typeof(int), false); tsortingview.defineColumn("sortcode", typeof(string), false); tsortingview.defineColumn("description", typeof(string), false); Tables.Add(tsortingview); tsortingview.defineKey("idsor"); //////////////////// EPEXPSORTINGVIEW ///////////////////////////////// var tepexpsortingview = new MetaTable("epexpsortingview"); tepexpsortingview.defineColumn("idepexp", typeof(int), false); tepexpsortingview.defineColumn("rownum", typeof(int), false); tepexpsortingview.defineColumn("yepexp", typeof(short), false); tepexpsortingview.defineColumn("nepexp", typeof(int), false); tepexpsortingview.defineColumn("nphase", typeof(short), false); tepexpsortingview.defineColumn("description", typeof(string)); tepexpsortingview.defineColumn("amount", typeof(decimal), false); tepexpsortingview.defineColumn("ayear", typeof(short), false); tepexpsortingview.defineColumn("adate", typeof(DateTime), false); tepexpsortingview.defineColumn("idsorkind", typeof(int), false); tepexpsortingview.defineColumn("idsor", typeof(int), false); tepexpsortingview.defineColumn("sortingkind", typeof(string), false); tepexpsortingview.defineColumn("sortcode", typeof(string), false); tepexpsortingview.defineColumn("sorting", typeof(string), false); tepexpsortingview.defineColumn("lt", typeof(DateTime), false); tepexpsortingview.defineColumn("lu", typeof(string), false); tepexpsortingview.defineColumn("ct", typeof(DateTime), false); tepexpsortingview.defineColumn("cu", typeof(string), false); tepexpsortingview.defineColumn("kind", typeof(string)); Tables.Add(tepexpsortingview); tepexpsortingview.defineKey("idepexp", "rownum"); //////////////////// MANDATEDETAIL ///////////////////////////////// var tmandatedetail = new mandatedetailTable(); tmandatedetail.addBaseColumns("idmankind", "nman", "rownum", "yman", "annotations", "assetkind", "competencystart", "competencystop", "ct", "cu", "detaildescription", "discount", "idupb", "lt", "lu", "ninvoiced", "number", "start", "stop", "tax", "taxable", "taxrate", "toinvoice", "flagmixed", "idaccmotive", "unabatable", "idgroup", "idreg", "idexp_taxable", "idexp_iva", "idinv", "idivakind", "idsor1", "idsor2", "idsor3", "idaccmotiveannulment", "flagactivity", "va3type", "applierannotations", "ivanotes", "idlist", "idunit", "idpackage", "unitsforpackage", "npackage", "cupcode", "cigcode", "flagto_unload", "epkind", "rownum_origin", "contractamount", "idavcp", "idavcp_choice", "avcp_startcontract", "avcp_stopcontract", "avcp_description", "idpccdebitmotive", "idpccdebitstatus", "idcostpartition", "expensekind", "idepexp"); Tables.Add(tmandatedetail); tmandatedetail.defineKey("idmankind", "nman", "rownum", "yman"); //////////////////// INVOICEDETAIL ///////////////////////////////// var tinvoicedetail = new invoicedetailTable(); tinvoicedetail.addBaseColumns("ninv", "rownum", "yinv", "annotations", "competencystart", "paymentcompetency", "competencystop", "ct", "cu", "detaildescription", "discount", "idaccmotive", "idmankind", "idupb", "lt", "lu", "manrownum", "nman", "number", "tax", "taxable", "unabatable", "yman", "idestimkind", "estimrownum", "nestim", "yestim", "idgroup", "idexp_taxable", "idexp_iva", "idinc_taxable", "idinc_iva", "ninv_main", "yinv_main", "idivakind", "idinvkind", "idsor1", "idsor2", "idsor3", "idintrastatcode", "idintrastatmeasure", "weight", "va3type", "intrastatoperationkind", "idintrastatservice", "idintrastatsupplymethod", "idlist", "idunit", "idpackage", "unitsforpackage", "npackage", "flag", "exception12", "intra12operationkind", "move12", "idupb_iva", "idinvkind_main", "leasing", "usedmodesospesometro", "resetresidualmandate", "idfetransfer", "fereferencerule", "cupcode", "cigcode", "idpccdebitstatus", "idpccdebitmotive", "idcostpartition", "expensekind", "rounding", "idepexp", "idepacc"); Tables.Add(tinvoicedetail); tinvoicedetail.defineKey("ninv", "rownum", "yinv", "idinvkind"); //////////////////// EPEXPTOTAL ///////////////////////////////// var tepexptotal = new MetaTable("epexptotal"); tepexptotal.defineColumn("idepexp", typeof(int), false); tepexptotal.defineColumn("ayear", typeof(short), false); tepexptotal.defineColumn("available", typeof(decimal)); tepexptotal.defineColumn("available2", typeof(decimal)); tepexptotal.defineColumn("available3", typeof(decimal)); tepexptotal.defineColumn("available4", typeof(decimal)); tepexptotal.defineColumn("available5", typeof(decimal)); tepexptotal.defineColumn("curramount", typeof(decimal)); tepexptotal.defineColumn("curramount2", typeof(decimal)); tepexptotal.defineColumn("curramount3", typeof(decimal)); tepexptotal.defineColumn("curramount4", typeof(decimal)); tepexptotal.defineColumn("curramount5", typeof(decimal)); Tables.Add(tepexptotal); tepexptotal.defineKey("idepexp", "ayear"); //////////////////// ACCMOTIVE ///////////////////////////////// var taccmotive = new accmotiveTable(); taccmotive.addBaseColumns("idaccmotive", "active", "codemotive", "ct", "cu", "lt", "lu", "paridaccmotive", "title", "flagdep", "flagamm", "expensekind"); Tables.Add(taccmotive); taccmotive.defineKey("idaccmotive"); #endregion #region DataRelation creation this.defineRelation("epexp_invoicedetail", "epexp", "invoicedetail", "idepexp"); this.defineRelation("epexp_mandatedetail", "epexp", "mandatedetail", "idepexp"); this.defineRelation("epexp_epexpsorting", "epexp", "epexpsorting", "idepexp"); this.defineRelation("sortingview_epexpsorting", "sortingview", "epexpsorting", "idsor"); this.defineRelation("epexp_epexpvar", "epexp", "epexpvar", "idepexp"); this.defineRelation("epexp_epexpyear", "epexp", "epexpyear", "idepexp"); this.defineRelation("upb_epexpyear", "upb", "epexpyear", "idupb"); this.defineRelation("account_epexpyear", "account", "epexpyear", "idacc"); this.defineRelation("manager_epexp", "manager", "epexp", "idman"); this.defineRelation("registry_epexp", "registry", "epexp", "idreg"); var cPar = new [] { epexp.Columns["idepexp"] }; var cChild = new [] { epexp.Columns["paridepexp"] }; Relations.Add(new DataRelation("epexp_epexp", cPar, cChild, false)); this.defineRelation("accmotive_epexp", "accmotive", "epexp", "idaccmotive"); #endregion }