Пример #1
0
        private void initClass()
        {
            DataSetName = "dsmeta";
            Prefix      = "";
            Namespace   = "http://tempuri.org/dsmeta.xsd";

            #region create DataTables
            //////////////////// PROCEEDS /////////////////////////////////
            var tproceeds = new proceedsTable();
            tproceeds.addBaseColumns("kpro", "ypro", "npro", "npro_treasurer", "kproceedstransmission", "idtreasurer", "flag", "idreg", "idfin", "idman", "adate", "printdate", "txt", "rtf", "cu", "ct", "lu", "lt", "annulmentdate", "idstamphandling", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05");
            Tables.Add(tproceeds);
            tproceeds.defineKey("kpro");

            //////////////////// FIN /////////////////////////////////
            var tfin = new finTable();
            tfin.addBaseColumns("idfin", "ayear", "codefin", "ct", "cu", "lt", "lu", "printingorder", "rtf", "title", "txt", "nlevel", "paridfin", "flag");
            Tables.Add(tfin);
            tfin.defineKey("idfin");

            //////////////////// MANAGER /////////////////////////////////
            var tmanager = new managerTable();
            tmanager.addBaseColumns("idman", "title", "iddivision", "email", "phonenumber", "userweb", "passwordweb", "txt", "rtf", "cu", "ct", "lu", "lt", "active", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05");
            Tables.Add(tmanager);
            tmanager.defineKey("idman");

            //////////////////// TREASURER /////////////////////////////////
            var ttreasurer = new treasurerTable();
            ttreasurer.addBaseColumns("idtreasurer", "description", "flagdefault", "cin", "idbank", "idcab", "cc", "address", "cap", "city", "country", "phoneprefix", "phonenumber", "faxprefix", "faxnumber", "flagfruitful", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "cu", "ct", "lu", "lt", "active");
            Tables.Add(ttreasurer);
            ttreasurer.defineKey("idtreasurer");

            //////////////////// PROCEEDSTRANSMISSION /////////////////////////////////
            var tproceedstransmission = new proceedstransmissionTable();
            tproceedstransmission.addBaseColumns("kproceedstransmission", "yproceedstransmission", "nproceedstransmission", "idman", "idtreasurer", "transmissiondate", "cu", "ct", "lu", "lt");
            Tables.Add(tproceedstransmission);
            tproceedstransmission.defineKey("kproceedstransmission");

            //////////////////// REGISTRY /////////////////////////////////
            var tregistry = new registryTable();
            tregistry.addBaseColumns("idreg", "title", "cf", "p_iva", "residence", "annotation", "birthdate", "gender", "surname", "forename", "foreigncf", "active", "txt", "rtf", "cu", "ct", "lu", "lt");
            Tables.Add(tregistry);
            tregistry.defineKey("idreg");

            //////////////////// INCOMELASTVIEW /////////////////////////////////
            var tincomelastview = new MetaTable("incomelastview");
            tincomelastview.defineColumn("idinc", typeof(int), false);
            tincomelastview.defineColumn("nphase", typeof(byte), false);
            tincomelastview.defineColumn("phase", typeof(string), false);
            tincomelastview.defineColumn("ymov", typeof(short), false);
            tincomelastview.defineColumn("nmov", typeof(int), false);
            tincomelastview.defineColumn("parentymov", typeof(short));
            tincomelastview.defineColumn("parentnmov", typeof(int));
            tincomelastview.defineColumn("parentidinc", typeof(int));
            tincomelastview.defineColumn("ayear", typeof(short), false);
            tincomelastview.defineColumn("idfin", typeof(int));
            tincomelastview.defineColumn("codefin", typeof(string));
            tincomelastview.defineColumn("finance", typeof(string));
            tincomelastview.defineColumn("idupb", typeof(string));
            tincomelastview.defineColumn("codeupb", typeof(string));
            tincomelastview.defineColumn("upb", typeof(string));
            tincomelastview.defineColumn("idreg", typeof(int));
            tincomelastview.defineColumn("registry", typeof(string));
            tincomelastview.defineColumn("idman", typeof(int));
            tincomelastview.defineColumn("manager", typeof(string));
            tincomelastview.defineColumn("kpro", typeof(int));
            tincomelastview.defineColumn("ypro", typeof(short));
            tincomelastview.defineColumn("npro", typeof(int));
            tincomelastview.defineColumn("doc", typeof(string));
            tincomelastview.defineColumn("docdate", typeof(DateTime));
            tincomelastview.defineColumn("description", typeof(string), false);
            tincomelastview.defineColumn("amount", typeof(decimal));
            tincomelastview.defineColumn("ayearstartamount", typeof(decimal));
            tincomelastview.defineColumn("curramount", typeof(decimal));
            tincomelastview.defineColumn("available", typeof(decimal));
            tincomelastview.defineColumn("unpartitioned", typeof(decimal));
            tincomelastview.defineColumn("flag", typeof(byte));
            tincomelastview.defineColumn("totflag", typeof(byte), false);
            tincomelastview.defineColumn("flagarrear", typeof(string));
            tincomelastview.defineColumn("autokind", typeof(byte));
            tincomelastview.defineColumn("autocode", typeof(int));
            tincomelastview.defineColumn("idpayment", typeof(int));
            tincomelastview.defineColumn("expiration", typeof(DateTime));
            tincomelastview.defineColumn("adate", typeof(DateTime), false);
            tincomelastview.defineColumn("nbill", typeof(int));
            tincomelastview.defineColumn("idpro", typeof(int));
            tincomelastview.defineColumn("cu", typeof(string), false);
            tincomelastview.defineColumn("ct", typeof(DateTime), false);
            tincomelastview.defineColumn("lu", typeof(string), false);
            tincomelastview.defineColumn("lt", typeof(DateTime), false);
            tincomelastview.defineColumn("idsor01", typeof(int));
            tincomelastview.defineColumn("idsor02", typeof(int));
            tincomelastview.defineColumn("idsor03", typeof(int));
            tincomelastview.defineColumn("idsor04", typeof(int));
            tincomelastview.defineColumn("idsor05", typeof(int));
            Tables.Add(tincomelastview);
            tincomelastview.defineKey("idinc");

            //////////////////// INCOMEPHASE /////////////////////////////////
            var tincomephase = new MetaTable("incomephase");
            tincomephase.defineColumn("nphase", typeof(byte), false);
            tincomephase.defineColumn("description", typeof(string), false);
            tincomephase.defineColumn("cu", typeof(string), false);
            tincomephase.defineColumn("ct", typeof(DateTime), false);
            tincomephase.defineColumn("lu", typeof(string), false);
            tincomephase.defineColumn("lt", typeof(DateTime), false);
            Tables.Add(tincomephase);
            tincomephase.defineKey("nphase");

            //////////////////// INCOMEVAR /////////////////////////////////
            var tincomevar = new incomevarTable();
            tincomevar.addBaseColumns("idinc", "nvar", "yvar", "description", "amount", "doc", "docdate", "adate", "txt", "rtf", "cu", "ct", "lu", "lt", "autokind", "idinvkind", "ninv", "yinv");
            Tables.Add(tincomevar);
            tincomevar.defineKey("idinc", "nvar");

            //////////////////// BANKTRANSACTION /////////////////////////////////
            var tbanktransaction = new banktransactionTable();
            tbanktransaction.addBaseColumns("yban", "nban", "kpro", "kind", "bankreference", "transactiondate", "valuedate", "amount", "kpay", "cu", "ct", "lu", "lt", "idexp", "idinc", "idpay", "idpro", "idbankimport");
            tbanktransaction.defineColumn("!nmov", typeof(int));
            Tables.Add(tbanktransaction);
            tbanktransaction.defineKey("yban", "nban", "kpro");

            //////////////////// PROCEEDS_BANKVIEW /////////////////////////////////
            var tproceeds_bankview = new MetaTable("proceeds_bankview");
            tproceeds_bankview.defineColumn("kpro", typeof(int), false);
            tproceeds_bankview.defineColumn("ypro", typeof(short), false);
            tproceeds_bankview.defineColumn("npro", typeof(int), false);
            tproceeds_bankview.defineColumn("idpro", typeof(int), false);
            tproceeds_bankview.defineColumn("idreg", typeof(int), false);
            tproceeds_bankview.defineColumn("registry", typeof(string), false);
            tproceeds_bankview.defineColumn("description", typeof(string));
            tproceeds_bankview.defineColumn("amount", typeof(decimal), false);
            tproceeds_bankview.defineColumn("ct", typeof(DateTime), false);
            tproceeds_bankview.defineColumn("cu", typeof(string), false);
            tproceeds_bankview.defineColumn("lt", typeof(DateTime), false);
            tproceeds_bankview.defineColumn("lu", typeof(string), false);
            Tables.Add(tproceeds_bankview);
            tproceeds_bankview.defineKey("kpro", "idpro");

            //////////////////// SORTINGKIND /////////////////////////////////
            var tsortingkind = new sortingkindTable();
            tsortingkind.addBaseColumns("idsorkind", "active", "ct", "cu", "description", "flagdate", "flag", "forcedN1", "forcedN2", "forcedN3", "forcedN4", "forcedN5", "forcedS1", "forcedS2", "forcedS3", "forcedS4", "forcedS5", "forcedv1", "forcedv2", "forcedv3", "forcedv4", "forcedv5", "labelfordate", "labeln1", "labeln2", "labeln3", "labeln4", "labeln5", "labels1", "labels2", "labels3", "labels4", "labels5", "labelv1", "labelv2", "labelv3", "labelv4", "labelv5", "lockedN1", "lockedN2", "lockedN3", "lockedN4", "lockedN5", "lockedS1", "lockedS2", "lockedS3", "lockedS4", "lockedS5", "lockedv1", "lockedv2", "lockedv3", "lockedv4", "lockedv5", "lt", "lu", "nodatelabel", "nphaseexpense", "nphaseincome", "totalexpression");
            Tables.Add(tsortingkind);
            tsortingkind.defineKey("idsorkind");

            //////////////////// INCOMESORTED /////////////////////////////////
            var tincomesorted = new incomesortedTable();
            tincomesorted.addBaseColumns("idinc", "idsor", "idsubclass", "amount", "ayear", "ct", "cu", "description", "flagnodate", "lt", "lu", "paridsor", "paridsubclass", "rtf", "start", "stop", "tobecontinued", "txt", "valuen1", "valuen2", "valuen3", "valuen4", "valuen5", "values1", "values2", "values3", "values4", "values5", "valuev1", "valuev2", "valuev3", "valuev4", "valuev5");
            Tables.Add(tincomesorted);
            tincomesorted.defineKey("idinc", "idsor", "idsubclass");

            //////////////////// CONFIG /////////////////////////////////
            var tconfig = new configTable();
            tconfig.addBaseColumns("ayear", "automanagekind", "agencycode", "appname", "appropriationphasecode", "assessmentphasecode", "asset_flagnumbering", "asset_flagrestart", "flag_autodocnumbering", "assetload_flag", "boxpartitiontitle", "cashvaliditykind", "casualcontract_flagrestart", "ct", "cu", "currpartitiontitle", "deferredexpensephase", "deferredincomephase", "electronicimport", "electronictrasmission", "expense_expiringdays", "expensephase", "flag_paymentamount", "flagautopayment", "flagautoproceeds", "flagcredit", "flagepexp", "flagfruitful", "flagpayment", "flagproceeds", "flagrefund", "taxvaliditykind", "foreignhours", "idacc_accruedcost", "idacc_accruedrevenue", "idacc_customer", "idacc_deferredcost", "idacc_deferredcredit", "idacc_deferreddebit", "idacc_deferredrevenue", "idacc_ivapayment", "idacc_ivarefund", "idacc_patrimony", "idacc_pl", "idacc_supplier", "idaccmotive_admincar", "idaccmotive_foot", "idaccmotive_owncar", "idclawback", "idfinexpense", "idfinexpensesurplus", "idfinincomesurplus", "idfinivapayment", "idfinivarefund", "idivapayperiodicity", "idregauto", "idsortingkind1", "idsortingkind2", "idsortingkind3", "importappname", "income_expiringdays", "incomephase", "linktoinvoice", "lt", "lu", "minpayment", "minrefund", "motivelen", "motiveprefix", "motiveseparator", "payment_finlevel", "payment_flag", "payment_flagautoprintdate", "paymentagency", "flagbank_grouping", "fin_kind", "prevpartitiontitle", "proceeds_finlevel", "proceeds_flag", "proceeds_flagautoprintdate", "profservice_flagrestart", "refundagency", "wageaddition_flagrestart");
            Tables.Add(tconfig);
            tconfig.defineKey("ayear");

            //////////////////// INCOME1 /////////////////////////////////
            var tincome1 = new MetaTable("income1");
            tincome1.defineColumn("adate", typeof(DateTime), false);
            tincome1.defineColumn("ct", typeof(DateTime), false);
            tincome1.defineColumn("cu", typeof(string), false);
            tincome1.defineColumn("description", typeof(string), false);
            tincome1.defineColumn("doc", typeof(string));
            tincome1.defineColumn("docdate", typeof(DateTime));
            tincome1.defineColumn("expiration", typeof(DateTime));
            tincome1.defineColumn("idreg", typeof(int));
            tincome1.defineColumn("lt", typeof(DateTime), false);
            tincome1.defineColumn("lu", typeof(string), false);
            tincome1.defineColumn("nmov", typeof(int), false);
            tincome1.defineColumn("rtf", typeof(Byte[]));
            tincome1.defineColumn("txt", typeof(string));
            tincome1.defineColumn("ymov", typeof(short), false);
            tincome1.defineColumn("idman", typeof(int));
            tincome1.defineColumn("nphase", typeof(byte), false);
            tincome1.defineColumn("idpayment", typeof(int));
            tincome1.defineColumn("idinc", typeof(int), false);
            tincome1.defineColumn("parentidinc", typeof(int));
            tincome1.defineColumn("autokind", typeof(byte));
            tincome1.defineColumn("autocode", typeof(int));
            Tables.Add(tincome1);
            tincome1.defineKey("idinc");

            //////////////////// STAMPHANDLING /////////////////////////////////
            var tstamphandling = new MetaTable("stamphandling");
            tstamphandling.defineColumn("active", typeof(string));
            tstamphandling.defineColumn("ct", typeof(DateTime), false);
            tstamphandling.defineColumn("cu", typeof(string), false);
            tstamphandling.defineColumn("description", typeof(string), false);
            tstamphandling.defineColumn("flagdefault", typeof(string), false);
            tstamphandling.defineColumn("lt", typeof(DateTime), false);
            tstamphandling.defineColumn("lu", typeof(string), false);
            tstamphandling.defineColumn("handlingbankcode", typeof(string));
            tstamphandling.defineColumn("idstamphandling", typeof(int), false);
            Tables.Add(tstamphandling);
            tstamphandling.defineKey("idstamphandling");

            //////////////////// SORTING01 /////////////////////////////////
            var tsorting01 = new MetaTable("sorting01");
            tsorting01.defineColumn("ct", typeof(DateTime), false);
            tsorting01.defineColumn("cu", typeof(string), false);
            tsorting01.defineColumn("defaultN1", typeof(decimal));
            tsorting01.defineColumn("defaultN2", typeof(decimal));
            tsorting01.defineColumn("defaultN3", typeof(decimal));
            tsorting01.defineColumn("defaultN4", typeof(decimal));
            tsorting01.defineColumn("defaultN5", typeof(decimal));
            tsorting01.defineColumn("defaultS1", typeof(string));
            tsorting01.defineColumn("defaultS2", typeof(string));
            tsorting01.defineColumn("defaultS3", typeof(string));
            tsorting01.defineColumn("defaultS4", typeof(string));
            tsorting01.defineColumn("defaultS5", typeof(string));
            tsorting01.defineColumn("defaultv1", typeof(decimal));
            tsorting01.defineColumn("defaultv2", typeof(decimal));
            tsorting01.defineColumn("defaultv3", typeof(decimal));
            tsorting01.defineColumn("defaultv4", typeof(decimal));
            tsorting01.defineColumn("defaultv5", typeof(decimal));
            tsorting01.defineColumn("description", typeof(string), false);
            tsorting01.defineColumn("flagnodate", typeof(string));
            tsorting01.defineColumn("lt", typeof(DateTime), false);
            tsorting01.defineColumn("lu", typeof(string), false);
            tsorting01.defineColumn("movkind", typeof(string));
            tsorting01.defineColumn("printingorder", typeof(string));
            tsorting01.defineColumn("rtf", typeof(Byte[]));
            tsorting01.defineColumn("sortcode", typeof(string), false);
            tsorting01.defineColumn("txt", typeof(string));
            tsorting01.defineColumn("idsorkind", typeof(int), false);
            tsorting01.defineColumn("idsor", typeof(int), false);
            tsorting01.defineColumn("paridsor", typeof(int));
            tsorting01.defineColumn("nlevel", typeof(byte), false);
            tsorting01.defineColumn("start", typeof(short));
            tsorting01.defineColumn("stop", typeof(short));
            Tables.Add(tsorting01);
            tsorting01.defineKey("idsor");

            //////////////////// SORTING02 /////////////////////////////////
            var tsorting02 = new MetaTable("sorting02");
            tsorting02.defineColumn("ct", typeof(DateTime), false);
            tsorting02.defineColumn("cu", typeof(string), false);
            tsorting02.defineColumn("defaultN1", typeof(decimal));
            tsorting02.defineColumn("defaultN2", typeof(decimal));
            tsorting02.defineColumn("defaultN3", typeof(decimal));
            tsorting02.defineColumn("defaultN4", typeof(decimal));
            tsorting02.defineColumn("defaultN5", typeof(decimal));
            tsorting02.defineColumn("defaultS1", typeof(string));
            tsorting02.defineColumn("defaultS2", typeof(string));
            tsorting02.defineColumn("defaultS3", typeof(string));
            tsorting02.defineColumn("defaultS4", typeof(string));
            tsorting02.defineColumn("defaultS5", typeof(string));
            tsorting02.defineColumn("defaultv1", typeof(decimal));
            tsorting02.defineColumn("defaultv2", typeof(decimal));
            tsorting02.defineColumn("defaultv3", typeof(decimal));
            tsorting02.defineColumn("defaultv4", typeof(decimal));
            tsorting02.defineColumn("defaultv5", typeof(decimal));
            tsorting02.defineColumn("description", typeof(string), false);
            tsorting02.defineColumn("flagnodate", typeof(string));
            tsorting02.defineColumn("lt", typeof(DateTime), false);
            tsorting02.defineColumn("lu", typeof(string), false);
            tsorting02.defineColumn("movkind", typeof(string));
            tsorting02.defineColumn("printingorder", typeof(string));
            tsorting02.defineColumn("rtf", typeof(Byte[]));
            tsorting02.defineColumn("sortcode", typeof(string), false);
            tsorting02.defineColumn("txt", typeof(string));
            tsorting02.defineColumn("idsorkind", typeof(int), false);
            tsorting02.defineColumn("idsor", typeof(int), false);
            tsorting02.defineColumn("paridsor", typeof(int));
            tsorting02.defineColumn("nlevel", typeof(byte), false);
            tsorting02.defineColumn("start", typeof(short));
            tsorting02.defineColumn("stop", typeof(short));
            Tables.Add(tsorting02);
            tsorting02.defineKey("idsor");

            //////////////////// SORTING03 /////////////////////////////////
            var tsorting03 = new MetaTable("sorting03");
            tsorting03.defineColumn("ct", typeof(DateTime), false);
            tsorting03.defineColumn("cu", typeof(string), false);
            tsorting03.defineColumn("defaultN1", typeof(decimal));
            tsorting03.defineColumn("defaultN2", typeof(decimal));
            tsorting03.defineColumn("defaultN3", typeof(decimal));
            tsorting03.defineColumn("defaultN4", typeof(decimal));
            tsorting03.defineColumn("defaultN5", typeof(decimal));
            tsorting03.defineColumn("defaultS1", typeof(string));
            tsorting03.defineColumn("defaultS2", typeof(string));
            tsorting03.defineColumn("defaultS3", typeof(string));
            tsorting03.defineColumn("defaultS4", typeof(string));
            tsorting03.defineColumn("defaultS5", typeof(string));
            tsorting03.defineColumn("defaultv1", typeof(decimal));
            tsorting03.defineColumn("defaultv2", typeof(decimal));
            tsorting03.defineColumn("defaultv3", typeof(decimal));
            tsorting03.defineColumn("defaultv4", typeof(decimal));
            tsorting03.defineColumn("defaultv5", typeof(decimal));
            tsorting03.defineColumn("description", typeof(string), false);
            tsorting03.defineColumn("flagnodate", typeof(string));
            tsorting03.defineColumn("lt", typeof(DateTime), false);
            tsorting03.defineColumn("lu", typeof(string), false);
            tsorting03.defineColumn("movkind", typeof(string));
            tsorting03.defineColumn("printingorder", typeof(string));
            tsorting03.defineColumn("rtf", typeof(Byte[]));
            tsorting03.defineColumn("sortcode", typeof(string), false);
            tsorting03.defineColumn("txt", typeof(string));
            tsorting03.defineColumn("idsorkind", typeof(int), false);
            tsorting03.defineColumn("idsor", typeof(int), false);
            tsorting03.defineColumn("paridsor", typeof(int));
            tsorting03.defineColumn("nlevel", typeof(byte), false);
            tsorting03.defineColumn("start", typeof(short));
            tsorting03.defineColumn("stop", typeof(short));
            Tables.Add(tsorting03);
            tsorting03.defineKey("idsor");

            //////////////////// SORTING04 /////////////////////////////////
            var tsorting04 = new MetaTable("sorting04");
            tsorting04.defineColumn("ct", typeof(DateTime), false);
            tsorting04.defineColumn("cu", typeof(string), false);
            tsorting04.defineColumn("defaultN1", typeof(decimal));
            tsorting04.defineColumn("defaultN2", typeof(decimal));
            tsorting04.defineColumn("defaultN3", typeof(decimal));
            tsorting04.defineColumn("defaultN4", typeof(decimal));
            tsorting04.defineColumn("defaultN5", typeof(decimal));
            tsorting04.defineColumn("defaultS1", typeof(string));
            tsorting04.defineColumn("defaultS2", typeof(string));
            tsorting04.defineColumn("defaultS3", typeof(string));
            tsorting04.defineColumn("defaultS4", typeof(string));
            tsorting04.defineColumn("defaultS5", typeof(string));
            tsorting04.defineColumn("defaultv1", typeof(decimal));
            tsorting04.defineColumn("defaultv2", typeof(decimal));
            tsorting04.defineColumn("defaultv3", typeof(decimal));
            tsorting04.defineColumn("defaultv4", typeof(decimal));
            tsorting04.defineColumn("defaultv5", typeof(decimal));
            tsorting04.defineColumn("description", typeof(string), false);
            tsorting04.defineColumn("flagnodate", typeof(string));
            tsorting04.defineColumn("lt", typeof(DateTime), false);
            tsorting04.defineColumn("lu", typeof(string), false);
            tsorting04.defineColumn("movkind", typeof(string));
            tsorting04.defineColumn("printingorder", typeof(string));
            tsorting04.defineColumn("rtf", typeof(Byte[]));
            tsorting04.defineColumn("sortcode", typeof(string), false);
            tsorting04.defineColumn("txt", typeof(string));
            tsorting04.defineColumn("idsorkind", typeof(int), false);
            tsorting04.defineColumn("idsor", typeof(int), false);
            tsorting04.defineColumn("paridsor", typeof(int));
            tsorting04.defineColumn("nlevel", typeof(byte), false);
            tsorting04.defineColumn("start", typeof(short));
            tsorting04.defineColumn("stop", typeof(short));
            Tables.Add(tsorting04);
            tsorting04.defineKey("idsor");

            //////////////////// SORTING05 /////////////////////////////////
            var tsorting05 = new MetaTable("sorting05");
            tsorting05.defineColumn("ct", typeof(DateTime), false);
            tsorting05.defineColumn("cu", typeof(string), false);
            tsorting05.defineColumn("defaultN1", typeof(decimal));
            tsorting05.defineColumn("defaultN2", typeof(decimal));
            tsorting05.defineColumn("defaultN3", typeof(decimal));
            tsorting05.defineColumn("defaultN4", typeof(decimal));
            tsorting05.defineColumn("defaultN5", typeof(decimal));
            tsorting05.defineColumn("defaultS1", typeof(string));
            tsorting05.defineColumn("defaultS2", typeof(string));
            tsorting05.defineColumn("defaultS3", typeof(string));
            tsorting05.defineColumn("defaultS4", typeof(string));
            tsorting05.defineColumn("defaultS5", typeof(string));
            tsorting05.defineColumn("defaultv1", typeof(decimal));
            tsorting05.defineColumn("defaultv2", typeof(decimal));
            tsorting05.defineColumn("defaultv3", typeof(decimal));
            tsorting05.defineColumn("defaultv4", typeof(decimal));
            tsorting05.defineColumn("defaultv5", typeof(decimal));
            tsorting05.defineColumn("description", typeof(string), false);
            tsorting05.defineColumn("flagnodate", typeof(string));
            tsorting05.defineColumn("lt", typeof(DateTime), false);
            tsorting05.defineColumn("lu", typeof(string), false);
            tsorting05.defineColumn("movkind", typeof(string));
            tsorting05.defineColumn("printingorder", typeof(string));
            tsorting05.defineColumn("rtf", typeof(Byte[]));
            tsorting05.defineColumn("sortcode", typeof(string), false);
            tsorting05.defineColumn("txt", typeof(string));
            tsorting05.defineColumn("idsorkind", typeof(int), false);
            tsorting05.defineColumn("idsor", typeof(int), false);
            tsorting05.defineColumn("paridsor", typeof(int));
            tsorting05.defineColumn("nlevel", typeof(byte), false);
            tsorting05.defineColumn("start", typeof(short));
            tsorting05.defineColumn("stop", typeof(short));
            Tables.Add(tsorting05);
            tsorting05.defineKey("idsor");

            #endregion


            #region DataRelation creation
            this.defineRelation("incomelastview_incomesorted", "incomelastview", "incomesorted", "idinc");
            this.defineRelation("proceedsproceeds_bankview", "proceeds", "proceeds_bankview", "kpro");
            this.defineRelation("income1_banktransaction", "income1", "banktransaction", "idinc");
            this.defineRelation("proceedsbanktransaction", "proceeds", "banktransaction", "kpro");
            this.defineRelation("incomelastviewincomevar", "incomelastview", "incomevar", "idinc");
            this.defineRelation("proceedsincomelastview", "proceeds", "incomelastview", "kpro");
            var cPar   = new [] { sorting05.Columns["idsor"] };
            var cChild = new [] { proceeds.Columns["idsor05"] };
            Relations.Add(new DataRelation("sorting05_proceeds", cPar, cChild, false));

            cPar   = new [] { sorting04.Columns["idsor"] };
            cChild = new [] { proceeds.Columns["idsor04"] };
            Relations.Add(new DataRelation("sorting04_proceeds", cPar, cChild, false));

            cPar   = new [] { sorting03.Columns["idsor"] };
            cChild = new [] { proceeds.Columns["idsor03"] };
            Relations.Add(new DataRelation("sorting03_proceeds", cPar, cChild, false));

            cPar   = new [] { sorting02.Columns["idsor"] };
            cChild = new [] { proceeds.Columns["idsor02"] };
            Relations.Add(new DataRelation("sorting02_proceeds", cPar, cChild, false));

            cPar   = new [] { sorting01.Columns["idsor"] };
            cChild = new [] { proceeds.Columns["idsor01"] };
            Relations.Add(new DataRelation("sorting01_proceeds", cPar, cChild, false));

            this.defineRelation("treasurerproceeds", "treasurer", "proceeds", "idtreasurer");
            this.defineRelation("finproceeds", "fin", "proceeds", "idfin");
            this.defineRelation("registryproceeds", "registry", "proceeds", "idreg");
            this.defineRelation("managerproceeds", "manager", "proceeds", "idman");
            this.defineRelation("proceedstransmissionproceeds", "proceedstransmission", "proceeds", "kproceedstransmission");
            this.defineRelation("FK_stamphandling_proceeds", "stamphandling", "proceeds", "idstamphandling");
            #endregion
        }
Пример #2
0
        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
        }
Пример #3
0
        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
        }