private void initClass() { DataSetName = "dsmeta"; Prefix = ""; Namespace = "http://tempuri.org/dsmeta.xsd"; #region create DataTables //////////////////// IVAKIND ///////////////////////////////// var tivakind = new ivakindTable(); tivakind.addBaseColumns("idivakind", "description", "rate", "unabatabilitypercentage", "cu", "ct", "lu", "lt", "active", "idivataxablekind", "flag", "idfenature"); Tables.Add(tivakind); tivakind.defineKey("idivakind"); //////////////////// INVOICEDETAIL ///////////////////////////////// var tinvoicedetail = new invoicedetailTable(); tinvoicedetail.addBaseColumns("idinvkind", "yinv", "ninv", "rownum", "idivakind", "detaildescription", "annotations", "taxable", "tax", "unabatable", "cu", "ct", "lu", "lt", "discount", "idmankind", "yman", "nman", "manrownum", "number", "idupb", "idsor1", "idsor2", "idsor3", "competencystart", "competencystop", "paymentcompetency", "idaccmotive", "idestimkind", "yestim", "nestim", "estimrownum", "idexp_iva", "idexp_taxable", "idinc_iva", "idinc_taxable", "idgroup", "yinv_main", "ninv_main", "va3type", "idintrastatcode", "idintrastatmeasure", "weight", "intrastatoperationkind", "idintrastatservice", "idintrastatsupplymethod", "idlist", "idunit", "idpackage", "unitsforpackage", "npackage", "flag", "exception12", "intra12operationkind", "move12", "idupb_iva", "idinvkind_main", "leasing", "usedmodesospesometro", "resetresidualmandate", "idfetransfer", "fereferencerule", "cupcode", "cigcode", "idcostpartition", "idpccdebitmotive", "idpccdebitstatus", "expensekind", "rounding", "idepexp", "idepacc", "flagbit", "idfinmotive", "iduniqueformcode", "ycon", "ncon", "codicetipo", "codicevalore", "idsor_siope", "idepexp_pre"); Tables.Add(tinvoicedetail); tinvoicedetail.defineKey("idinvkind", "yinv", "ninv", "rownum"); //////////////////// SORTING1 ///////////////////////////////// var tsorting1 = new sortingTable(); tsorting1.TableName = "sorting1"; tsorting1.addBaseColumns("idsorkind", "idsor", "sortcode", "paridsor", "nlevel", "description", "txt", "rtf", "cu", "ct", "lu", "lt", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "flagnodate", "movkind", "printingorder", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5"); tsorting1.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting1); tsorting1.defineKey("idsor"); //////////////////// SORTING2 ///////////////////////////////// var tsorting2 = new sortingTable(); tsorting2.TableName = "sorting2"; tsorting2.addBaseColumns("idsorkind", "idsor", "sortcode", "paridsor", "nlevel", "description", "txt", "rtf", "cu", "ct", "lu", "lt", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "flagnodate", "movkind", "printingorder", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5"); tsorting2.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting2); tsorting2.defineKey("idsor"); //////////////////// SORTING3 ///////////////////////////////// var tsorting3 = new sortingTable(); tsorting3.TableName = "sorting3"; tsorting3.addBaseColumns("idsorkind", "idsor", "sortcode", "paridsor", "nlevel", "description", "txt", "rtf", "cu", "ct", "lu", "lt", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "flagnodate", "movkind", "printingorder", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5"); tsorting3.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting3); tsorting3.defineKey("idsor"); //////////////////// UPB ///////////////////////////////// var tupb = new upbTable(); tupb.addBaseColumns("idupb", "codeupb", "title", "paridupb", "idunderwriter", "idman", "requested", "granted", "previousappropriation", "expiration", "txt", "rtf", "cu", "ct", "lu", "lt", "assured", "printingorder", "active"); Tables.Add(tupb); tupb.defineKey("idupb"); //////////////////// MANDATEKIND ///////////////////////////////// var tmandatekind = new mandatekindTable(); tmandatekind.addBaseColumns("idmankind", "description", "idupb", "rtf", "txt", "cu", "ct", "lu", "lt", "active"); Tables.Add(tmandatekind); tmandatekind.defineKey("idmankind"); //////////////////// ACCMOTIVEAPPLIED ///////////////////////////////// var taccmotiveapplied = new accmotiveappliedTable(); taccmotiveapplied.addBaseColumns("idaccmotive", "paridaccmotive", "codemotive", "motive", "cu", "ct", "lu", "lt", "active", "idepoperation", "epoperation", "in_use", "expensekind"); Tables.Add(taccmotiveapplied); taccmotiveapplied.defineKey("idaccmotive"); //////////////////// ESTIMATEKIND ///////////////////////////////// var testimatekind = new estimatekindTable(); testimatekind.addBaseColumns("idestimkind", "active", "ct", "cu", "description", "idupb", "lt", "lu", "rtf", "txt", "email", "faxnumber", "office", "phonenumber"); Tables.Add(testimatekind); testimatekind.defineKey("idestimkind"); //////////////////// EXPENSE_IVA ///////////////////////////////// var texpense_iva = new expenseTable(); texpense_iva.TableName = "expense_iva"; texpense_iva.addBaseColumns("adate", "ct", "cu", "description", "doc", "docdate", "expiration", "idreg", "lt", "lu", "nmov", "txt", "ymov", "idclawback", "idman", "nphase", "idexp", "parentidexp", "idpayment", "idformerexpense", "autokind", "autocode"); texpense_iva.ExtendedProperties["TableForReading"] = "expense"; Tables.Add(texpense_iva); texpense_iva.defineKey("idexp"); //////////////////// EXPENSE_TAXABLE ///////////////////////////////// var texpense_taxable = new expenseTable(); texpense_taxable.TableName = "expense_taxable"; texpense_taxable.addBaseColumns("adate", "ct", "cu", "description", "doc", "docdate", "expiration", "idreg", "lt", "lu", "nmov", "txt", "ymov", "idclawback", "idman", "nphase", "idexp", "parentidexp", "idpayment", "idformerexpense", "autokind", "autocode"); texpense_taxable.ExtendedProperties["TableForReading"] = "expense"; Tables.Add(texpense_taxable); texpense_taxable.defineKey("idexp"); //////////////////// INCOME_IVA ///////////////////////////////// var tincome_iva = new incomeTable(); tincome_iva.TableName = "income_iva"; tincome_iva.addBaseColumns("adate", "ct", "cu", "description", "doc", "docdate", "expiration", "idreg", "lt", "lu", "nmov", "ymov", "idman", "nphase", "idpayment", "idinc", "parentidinc", "autokind", "autocode"); tincome_iva.ExtendedProperties["TableForReading"] = "income"; Tables.Add(tincome_iva); tincome_iva.defineKey("idinc"); //////////////////// INCOME_TAXABLE ///////////////////////////////// var tincome_taxable = new incomeTable(); tincome_taxable.TableName = "income_taxable"; tincome_taxable.addBaseColumns("adate", "ct", "cu", "description", "doc", "docdate", "expiration", "idreg", "lt", "lu", "nmov", "ymov", "idman", "nphase", "idpayment", "idinc", "parentidinc", "autokind", "autocode"); tincome_taxable.ExtendedProperties["TableForReading"] = "income"; Tables.Add(tincome_taxable); tincome_taxable.defineKey("idinc"); //////////////////// INTRASTATMEASURE ///////////////////////////////// var tintrastatmeasure = new MetaTable("intrastatmeasure"); tintrastatmeasure.defineColumn("idintrastatmeasure", typeof(int), false); tintrastatmeasure.defineColumn("code", typeof(string), false); tintrastatmeasure.defineColumn("description", typeof(string), false); tintrastatmeasure.defineColumn("lt", typeof(DateTime)); tintrastatmeasure.defineColumn("lu", typeof(string)); Tables.Add(tintrastatmeasure); tintrastatmeasure.defineKey("idintrastatmeasure"); //////////////////// INTRASTATCODE ///////////////////////////////// var tintrastatcode = new MetaTable("intrastatcode"); tintrastatcode.defineColumn("ayear", typeof(short), false); tintrastatcode.defineColumn("code", typeof(string), false); tintrastatcode.defineColumn("description", typeof(string), false); tintrastatcode.defineColumn("idintrastatmeasure", typeof(int)); tintrastatcode.defineColumn("lt", typeof(DateTime)); tintrastatcode.defineColumn("lu", typeof(string)); tintrastatcode.defineColumn("idintrastatcode", typeof(int), false); Tables.Add(tintrastatcode); tintrastatcode.defineKey("idintrastatcode"); //////////////////// INTRASTATSERVICE ///////////////////////////////// var tintrastatservice = new MetaTable("intrastatservice"); tintrastatservice.defineColumn("description", typeof(string), false); tintrastatservice.defineColumn("code", typeof(string), false); tintrastatservice.defineColumn("cu", typeof(string), false); tintrastatservice.defineColumn("ct", typeof(DateTime), false); tintrastatservice.defineColumn("lu", typeof(string), false); tintrastatservice.defineColumn("lt", typeof(DateTime), false); tintrastatservice.defineColumn("ayear", typeof(short), false); tintrastatservice.defineColumn("idintrastatservice", typeof(int), false, true); Tables.Add(tintrastatservice); tintrastatservice.defineKey("idintrastatservice"); //////////////////// INTRASTATSUPPLYMETHOD ///////////////////////////////// var tintrastatsupplymethod = new MetaTable("intrastatsupplymethod"); tintrastatsupplymethod.defineColumn("idintrastatsupplymethod", typeof(int), false); tintrastatsupplymethod.defineColumn("code", typeof(string), false); tintrastatsupplymethod.defineColumn("description", typeof(string), false); tintrastatsupplymethod.defineColumn("cu", typeof(string), false); tintrastatsupplymethod.defineColumn("ct", typeof(DateTime), false); tintrastatsupplymethod.defineColumn("lu", typeof(string), false); tintrastatsupplymethod.defineColumn("lt", typeof(DateTime), false); Tables.Add(tintrastatsupplymethod); tintrastatsupplymethod.defineKey("idintrastatsupplymethod"); //////////////////// LISTVIEW ///////////////////////////////// var tlistview = new MetaTable("listview"); tlistview.defineColumn("idlist", typeof(int), false); tlistview.defineColumn("description", typeof(string), false); tlistview.defineColumn("intcode", typeof(string), false); tlistview.defineColumn("intbarcode", typeof(string)); tlistview.defineColumn("extcode", typeof(string)); tlistview.defineColumn("extbarcode", typeof(string)); tlistview.defineColumn("validitystop", typeof(DateTime)); tlistview.defineColumn("active", typeof(string), false); tlistview.defineColumn("idpackage", typeof(int)); tlistview.defineColumn("package", typeof(string)); tlistview.defineColumn("idunit", typeof(int)); tlistview.defineColumn("unit", typeof(string)); tlistview.defineColumn("unitsforpackage", typeof(int)); tlistview.defineColumn("has_expiry", typeof(string), false); tlistview.defineColumn("idlistclass", typeof(string), false); tlistview.defineColumn("codelistclass", typeof(string), false); tlistview.defineColumn("listclass", typeof(string), false); Tables.Add(tlistview); tlistview.defineKey("idlist"); //////////////////// PACKAGE ///////////////////////////////// var tpackage = new MetaTable("package"); tpackage.defineColumn("idpackage", typeof(int), false); tpackage.defineColumn("description", typeof(string), false); tpackage.defineColumn("cu", typeof(string), false); tpackage.defineColumn("ct", typeof(DateTime), false); tpackage.defineColumn("lu", typeof(string), false); tpackage.defineColumn("lt", typeof(DateTime), false); tpackage.defineColumn("active", typeof(string), false); Tables.Add(tpackage); tpackage.defineKey("idpackage"); //////////////////// UNIT ///////////////////////////////// var tunit = new MetaTable("unit"); tunit.defineColumn("idunit", typeof(int), false); tunit.defineColumn("description", typeof(string), false); tunit.defineColumn("cu", typeof(string), false); tunit.defineColumn("ct", typeof(DateTime), false); tunit.defineColumn("lu", typeof(string), false); tunit.defineColumn("lt", typeof(DateTime), false); tunit.defineColumn("active", typeof(string), false); Tables.Add(tunit); tunit.defineKey("idunit"); //////////////////// LISTCLASS ///////////////////////////////// var tlistclass = new MetaTable("listclass"); tlistclass.defineColumn("idlistclass", typeof(string), false); tlistclass.defineColumn("active", typeof(string), false); tlistclass.defineColumn("codelistclass", typeof(string), false); tlistclass.defineColumn("paridlistclass", typeof(string)); tlistclass.defineColumn("printingorder", typeof(string), false); tlistclass.defineColumn("title", typeof(string), false); tlistclass.defineColumn("rtf", typeof(Byte[])); tlistclass.defineColumn("txt", typeof(string)); tlistclass.defineColumn("ct", typeof(DateTime), false); tlistclass.defineColumn("cu", typeof(string), false); tlistclass.defineColumn("lt", typeof(DateTime), false); tlistclass.defineColumn("lu", typeof(string), false); tlistclass.defineColumn("authrequired", typeof(string)); tlistclass.defineColumn("idaccmotive", typeof(string)); Tables.Add(tlistclass); tlistclass.defineKey("idlistclass"); //////////////////// UPB_IVA ///////////////////////////////// var tupb_iva = new upbTable(); tupb_iva.TableName = "upb_iva"; tupb_iva.addBaseColumns("idupb", "active", "assured", "codeupb", "ct", "cu", "expiration", "granted", "lt", "lu", "paridupb", "previousappropriation", "previousassessment", "printingorder", "requested", "rtf", "title", "txt", "idman", "idunderwriter", "cupcode"); tupb_iva.ExtendedProperties["TableForReading"] = "upb"; Tables.Add(tupb_iva); tupb_iva.defineKey("idupb"); //////////////////// INVOICEKIND ///////////////////////////////// var tinvoicekind = new invoicekindTable(); tinvoicekind.addBaseColumns("ct", "cu", "description", "lt", "lu", "codeinvkind", "idinvkind", "flag", "flag_autodocnumbering", "formatstring", "active", "idinvkind_auto"); Tables.Add(tinvoicekind); tinvoicekind.defineKey("idinvkind"); //////////////////// FETRANSFER ///////////////////////////////// var tfetransfer = new MetaTable("fetransfer"); tfetransfer.defineColumn("idfetransfer", typeof(string), false); tfetransfer.defineColumn("description", typeof(string), false); tfetransfer.defineColumn("cu", typeof(string), false); tfetransfer.defineColumn("ct", typeof(DateTime), false); tfetransfer.defineColumn("lu", typeof(string), false); tfetransfer.defineColumn("lt", typeof(DateTime), false); Tables.Add(tfetransfer); //////////////////// PCCDEBITMOTIVE ///////////////////////////////// var tpccdebitmotive = new MetaTable("pccdebitmotive"); tpccdebitmotive.defineColumn("idpccdebitmotive", typeof(string), false); tpccdebitmotive.defineColumn("description", typeof(string)); tpccdebitmotive.defineColumn("listingorder", typeof(int)); tpccdebitmotive.defineColumn("lu", typeof(string), false); tpccdebitmotive.defineColumn("lt", typeof(DateTime), false); tpccdebitmotive.defineColumn("flagstatus", typeof(int)); Tables.Add(tpccdebitmotive); tpccdebitmotive.defineKey("idpccdebitmotive"); //////////////////// PCCDEBITSTATUS ///////////////////////////////// var tpccdebitstatus = new MetaTable("pccdebitstatus"); tpccdebitstatus.defineColumn("idpccdebitstatus", typeof(string), false); tpccdebitstatus.defineColumn("description", typeof(string)); tpccdebitstatus.defineColumn("lt", typeof(DateTime), false); tpccdebitstatus.defineColumn("lu", typeof(string), false); tpccdebitstatus.defineColumn("listingorder", typeof(int)); tpccdebitstatus.defineColumn("flag", typeof(int)); Tables.Add(tpccdebitstatus); tpccdebitstatus.defineKey("idpccdebitstatus"); //////////////////// COSTPARTITION ///////////////////////////////// var tcostpartition = new MetaTable("costpartition"); tcostpartition.defineColumn("idcostpartition", typeof(int), false); tcostpartition.defineColumn("title", typeof(string)); tcostpartition.defineColumn("kind", typeof(string)); tcostpartition.defineColumn("lt", typeof(DateTime)); tcostpartition.defineColumn("lu", typeof(string)); tcostpartition.defineColumn("ct", typeof(DateTime)); tcostpartition.defineColumn("cu", typeof(string)); tcostpartition.defineColumn("costpartitioncode", typeof(string)); tcostpartition.defineColumn("active", typeof(string)); tcostpartition.defineColumn("description", typeof(string)); Tables.Add(tcostpartition); tcostpartition.defineKey("idcostpartition"); //////////////////// EPEXP ///////////////////////////////// var tepexp = new epexpTable(); tepexp.addBaseColumns("idepexp", "adate", "ct", "cu", "description", "doc", "docdate", "idman", "idreg", "idrelated", "lt", "lu", "nepexp", "nphase", "paridepexp", "rtf", "start", "stop", "txt", "yepexp"); Tables.Add(tepexp); tepexp.defineKey("idepexp"); //////////////////// INVOICEDETAILDEFERRED ///////////////////////////////// var tinvoicedetaildeferred = new MetaTable("invoicedetaildeferred"); tinvoicedetaildeferred.defineColumn("idinvkind", typeof(int), false); tinvoicedetaildeferred.defineColumn("yinv", typeof(short), false); tinvoicedetaildeferred.defineColumn("ninv", typeof(int), false); tinvoicedetaildeferred.defineColumn("rownum", typeof(int), false); tinvoicedetaildeferred.defineColumn("yivapay", typeof(int), false); tinvoicedetaildeferred.defineColumn("nivapay", typeof(int), false); tinvoicedetaildeferred.defineColumn("ivatotalpayed", typeof(decimal)); tinvoicedetaildeferred.defineColumn("taxable", typeof(decimal)); tinvoicedetaildeferred.defineColumn("cu", typeof(string)); tinvoicedetaildeferred.defineColumn("ct", typeof(DateTime)); tinvoicedetaildeferred.defineColumn("lu", typeof(string)); tinvoicedetaildeferred.defineColumn("lt", typeof(string)); tinvoicedetaildeferred.defineColumn("idivaregisterkind", typeof(int), false); Tables.Add(tinvoicedetaildeferred); tinvoicedetaildeferred.defineKey("idinvkind", "yinv", "ninv", "rownum", "yivapay", "nivapay", "idivaregisterkind"); //////////////////// EPACC ///////////////////////////////// var tepacc = new MetaTable("epacc"); tepacc.defineColumn("idepacc", typeof(int), false); tepacc.defineColumn("adate", typeof(DateTime), false); tepacc.defineColumn("ct", typeof(DateTime), false); tepacc.defineColumn("cu", typeof(string), false); tepacc.defineColumn("description", typeof(string), false); tepacc.defineColumn("doc", typeof(string)); tepacc.defineColumn("docdate", typeof(DateTime)); tepacc.defineColumn("idman", typeof(int)); tepacc.defineColumn("idreg", typeof(int)); tepacc.defineColumn("idrelated", typeof(string)); tepacc.defineColumn("lt", typeof(DateTime), false); tepacc.defineColumn("lu", typeof(string), false); tepacc.defineColumn("nepacc", typeof(int), false); tepacc.defineColumn("nphase", typeof(short), false); tepacc.defineColumn("paridepacc", typeof(int)); tepacc.defineColumn("rtf", typeof(Byte[])); tepacc.defineColumn("start", typeof(DateTime)); tepacc.defineColumn("stop", typeof(DateTime)); tepacc.defineColumn("txt", typeof(string)); tepacc.defineColumn("yepacc", typeof(short), false); tepacc.defineColumn("flagvariation", typeof(string)); Tables.Add(tepacc); tepacc.defineKey("idepacc"); //////////////////// FINMOTIVE_INCOME ///////////////////////////////// var tfinmotive_income = new MetaTable("finmotive_income"); tfinmotive_income.defineColumn("idfinmotive", typeof(string), false); tfinmotive_income.defineColumn("active", typeof(string), false); tfinmotive_income.defineColumn("codemotive", typeof(string), false); tfinmotive_income.defineColumn("paridfinmotive", typeof(string)); tfinmotive_income.defineColumn("title", typeof(string), false); tfinmotive_income.defineColumn("lt", typeof(DateTime)); tfinmotive_income.defineColumn("lu", typeof(string)); tfinmotive_income.defineColumn("ct", typeof(DateTime)); tfinmotive_income.defineColumn("cu", typeof(string)); tfinmotive_income.ExtendedProperties["TableForReading"] = "finmotive"; Tables.Add(tfinmotive_income); tfinmotive_income.defineKey("idfinmotive"); //////////////////// SORTING_SIOPE ///////////////////////////////// var tsorting_siope = new sortingTable(); tsorting_siope.TableName = "sorting_siope"; tsorting_siope.addBaseColumns("ct", "cu", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5", "description", "flagnodate", "lt", "lu", "movkind", "printingorder", "rtf", "sortcode", "txt", "idsorkind", "idsor", "paridsor", "nlevel", "start", "stop", "email"); tsorting_siope.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting_siope); tsorting_siope.defineKey("idsor"); //////////////////// EPEXP_PRE ///////////////////////////////// var tepexp_pre = new epexpTable(); tepexp_pre.TableName = "epexp_pre"; tepexp_pre.addBaseColumns("idepexp", "adate", "ct", "cu", "description", "doc", "docdate", "idman", "idreg", "idrelated", "lt", "lu", "nepexp", "nphase", "paridepexp", "rtf", "start", "stop", "txt", "yepexp"); tepexp_pre.ExtendedProperties["TableForReading"] = "epexp"; Tables.Add(tepexp_pre); tepexp_pre.defineKey("idepexp"); #endregion #region DataRelation creation this.defineRelation("FK_invoicekind_invoicedetaildeferred", "invoicekind", "invoicedetaildeferred", "idinvkind"); this.defineRelation("FK_invoicedetail_invoicedetaildeferred", "invoicedetail", "invoicedetaildeferred", "idinvkind", "yinv", "ninv", "rownum"); this.defineRelation("FK_epacc_invoicedetail", "epacc", "invoicedetail", "idepacc"); this.defineRelation("FK_epexp_invoicedetail", "epexp", "invoicedetail", "idepexp"); this.defineRelation("FK_pccdebitstatus_invoicedetail", "pccdebitstatus", "invoicedetail", "idpccdebitstatus"); this.defineRelation("FK_pccdebitmotive_invoicedetail", "pccdebitmotive", "invoicedetail", "idpccdebitmotive"); this.defineRelation("FK_fetransfer_invoicedetail", "fetransfer", "invoicedetail", "idfetransfer"); var cPar = new [] { upb_iva.Columns["idupb"] }; var cChild = new [] { invoicedetail.Columns["idupb_iva"] }; Relations.Add(new DataRelation("FK_upb_iva_invoicedetail", cPar, cChild, false)); this.defineRelation("FK_package_invoicedetail", "package", "invoicedetail", "idpackage"); this.defineRelation("FK_unit_invoicedetail", "unit", "invoicedetail", "idunit"); this.defineRelation("FK_listview_invoicedetail", "listview", "invoicedetail", "idlist"); this.defineRelation("FK_intrastatsupplymethod_invoicedetail", "intrastatsupplymethod", "invoicedetail", "idintrastatsupplymethod"); this.defineRelation("FK_intrastatservice_invoicedetail", "intrastatservice", "invoicedetail", "idintrastatservice"); this.defineRelation("ivakindinvoicedetail", "ivakind", "invoicedetail", "idivakind"); this.defineRelation("upbinvoicedetail", "upb", "invoicedetail", "idupb"); this.defineRelation("mandatekindinvoicedetail", "mandatekind", "invoicedetail", "idmankind"); this.defineRelation("estimatekindinvoicedetail", "estimatekind", "invoicedetail", "idestimkind"); cPar = new [] { expense_iva.Columns["idexp"] }; cChild = new [] { invoicedetail.Columns["idexp_iva"] }; Relations.Add(new DataRelation("expense_ivainvoicedetail", cPar, cChild, false)); cPar = new [] { expense_taxable.Columns["idexp"] }; cChild = new [] { invoicedetail.Columns["idexp_taxable"] }; Relations.Add(new DataRelation("expense_taxableinvoicedetail", cPar, cChild, false)); cPar = new [] { income_iva.Columns["idinc"] }; cChild = new [] { invoicedetail.Columns["idinc_iva"] }; Relations.Add(new DataRelation("incomeinvoicedetail", cPar, cChild, false)); cPar = new [] { income_taxable.Columns["idinc"] }; cChild = new [] { invoicedetail.Columns["idinc_taxable"] }; Relations.Add(new DataRelation("income_taxableinvoicedetail", cPar, cChild, false)); this.defineRelation("accmotiveapplied_invoicedetail", "accmotiveapplied", "invoicedetail", "idaccmotive"); cPar = new [] { sorting1.Columns["idsor"] }; cChild = new [] { invoicedetail.Columns["idsor1"] }; Relations.Add(new DataRelation("sorting1invoicedetail", cPar, cChild, false)); cPar = new [] { sorting2.Columns["idsor"] }; cChild = new [] { invoicedetail.Columns["idsor2"] }; Relations.Add(new DataRelation("sorting2invoicedetail", cPar, cChild, false)); cPar = new [] { sorting3.Columns["idsor"] }; cChild = new [] { invoicedetail.Columns["idsor3"] }; Relations.Add(new DataRelation("sorting3invoicedetail", cPar, cChild, false)); this.defineRelation("intrastatmeasure_invoicedetail", "intrastatmeasure", "invoicedetail", "idintrastatmeasure"); this.defineRelation("intrastatcode_invoicedetail", "intrastatcode", "invoicedetail", "idintrastatcode"); cPar = new [] { invoicekind.Columns["idinvkind"] }; cChild = new [] { invoicedetail.Columns["idinvkind_main"] }; Relations.Add(new DataRelation("invoicekind_invoicedetail", cPar, cChild, false)); this.defineRelation("costpartition_invoicedetail", "costpartition", "invoicedetail", "idcostpartition"); this.defineRelation("finmotive_income_invoicedetail", "finmotive_income", "invoicedetail", "idfinmotive"); cPar = new [] { sorting_siope.Columns["idsor"] }; cChild = new [] { invoicedetail.Columns["idsor_siope"] }; Relations.Add(new DataRelation("sorting_siope_invoicedetail", cPar, cChild, false)); cPar = new [] { epexp_pre.Columns["idepexp"] }; cChild = new [] { invoicedetail.Columns["idepexp_pre"] }; Relations.Add(new DataRelation("epexp_pre_invoicedetail", cPar, cChild, false)); #endregion }
private void initClass() { DataSetName = "dsmeta"; Prefix = ""; Namespace = "http://tempuri.org/dsmeta.xsd"; #region create DataTables //////////////////// ESTIMATEDETAIL ///////////////////////////////// var testimatedetail = new estimatedetailTable(); testimatedetail.addBaseColumns("idestimkind", "nestim", "rownum", "yestim", "annotations", "ct", "cu", "detaildescription", "discount", "idinc_iva", "idinc_taxable", "idsor1", "idsor2", "idsor3", "idupb", "lt", "lu", "ninvoiced", "number", "start", "stop", "tax", "taxable", "taxrate", "toinvoice", "idaccmotive", "idivakind", "idreg", "idgroup", "competencystart", "competencystop", "idaccmotiveannulment", "epkind", "idrevenuepartition", "idupb_iva", "idepacc", "idlist", "cigcode", "iduniqueformcode", "nform", "idfinmotive", "flag", "proceedsexpiring", "idsor_siope", "idepacc_pre"); Tables.Add(testimatedetail); testimatedetail.defineKey("idestimkind", "nestim", "rownum", "yestim"); //////////////////// UPB ///////////////////////////////// var tupb = new upbTable(); tupb.addBaseColumns("idupb", "active", "assured", "codeupb", "ct", "cu", "expiration", "granted", "idman", "idunderwriter", "lt", "lu", "paridupb", "previousappropriation", "previousassessment", "printingorder", "requested", "rtf", "title", "txt", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05"); Tables.Add(tupb); tupb.defineKey("idupb"); //////////////////// IVAKIND ///////////////////////////////// var tivakind = new ivakindTable(); tivakind.addBaseColumns("idivakind", "ct", "cu", "description", "lt", "lu", "rate", "unabatabilitypercentage", "active", "flag"); Tables.Add(tivakind); tivakind.defineKey("idivakind"); //////////////////// INVOICEDETAIL ///////////////////////////////// var tinvoicedetail = new invoicedetailTable(); tinvoicedetail.addBaseColumns("idinvkind", "ninv", "rownum", "yinv", "annotations", "competencystart", "competencystop", "ct", "cu", "detaildescription", "discount", "idaccmotive", "idivakind", "idmankind", "idsor1", "idsor2", "idsor3", "idupb", "lt", "lu", "manrownum", "nman", "number", "tax", "taxable", "unabatable", "yman", "idestimkind", "yestim", "nestim", "estimrownum", "idgroup"); tinvoicedetail.defineColumn("!tipodocumento", typeof(string)); Tables.Add(tinvoicedetail); tinvoicedetail.defineKey("idinvkind", "ninv", "rownum", "yinv"); //////////////////// INVOICEKIND ///////////////////////////////// var tinvoicekind = new invoicekindTable(); tinvoicekind.addBaseColumns("idinvkind", "ct", "cu", "description", "lt", "lu", "active"); Tables.Add(tinvoicekind); tinvoicekind.defineKey("idinvkind"); //////////////////// SORTING1 ///////////////////////////////// var tsorting1 = new sortingTable(); tsorting1.TableName = "sorting1"; tsorting1.addBaseColumns("idsor", "idsorkind", "ct", "cu", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5", "description", "flagnodate", "lt", "lu", "movkind", "nlevel", "paridsor", "printingorder", "rtf", "sortcode", "txt"); tsorting1.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting1); tsorting1.defineKey("idsor"); //////////////////// SORTING2 ///////////////////////////////// var tsorting2 = new sortingTable(); tsorting2.TableName = "sorting2"; tsorting2.addBaseColumns("idsor", "idsorkind", "ct", "cu", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5", "description", "flagnodate", "lt", "lu", "movkind", "nlevel", "paridsor", "printingorder", "rtf", "sortcode", "txt"); tsorting2.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting2); tsorting2.defineKey("idsor"); //////////////////// SORTING3 ///////////////////////////////// var tsorting3 = new sortingTable(); tsorting3.TableName = "sorting3"; tsorting3.addBaseColumns("idsor", "idsorkind", "ct", "cu", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5", "description", "flagnodate", "lt", "lu", "movkind", "nlevel", "paridsor", "printingorder", "rtf", "sortcode", "txt"); tsorting3.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting3); tsorting3.defineKey("idsor"); //////////////////// ACCMOTIVEAPPLIED ///////////////////////////////// var taccmotiveapplied = new accmotiveappliedTable(); taccmotiveapplied.addBaseColumns("idaccmotive", "paridaccmotive", "codemotive", "motive", "cu", "ct", "lu", "lt", "active", "idepoperation", "epoperation", "in_use", "flagdep", "flagamm"); Tables.Add(taccmotiveapplied); taccmotiveapplied.defineKey("idaccmotive"); //////////////////// INCOME_IMPONIBILE ///////////////////////////////// var tincome_imponibile = new incomeTable(); tincome_imponibile.TableName = "income_imponibile"; tincome_imponibile.addBaseColumns("idinc", "nphase", "ymov", "nmov", "parentidinc", "idreg", "idman", "doc", "docdate", "description", "autokind", "autocode", "idpayment", "expiration", "adate", "cu", "ct", "lu", "lt"); tincome_imponibile.ExtendedProperties["TableForReading"] = "income"; Tables.Add(tincome_imponibile); tincome_imponibile.defineKey("idinc"); //////////////////// INCOME_IVA ///////////////////////////////// var tincome_iva = new incomeTable(); tincome_iva.TableName = "income_iva"; tincome_iva.addBaseColumns("idinc", "nphase", "ymov", "nmov", "parentidinc", "idreg", "idman", "doc", "docdate", "description", "autokind", "autocode", "idpayment", "expiration", "adate", "cu", "ct", "lu", "lt"); tincome_iva.ExtendedProperties["TableForReading"] = "income"; Tables.Add(tincome_iva); tincome_iva.defineKey("idinc"); //////////////////// REGISTRYMAINVIEW ///////////////////////////////// var tregistrymainview = new MetaTable("registrymainview"); tregistrymainview.defineColumn("idreg", typeof(int), false); tregistrymainview.defineColumn("title", typeof(string), false); tregistrymainview.defineColumn("idregistryclass", typeof(string)); tregistrymainview.defineColumn("registryclass", typeof(string)); tregistrymainview.defineColumn("surname", typeof(string)); tregistrymainview.defineColumn("forename", typeof(string)); tregistrymainview.defineColumn("cf", typeof(string)); tregistrymainview.defineColumn("p_iva", typeof(string)); tregistrymainview.defineColumn("residence", typeof(int), false); tregistrymainview.defineColumn("residencekind", typeof(string)); tregistrymainview.defineColumn("annotation", typeof(string)); tregistrymainview.defineColumn("birthdate", typeof(DateTime)); tregistrymainview.defineColumn("idcity", typeof(int)); tregistrymainview.defineColumn("city", typeof(string)); tregistrymainview.defineColumn("gender", typeof(string)); tregistrymainview.defineColumn("foreigncf", typeof(string)); tregistrymainview.defineColumn("idtitle", typeof(string)); tregistrymainview.defineColumn("qualification", typeof(string)); tregistrymainview.defineColumn("idmaritalstatus", typeof(string)); tregistrymainview.defineColumn("maritalstatus", typeof(string)); tregistrymainview.defineColumn("sortcode", typeof(string)); tregistrymainview.defineColumn("registrykind", typeof(string)); tregistrymainview.defineColumn("human", typeof(string)); tregistrymainview.defineColumn("active", typeof(string), false); tregistrymainview.defineColumn("badgecode", typeof(string)); tregistrymainview.defineColumn("maritalsurname", typeof(string)); tregistrymainview.defineColumn("idcategory", typeof(string)); tregistrymainview.defineColumn("extmatricula", typeof(string)); tregistrymainview.defineColumn("idcentralizedcategory", typeof(string)); tregistrymainview.defineColumn("cu", typeof(string), false); tregistrymainview.defineColumn("ct", typeof(DateTime), false); tregistrymainview.defineColumn("lu", typeof(string), false); tregistrymainview.defineColumn("lt", typeof(DateTime), false); tregistrymainview.defineColumn("location", typeof(string)); tregistrymainview.defineColumn("idnation", typeof(int)); tregistrymainview.defineColumn("nation", typeof(string)); Tables.Add(tregistrymainview); tregistrymainview.defineKey("idreg"); //////////////////// ACCMOTIVEAPPLIEDANNULMENT ///////////////////////////////// var taccmotiveappliedannulment = new MetaTable("accmotiveappliedannulment"); taccmotiveappliedannulment.defineColumn("idaccmotive", typeof(string), false); taccmotiveappliedannulment.defineColumn("paridaccmotive", typeof(string)); taccmotiveappliedannulment.defineColumn("codemotive", typeof(string), false); taccmotiveappliedannulment.defineColumn("motive", typeof(string), false); taccmotiveappliedannulment.defineColumn("cu", typeof(string), false); taccmotiveappliedannulment.defineColumn("ct", typeof(DateTime), false); taccmotiveappliedannulment.defineColumn("lu", typeof(string), false); taccmotiveappliedannulment.defineColumn("lt", typeof(DateTime), false); taccmotiveappliedannulment.defineColumn("active", typeof(string)); taccmotiveappliedannulment.defineColumn("idepoperation", typeof(string)); taccmotiveappliedannulment.defineColumn("epoperation", typeof(string)); taccmotiveappliedannulment.defineColumn("in_use", typeof(string)); taccmotiveappliedannulment.defineColumn("flagdep", typeof(string)); taccmotiveappliedannulment.defineColumn("flagamm", typeof(string)); Tables.Add(taccmotiveappliedannulment); taccmotiveappliedannulment.defineKey("idaccmotive"); //////////////////// REVENUEPARTITION ///////////////////////////////// var trevenuepartition = new MetaTable("revenuepartition"); trevenuepartition.defineColumn("idrevenuepartition", typeof(int), false); trevenuepartition.defineColumn("title", typeof(string)); trevenuepartition.defineColumn("kind", typeof(string)); trevenuepartition.defineColumn("lt", typeof(DateTime)); trevenuepartition.defineColumn("lu", typeof(string)); trevenuepartition.defineColumn("ct", typeof(DateTime)); trevenuepartition.defineColumn("cu", typeof(string)); trevenuepartition.defineColumn("revenuepartitioncode", typeof(string)); trevenuepartition.defineColumn("active", typeof(string)); trevenuepartition.defineColumn("description", typeof(string)); Tables.Add(trevenuepartition); trevenuepartition.defineKey("idrevenuepartition"); //////////////////// UPB_IVA ///////////////////////////////// var tupb_iva = new upbTable(); tupb_iva.TableName = "upb_iva"; tupb_iva.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", "idepupbkind"); tupb_iva.ExtendedProperties["TableForReading"] = "upb"; Tables.Add(tupb_iva); tupb_iva.defineKey("idupb"); //////////////////// LISTVIEW ///////////////////////////////// var tlistview = new MetaTable("listview"); tlistview.defineColumn("idlist", typeof(int), false); tlistview.defineColumn("description", typeof(string), false); tlistview.defineColumn("intcode", typeof(string), false); tlistview.defineColumn("intbarcode", typeof(string)); tlistview.defineColumn("extcode", typeof(string)); tlistview.defineColumn("extbarcode", typeof(string)); tlistview.defineColumn("validitystop", typeof(DateTime)); tlistview.defineColumn("active", typeof(string), false); tlistview.defineColumn("idpackage", typeof(int)); tlistview.defineColumn("package", typeof(string)); tlistview.defineColumn("idunit", typeof(int)); tlistview.defineColumn("unit", typeof(string)); tlistview.defineColumn("unitsforpackage", typeof(int)); tlistview.defineColumn("has_expiry", typeof(string), false); tlistview.defineColumn("idlistclass", typeof(string), false); tlistview.defineColumn("codelistclass", typeof(string), false); tlistview.defineColumn("listclass", typeof(string), false); tlistview.defineColumn("pic", typeof(Byte[])); tlistview.defineColumn("timesupply", typeof(int)); tlistview.defineColumn("nmaxorder", typeof(decimal)); tlistview.defineColumn("authrequired", typeof(string)); tlistview.defineColumn("assetkind", typeof(string)); tlistview.defineColumn("flagvisiblekind", typeof(byte)); Tables.Add(tlistview); tlistview.defineKey("idlist"); //////////////////// LISTCLASS ///////////////////////////////// var tlistclass = new MetaTable("listclass"); tlistclass.defineColumn("idlistclass", typeof(string), false); tlistclass.defineColumn("active", typeof(string), false); tlistclass.defineColumn("codelistclass", typeof(string), false); tlistclass.defineColumn("paridlistclass", typeof(string)); tlistclass.defineColumn("printingorder", typeof(string), false); tlistclass.defineColumn("title", typeof(string), false); tlistclass.defineColumn("rtf", typeof(Byte[])); tlistclass.defineColumn("txt", typeof(string)); tlistclass.defineColumn("ct", typeof(DateTime), false); tlistclass.defineColumn("cu", typeof(string), false); tlistclass.defineColumn("lt", typeof(DateTime), false); tlistclass.defineColumn("lu", typeof(string), false); tlistclass.defineColumn("authrequired", typeof(string)); tlistclass.defineColumn("idaccmotive", typeof(string)); tlistclass.defineColumn("idinv", typeof(int)); tlistclass.defineColumn("assetkind", typeof(string)); tlistclass.defineColumn("va3type", typeof(string)); tlistclass.defineColumn("flag", typeof(int)); tlistclass.defineColumn("idintrastatsupplymethod", typeof(int)); tlistclass.defineColumn("intra12operationkind", typeof(string)); tlistclass.defineColumn("flagvisiblekind", typeof(byte)); Tables.Add(tlistclass); tlistclass.defineKey("idlistclass"); //////////////////// EPACC ///////////////////////////////// var tepacc = new MetaTable("epacc"); tepacc.defineColumn("idepacc", typeof(int), false); tepacc.defineColumn("adate", typeof(DateTime), false); tepacc.defineColumn("ct", typeof(DateTime), false); tepacc.defineColumn("cu", typeof(string), false); tepacc.defineColumn("description", typeof(string), false); tepacc.defineColumn("doc", typeof(string)); tepacc.defineColumn("docdate", typeof(DateTime)); tepacc.defineColumn("idman", typeof(int)); tepacc.defineColumn("idreg", typeof(int)); tepacc.defineColumn("idrelated", typeof(string)); tepacc.defineColumn("lt", typeof(DateTime), false); tepacc.defineColumn("lu", typeof(string), false); tepacc.defineColumn("nepacc", typeof(int), false); tepacc.defineColumn("nphase", typeof(short), false); tepacc.defineColumn("paridepacc", typeof(int)); tepacc.defineColumn("rtf", typeof(Byte[])); tepacc.defineColumn("start", typeof(DateTime)); tepacc.defineColumn("stop", typeof(DateTime)); tepacc.defineColumn("txt", typeof(string)); tepacc.defineColumn("yepacc", typeof(short), false); tepacc.defineColumn("flagvariation", typeof(string)); Tables.Add(tepacc); tepacc.defineKey("idepacc"); //////////////////// FINMOTIVE_INCOME ///////////////////////////////// var tfinmotive_income = new MetaTable("finmotive_income"); tfinmotive_income.defineColumn("idfinmotive", typeof(string), false); tfinmotive_income.defineColumn("active", typeof(string), false); tfinmotive_income.defineColumn("codemotive", typeof(string), false); tfinmotive_income.defineColumn("paridfinmotive", typeof(string)); tfinmotive_income.defineColumn("title", typeof(string), false); tfinmotive_income.defineColumn("lt", typeof(DateTime)); tfinmotive_income.defineColumn("lu", typeof(string)); tfinmotive_income.defineColumn("ct", typeof(DateTime)); tfinmotive_income.defineColumn("cu", typeof(string)); tfinmotive_income.ExtendedProperties["TableForReading"] = "finmotive"; Tables.Add(tfinmotive_income); tfinmotive_income.defineKey("idfinmotive"); //////////////////// SORTING_SIOPE ///////////////////////////////// var tsorting_siope = new sortingTable(); tsorting_siope.TableName = "sorting_siope"; tsorting_siope.addBaseColumns("ct", "cu", "defaultN1", "defaultN2", "defaultN3", "defaultN4", "defaultN5", "defaultS1", "defaultS2", "defaultS3", "defaultS4", "defaultS5", "defaultv1", "defaultv2", "defaultv3", "defaultv4", "defaultv5", "description", "flagnodate", "lt", "lu", "movkind", "printingorder", "rtf", "sortcode", "txt", "idsorkind", "idsor", "paridsor", "nlevel", "start", "stop", "email"); tsorting_siope.ExtendedProperties["TableForReading"] = "sorting"; Tables.Add(tsorting_siope); tsorting_siope.defineKey("idsor"); //////////////////// PRE_EPACC ///////////////////////////////// var tpre_epacc = new MetaTable("pre_epacc"); tpre_epacc.defineColumn("idepacc", typeof(int), false); tpre_epacc.defineColumn("adate", typeof(DateTime), false); tpre_epacc.defineColumn("ct", typeof(DateTime), false); tpre_epacc.defineColumn("cu", typeof(string), false); tpre_epacc.defineColumn("description", typeof(string), false); tpre_epacc.defineColumn("doc", typeof(string)); tpre_epacc.defineColumn("docdate", typeof(DateTime)); tpre_epacc.defineColumn("idman", typeof(int)); tpre_epacc.defineColumn("idreg", typeof(int)); tpre_epacc.defineColumn("idrelated", typeof(string)); tpre_epacc.defineColumn("lt", typeof(DateTime), false); tpre_epacc.defineColumn("lu", typeof(string), false); tpre_epacc.defineColumn("nepacc", typeof(int), false); tpre_epacc.defineColumn("nphase", typeof(short), false); tpre_epacc.defineColumn("paridepacc", typeof(int)); tpre_epacc.defineColumn("rtf", typeof(Byte[])); tpre_epacc.defineColumn("start", typeof(DateTime)); tpre_epacc.defineColumn("stop", typeof(DateTime)); tpre_epacc.defineColumn("txt", typeof(string)); tpre_epacc.defineColumn("yepacc", typeof(short), false); tpre_epacc.defineColumn("flagvariation", typeof(string)); tpre_epacc.ExtendedProperties["TableForReading"] = "epacc"; Tables.Add(tpre_epacc); tpre_epacc.defineKey("idepacc"); #endregion #region DataRelation creation var cPar = new [] { estimatedetail.Columns["idestimkind"], estimatedetail.Columns["nestim"], estimatedetail.Columns["rownum"], estimatedetail.Columns["yestim"] }; var cChild = new [] { invoicedetail.Columns["idestimkind"], invoicedetail.Columns["nestim"], invoicedetail.Columns["estimrownum"], invoicedetail.Columns["yestim"] }; Relations.Add(new DataRelation("estimatedetailinvoicedetail", cPar, cChild, false)); this.defineRelation("invoicekindinvoicedetail", "invoicekind", "invoicedetail", "idinvkind"); this.defineRelation("FK_epacc_estimatedetail", "epacc", "estimatedetail", "idepacc"); this.defineRelation("FK_listview_estimatedetail", "listview", "estimatedetail", "idlist"); cPar = new [] { upb_iva.Columns["idupb"] }; cChild = new [] { estimatedetail.Columns["idupb_iva"] }; Relations.Add(new DataRelation("FK_upb_iva_estimatedetail", cPar, cChild, false)); this.defineRelation("registrymainviewestimatedetail", "registrymainview", "estimatedetail", "idreg"); cPar = new [] { income_iva.Columns["idinc"] }; cChild = new [] { estimatedetail.Columns["idinc_iva"] }; Relations.Add(new DataRelation("income_ivaestimatedetail", cPar, cChild, false)); cPar = new [] { income_imponibile.Columns["idinc"] }; cChild = new [] { estimatedetail.Columns["idinc_taxable"] }; Relations.Add(new DataRelation("income_imponibileestimatedetail", cPar, cChild, false)); cPar = new [] { sorting3.Columns["idsor"] }; cChild = new [] { estimatedetail.Columns["idsor3"] }; Relations.Add(new DataRelation("sorting3invoicedetail", cPar, cChild, false)); cPar = new [] { sorting2.Columns["idsor"] }; cChild = new [] { estimatedetail.Columns["idsor2"] }; Relations.Add(new DataRelation("sorting2invoicedetail", cPar, cChild, false)); cPar = new [] { sorting1.Columns["idsor"] }; cChild = new [] { estimatedetail.Columns["idsor1"] }; Relations.Add(new DataRelation("sorting1invoicedetail", cPar, cChild, false)); this.defineRelation("upbestimatedetail", "upb", "estimatedetail", "idupb"); this.defineRelation("ivakindestimatedetail", "ivakind", "estimatedetail", "idivakind"); this.defineRelation("accmotiveappliedestimatedetail", "accmotiveapplied", "estimatedetail", "idaccmotive"); cPar = new [] { accmotiveappliedannulment.Columns["idaccmotive"] }; cChild = new [] { estimatedetail.Columns["idaccmotiveannulment"] }; Relations.Add(new DataRelation("accmotiveappliedannulment_estimatedetail", cPar, cChild, false)); this.defineRelation("revenuepartition_estimatedetail", "revenuepartition", "estimatedetail", "idrevenuepartition"); this.defineRelation("finmotive_income_estimatedetail", "finmotive_income", "estimatedetail", "idfinmotive"); cPar = new [] { sorting_siope.Columns["idsor"] }; cChild = new [] { estimatedetail.Columns["idsor_siope"] }; Relations.Add(new DataRelation("sorting_siope_estimatedetail", cPar, cChild, false)); cPar = new [] { pre_epacc.Columns["idepacc"] }; cChild = new [] { estimatedetail.Columns["idepacc_pre"] }; Relations.Add(new DataRelation("pre_epacc_estimatedetail", cPar, cChild, false)); #endregion }
private void initClass() { DataSetName = "dsmeta"; Prefix = ""; Namespace = "http://tempuri.org/dsmeta.xsd"; #region create DataTables //////////////////// NO_TABLE ///////////////////////////////// var tno_table = new MetaTable("no_table"); tno_table.defineColumn("idnotable", typeof(string), false); Tables.Add(tno_table); tno_table.defineKey("idnotable"); //////////////////// LICENSE ///////////////////////////////// var tlicense = new MetaTable("license"); tlicense.defineColumn("dummykey", typeof(string), false); tlicense.defineColumn("address1", typeof(string)); tlicense.defineColumn("address2", typeof(string)); tlicense.defineColumn("agency", typeof(string)); tlicense.defineColumn("agencycode", typeof(string)); tlicense.defineColumn("agencyname", typeof(string)); tlicense.defineColumn("annotations", typeof(string)); tlicense.defineColumn("cap", typeof(string)); tlicense.defineColumn("cf", typeof(string)); tlicense.defineColumn("checkbackup1", typeof(string)); tlicense.defineColumn("checkbackup2", typeof(string)); tlicense.defineColumn("checkflag", typeof(string)); tlicense.defineColumn("checklic", typeof(string)); tlicense.defineColumn("checkman", typeof(string)); tlicense.defineColumn("country", typeof(string)); tlicense.defineColumn("dbname", typeof(string)); tlicense.defineColumn("department", typeof(string)); tlicense.defineColumn("departmentcode", typeof(string)); tlicense.defineColumn("departmentname", typeof(string)); tlicense.defineColumn("email", typeof(string)); tlicense.defineColumn("expiringlic", typeof(DateTime)); tlicense.defineColumn("expiringman", typeof(DateTime)); tlicense.defineColumn("fax", typeof(string)); tlicense.defineColumn("idcity", typeof(int)); tlicense.defineColumn("iddb", typeof(int)); tlicense.defineColumn("idreg", typeof(int)); tlicense.defineColumn("lickind", typeof(string)); tlicense.defineColumn("licstatus", typeof(string)); tlicense.defineColumn("location", typeof(string)); tlicense.defineColumn("lt", typeof(DateTime)); tlicense.defineColumn("lu", typeof(string)); tlicense.defineColumn("mankind", typeof(string)); tlicense.defineColumn("manstatus", typeof(string)); tlicense.defineColumn("nmsgs", typeof(int)); tlicense.defineColumn("p_iva", typeof(string)); tlicense.defineColumn("phonenumber", typeof(string)); tlicense.defineColumn("referent", typeof(string)); tlicense.defineColumn("sent", typeof(string)); tlicense.defineColumn("serverbackup1", typeof(string)); tlicense.defineColumn("serverbackup2", typeof(string)); tlicense.defineColumn("servername", typeof(string)); tlicense.defineColumn("swmorecode", typeof(string)); tlicense.defineColumn("swmoreflag", typeof(int)); Tables.Add(tlicense); tlicense.defineKey("dummykey"); //////////////////// CONFIG ///////////////////////////////// var tconfig = new configTable(); tconfig.addBaseColumns("ayear", "agencycode", "appname", "appropriationphasecode", "assessmentphasecode", "asset_flagnumbering", "asset_flagrestart", "assetload_flag", "boxpartitiontitle", "finvarofficial_default", "casualcontract_flagrestart", "ct", "cu", "currpartitiontitle", "deferredexpensephase", "deferredincomephase", "electronicimport", "electronictrasmission", "expense_expiringdays", "expensephase", "flagautopayment", "flagautoproceeds", "flagcredit", "flagepexp", "flagfruitful", "flagpayment", "flagproceeds", "flagrefund", "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", "idregauto", "importappname", "income_expiringdays", "incomephase", "linktoinvoice", "lt", "lu", "minpayment", "minrefund", "motivelen", "motiveprefix", "motiveseparator", "payment_finlevel", "payment_flag", "payment_flagautoprintdate", "paymentagency", "prevpartitiontitle", "proceeds_finlevel", "proceeds_flag", "proceeds_flagautoprintdate", "profservice_flagrestart", "refundagency", "wageaddition_flagrestart", "idivapayperiodicity", "idsortingkind1", "idsortingkind2", "idsortingkind3", "fin_kind", "taxvaliditykind", "flag_paymentamount", "automanagekind", "flag_autodocnumbering", "flagbank_grouping", "cashvaliditykind", "wageimportappname", "balancekind", "idpaymethodabi", "idpaymethodnoabi", "iban_f24", "cudactivitycode", "startivabalance", "flagivapaybyrow", "idacc_unabatable", "idacc_unabatable_refund", "invoice_flagregister", "default_idfinvarstatus", "flagivaregphase", "mainflagpayment", "mainflagrefund", "mainidfinivapayment", "mainidfinivarefund", "mainminpayment", "mainminrefund", "mainpaymentagency", "mainrefundagency", "mainflagivaregphase", "mainstartivabalance", "mainidacc_unabatable", "mainidacc_unabatable_refund", "idacc_mainivapayment", "idacc_mainivapayment_internal", "idacc_mainivarefund", "idacc_mainivarefund_internal", "flagva3", "flagrefund12", "flagpayment12", "refundagency12", "paymentagency12", "idfinivarefund12", "idfinivapayment12", "minrefund12", "minpayment12", "idacc_ivapayment12", "idacc_ivarefund12", "idacc_mainivarefund12", "idacc_mainivapayment12", "idacc_mainivapayment_internal12", "idacc_mainivarefund_internal12", "startivabalance12", "mainrefundagency12", "mainpaymentagency12", "mainflagrefund12", "mainflagpayment12", "mainidfinivarefund12", "mainidfinivapayment12", "mainminrefund12", "mainminpayment12", "mainstartivabalance12", "idreg_csa", "finvar_warnmail", "flagdirectcsaclawback", "idacc_revenue_gross_csa", "idfinincome_gross_csa", "idsor1_stock", "idsor2_stock", "idsor3_stock", "idinpscenter", "idivapayperiodicity_instit", "idfin_store", "flagpcashautopayment", "flagpcashautoproceeds", "email", "lcard", "booking_on_invoice"); Tables.Add(tconfig); tconfig.defineKey("ayear"); //////////////////// ESTIMATEDETAIL ///////////////////////////////// var testimatedetail = new estimatedetailTable(); testimatedetail.addBaseColumns("idestimkind", "yestim", "nestim", "rownum", "annotations", "ct", "cu", "detaildescription", "discount", "idupb", "lt", "lu", "ninvoiced", "number", "start", "stop", "tax", "taxable", "taxrate", "toinvoice", "idaccmotive", "idreg", "idgroup", "competencystart", "competencystop", "idinc_taxable", "idinc_iva", "idivakind", "idsor1", "idsor2", "idsor3", "idaccmotiveannulment", "epkind", "idrevenuepartition", "idepacc", "idupb_iva", "idlist", "cigcode", "iduniqueformcode", "idfinmotive", "flag", "nform", "idsor_siope", "idepacc_pre"); testimatedetail.defineColumn("!codeupb", typeof(string)); testimatedetail.defineColumn("!codeupb_iva", typeof(string)); testimatedetail.defineColumn("!registry", typeof(string)); testimatedetail.defineColumn("!totaleriga", typeof(decimal)); Tables.Add(testimatedetail); testimatedetail.defineKey("idestimkind", "yestim", "nestim", "rownum"); //////////////////// REGISTRY ///////////////////////////////// var tregistry = new registryTable(); tregistry.addBaseColumns("idreg", "active", "annotation", "badgecode", "birthdate", "cf", "ct", "cu", "extmatricula", "foreigncf", "forename", "gender", "idcategory", "idcentralizedcategory", "idcity", "idmaritalstatus", "idnation", "idregistryclass", "idtitle", "location", "lt", "lu", "maritalsurname", "p_iva", "rtf", "surname", "title", "txt", "residence", "idregistrykind", "authorization_free", "multi_cf", "toredirect", "idaccmotivedebit", "idaccmotivecredit", "ccp", "flagbankitaliaproceeds", "idexternal", "ipa_fe", "flag_pa", "sdi_norifamm", "sdi_defrifamm", "email_fe", "pec_fe"); Tables.Add(tregistry); tregistry.defineKey("idreg"); //////////////////// ESTIMATEKIND ///////////////////////////////// var testimatekind = new estimatekindTable(); testimatekind.addBaseColumns("idestimkind", "active", "ct", "cu", "description", "idupb", "lt", "lu", "rtf", "txt", "email", "faxnumber", "office", "phonenumber", "linktoinvoice", "multireg", "deltaamount", "deltapercentage", "flag_autodocnumbering", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "address", "header", "idivakind_forced", "flag"); Tables.Add(testimatekind); testimatekind.defineKey("idestimkind"); //////////////////// ESTIMATE ///////////////////////////////// var testimate = new estimateTable(); testimate.addBaseColumns("idestimkind", "yestim", "nestim", "active", "adate", "ct", "cu", "deliveryaddress", "deliveryexpiration", "description", "doc", "docdate", "exchangerate", "idreg", "lt", "lu", "officiallyprinted", "paymentexpiring", "registryreference", "txt", "idman", "idcurrency", "idexpirationkind", "flagintracom", "idaccmotivecredit", "idaccmotivecredit_crg", "idaccmotivecredit_datacrg", "idsor_underwriter", "idunderwriting", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "external_reference", "cigcode"); Tables.Add(testimate); testimate.defineKey("idestimkind", "yestim", "nestim"); //////////////////// 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"); //////////////////// INCOMELAST ///////////////////////////////// var tincomelast = new incomelastTable(); tincomelast.addBaseColumns("idinc", "ct", "cu", "flag", "idpro", "lt", "lu", "nbill", "kpro", "idacccredit"); Tables.Add(tincomelast); tincomelast.defineKey("idinc"); //////////////////// 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"); //////////////////// INCOME ///////////////////////////////// var tincome = new incomeTable(); tincome.addBaseColumns("idinc", "nphase", "ymov", "nmov", "parentidinc", "idreg", "idman", "doc", "docdate", "description", "idpayment", "expiration", "adate", "cu", "ct", "lu", "lt", "autokind", "autocode", "cupcode", "idunderwriting"); Tables.Add(tincome); tincome.defineKey("idinc"); //////////////////// INCOMEYEAR ///////////////////////////////// var tincomeyear = new incomeyearTable(); tincomeyear.addBaseColumns("idinc", "ayear", "idfin", "idupb", "amount", "cu", "ct", "lu", "lt"); Tables.Add(tincomeyear); tincomeyear.defineKey("idinc", "ayear"); //////////////////// UPB ///////////////////////////////// var tupb = new upbTable(); tupb.addBaseColumns("idupb", "codeupb", "title", "paridupb", "idunderwriter", "idman", "requested", "granted", "previousappropriation", "expiration", "txt", "rtf", "cu", "ct", "lu", "lt", "assured", "printingorder", "active", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "idtreasurer"); Tables.Add(tupb); tupb.defineKey("idupb"); //////////////////// FIN ///////////////////////////////// var tfin = new finTable(); tfin.addBaseColumns("idfin", "ayear", "flag", "codefin", "paridfin", "nlevel", "printingorder", "title", "cu", "ct", "lu", "lt"); Tables.Add(tfin); tfin.defineKey("idfin"); //////////////////// REGISTRY1 ///////////////////////////////// var tregistry1 = new registryTable(); tregistry1.TableName = "registry1"; tregistry1.addBaseColumns("idreg", "title", "cf", "p_iva", "residence", "annotation", "birthdate", "gender", "surname", "forename", "foreigncf", "active", "txt", "rtf", "cu", "ct", "lu", "lt", "badgecode", "idcategory", "idcentralizedcategory", "idmaritalstatus", "idtitle", "idregistryclass", "maritalsurname", "idcity", "idnation", "location", "extmatricula"); tregistry1.ExtendedProperties["TableForReading"] = "registry"; Tables.Add(tregistry1); tregistry1.defineKey("idreg"); //////////////////// INCOMEESTIMATE ///////////////////////////////// var tincomeestimate = new MetaTable("incomeestimate"); tincomeestimate.defineColumn("idestimkind", typeof(string), false); tincomeestimate.defineColumn("yestim", typeof(short), false); tincomeestimate.defineColumn("nestim", typeof(int), false); tincomeestimate.defineColumn("idinc", typeof(int), false); tincomeestimate.defineColumn("movkind", typeof(short)); tincomeestimate.defineColumn("cu", typeof(string), false); tincomeestimate.defineColumn("ct", typeof(DateTime), false); tincomeestimate.defineColumn("lu", typeof(string), false); tincomeestimate.defineColumn("lt", typeof(DateTime), false); Tables.Add(tincomeestimate); tincomeestimate.defineKey("idestimkind", "yestim", "nestim", "idinc"); //////////////////// FINMOTIVE ///////////////////////////////// var tfinmotive = new MetaTable("finmotive"); tfinmotive.defineColumn("idfinmotive", typeof(string), false); tfinmotive.defineColumn("active", typeof(string), false); tfinmotive.defineColumn("codemotive", typeof(string), false); tfinmotive.defineColumn("paridfinmotive", typeof(string)); tfinmotive.defineColumn("title", typeof(string), false); tfinmotive.defineColumn("lt", typeof(DateTime)); tfinmotive.defineColumn("lu", typeof(string)); tfinmotive.defineColumn("ct", typeof(DateTime)); tfinmotive.defineColumn("cu", typeof(string)); Tables.Add(tfinmotive); tfinmotive.defineKey("idfinmotive"); //////////////////// FINMOTIVEDETAIL ///////////////////////////////// var tfinmotivedetail = new MetaTable("finmotivedetail"); tfinmotivedetail.defineColumn("idfinmotive", typeof(string), false); tfinmotivedetail.defineColumn("idfin", typeof(int), false); tfinmotivedetail.defineColumn("ayear", typeof(short), false); tfinmotivedetail.defineColumn("lu", typeof(string)); tfinmotivedetail.defineColumn("cu", typeof(string)); tfinmotivedetail.defineColumn("ct", typeof(DateTime)); tfinmotivedetail.defineColumn("lt", typeof(DateTime)); Tables.Add(tfinmotivedetail); tfinmotivedetail.defineKey("idfinmotive", "idfin", "ayear"); //////////////////// 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"); //////////////////// FLUSSOCREDITI ///////////////////////////////// var tflussocrediti = new flussocreditiTable(); tflussocrediti.addBaseColumns("idflusso", "cu", "ct", "lu", "lt", "datacreazioneflusso", "flusso", "istransmitted", "docdate", "idestimkind", "idsor03", "idsor02", "idsor01", "idsor04", "idsor05", "progday", "filename"); Tables.Add(tflussocrediti); tflussocrediti.defineKey("idflusso"); //////////////////// FLUSSOCREDITIDETAIL ///////////////////////////////// var tflussocreditidetail = new flussocreditidetailTable(); tflussocreditidetail.addBaseColumns("idflusso", "iddetail", "cu", "ct", "lu", "lt", "importoversamento", "idestimkind", "yestim", "nestim", "rownum", "idupb", "idfinmotive", "iduniqueformcode", "idaccmotiverevenue", "idaccmotivecredit", "idaccmotiveundotax", "idaccmotiveundotaxpost", "idreg", "nform", "stop", "competencystart", "competencystop", "description", "idinvkind", "yinv", "ninv", "invrownum", "cf", "annulment", "flag", "idunivoco", "idsor1", "idsor2", "idsor3", "idivakind", "tax", "number", "idlist", "p_iva", "annotations", "idupb_iva", "iuv"); Tables.Add(tflussocreditidetail); tflussocreditidetail.defineKey("idflusso", "iddetail"); //////////////////// INVOICE ///////////////////////////////// var tinvoice = new invoiceTable(); tinvoice.addBaseColumns("ninv", "yinv", "active", "adate", "ct", "cu", "description", "doc", "docdate", "exchangerate", "flagdeferred", "idreg", "lt", "lu", "officiallyprinted", "packinglistdate", "packinglistnum", "paymentexpiring", "registryreference", "rtf", "txt", "idinvkind", "idcurrency", "idexpirationkind", "idtreasurer", "flagintracom", "iso_origin", "iso_provenance", "iso_destination", "idcountry_origin", "idcountry_destination", "idintrastatkind", "idaccmotivedebit", "idaccmotivedebit_crg", "idaccmotivedebit_datacrg", "idintrastatpaymethod", "iso_payment", "flag_ddt", "flag", "idblacklist", "idinvkind_real", "yinv_real", "ninv_real", "autoinvoice", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "protocoldate", "idfepaymethodcondition", "idfepaymethod", "nelectronicinvoice", "yelectronicinvoice", "annotations", "arrivalprotocolnum", "toincludeinpaymentindicator", "resendingpcc", "touniqueregister", "idstampkind", "flag_auto_split_payment", "flag_enable_split_payment", "idsdi_acquisto", "idsdi_vendita", "flag_reverse_charge", "ipa_acq", "rifamm_acq", "ipa_ven_emittente", "rifamm_ven_emittente", "ipa_ven_cliente", "rifamm_ven_cliente", "ssntipospesa", "ssnflagtipospesa", "idinvkind_forwarder", "yinv_forwarder", "ninv_forwarder", "flagbit", "ssn_nprot", "requested_doc", "email_ven_cliente", "pec_ven_cliente"); tinvoice.defineColumn("!registry", typeof(string)); Tables.Add(tinvoice); tinvoice.defineKey("ninv", "yinv", "idinvkind"); //////////////////// 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", "flagbit", "idfinmotive", "iduniqueformcode", "ycon", "ncon", "codicevalore", "codicetipo", "idsor_siope", "idepexp_pre"); Tables.Add(tinvoicedetail); tinvoicedetail.defineKey("ninv", "rownum", "yinv", "idinvkind"); //////////////////// INCOMEINVOICE ///////////////////////////////// var tincomeinvoice = new MetaTable("incomeinvoice"); tincomeinvoice.defineColumn("ninv", typeof(int), false); tincomeinvoice.defineColumn("yinv", typeof(short), false); tincomeinvoice.defineColumn("ct", typeof(DateTime), false); tincomeinvoice.defineColumn("cu", typeof(string), false); tincomeinvoice.defineColumn("lt", typeof(DateTime), false); tincomeinvoice.defineColumn("lu", typeof(string), false); tincomeinvoice.defineColumn("idinc", typeof(int), false); tincomeinvoice.defineColumn("idinvkind", typeof(int), false); tincomeinvoice.defineColumn("movkind", typeof(short), false); Tables.Add(tincomeinvoice); tincomeinvoice.defineKey("ninv", "yinv", "idinc", "idinvkind"); //////////////////// FLUSSOINCASSI ///////////////////////////////// var tflussoincassi = new flussoincassiTable(); tflussoincassi.addBaseColumns("idflusso", "codiceflusso", "trn", "ct", "cu", "lt", "lu", "ayear", "causale", "dataincasso", "nbill", "importo", "to_complete", "elaborato", "active", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05"); Tables.Add(tflussoincassi); tflussoincassi.defineKey("idflusso"); //////////////////// FLUSSOINCASSIDETAIL ///////////////////////////////// var tflussoincassidetail = new flussoincassidetailTable(); tflussoincassidetail.addBaseColumns("idflusso", "iddetail", "iduniqueformcode", "iuv", "importo", "ct", "cu", "lt", "lu", "cf", "p_iva"); Tables.Add(tflussoincassidetail); tflussoincassidetail.defineKey("idflusso", "iddetail"); //////////////////// REGISTRYREFERENCE ///////////////////////////////// var tregistryreference = new registryreferenceTable(); tregistryreference.addBaseColumns("idreg", "idregistryreference", "referencename", "ct", "cu", "email", "faxnumber", "flagdefault", "lt", "lu", "mobilenumber", "passwordweb", "phonenumber", "registryreferencerole", "rtf", "txt", "userweb", "skypenumber", "msnnumber", "activeweb", "iterweb", "saltweb"); Tables.Add(tregistryreference); tregistryreference.defineKey("idreg", "idregistryreference"); //////////////////// INVOICEKIND ///////////////////////////////// var tinvoicekind = new invoicekindTable(); tinvoicekind.addBaseColumns("ct", "cu", "description", "lt", "lu", "codeinvkind", "idinvkind", "flag", "flag_autodocnumbering", "formatstring", "active", "idinvkind_auto", "printingcode", "idsor01", "idsor02", "idsor03", "idsor04", "idsor05", "address", "header", "notes1", "notes2", "notes3", "ipa_fe", "riferimento_amministrazione", "enable_fe"); Tables.Add(tinvoicekind); tinvoicekind.defineKey("idinvkind"); //////////////////// CURRENCY ///////////////////////////////// var tcurrency = new MetaTable("currency"); tcurrency.defineColumn("ct", typeof(DateTime), false); tcurrency.defineColumn("cu", typeof(string), false); tcurrency.defineColumn("description", typeof(string), false); tcurrency.defineColumn("lt", typeof(DateTime), false); tcurrency.defineColumn("lu", typeof(string), false); tcurrency.defineColumn("codecurrency", typeof(string)); tcurrency.defineColumn("idcurrency", typeof(int), false); Tables.Add(tcurrency); tcurrency.defineKey("idcurrency"); //////////////////// IVAREGISTER ///////////////////////////////// var tivaregister = new ivaregisterTable(); tivaregister.addBaseColumns("nivaregister", "yivaregister", "ct", "cu", "lt", "lu", "ninv", "protocolnum", "yinv", "idinvkind", "idivaregisterkind"); Tables.Add(tivaregister); tivaregister.defineKey("nivaregister", "yivaregister", "idivaregisterkind"); //////////////////// LIST ///////////////////////////////// var tlist = new listTable(); tlist.addBaseColumns("idlist", "description", "intcode", "intbarcode", "extcode", "extbarcode", "validitystop", "active", "idpackage", "idunit", "unitsforpackage", "has_expiry", "cu", "ct", "lu", "lt", "idlistclass", "pic", "picext", "nmin", "ntoreorder", "tounload", "timesupply", "nmaxorder", "price", "insinfo", "descrforuser"); Tables.Add(tlist); tlist.defineKey("idlist"); //////////////////// INVOICEKINDREGISTERKIND ///////////////////////////////// var tinvoicekindregisterkind = new MetaTable("invoicekindregisterkind"); tinvoicekindregisterkind.defineColumn("ct", typeof(DateTime), false); tinvoicekindregisterkind.defineColumn("cu", typeof(string), false); tinvoicekindregisterkind.defineColumn("lt", typeof(DateTime), false); tinvoicekindregisterkind.defineColumn("lu", typeof(string), false); tinvoicekindregisterkind.defineColumn("idinvkind", typeof(int), false); tinvoicekindregisterkind.defineColumn("idivaregisterkind", typeof(int), false); Tables.Add(tinvoicekindregisterkind); tinvoicekindregisterkind.defineKey("idinvkind", "idivaregisterkind"); //////////////////// IVAREGISTERKIND ///////////////////////////////// var tivaregisterkind = new ivaregisterkindTable(); tivaregisterkind.addBaseColumns("ct", "cu", "description", "lt", "lu", "registerclass", "idivaregisterkindunified", "flagactivity", "codeivaregisterkind", "idivaregisterkind", "compensation", "idtreasurer"); Tables.Add(tivaregisterkind); tivaregisterkind.defineKey("idivaregisterkind"); //////////////////// REPORT ///////////////////////////////// var treport = new MetaTable("report"); treport.defineColumn("modulename", typeof(string), false); treport.defineColumn("reportname", typeof(string), false); treport.defineColumn("description", typeof(string), false); treport.defineColumn("filename", typeof(string), false); treport.defineColumn("groupname", typeof(string)); treport.defineColumn("orientation", typeof(string), false); treport.defineColumn("papersize", typeof(string)); treport.defineColumn("sp_doupdate", typeof(string)); treport.defineColumn("timeout", typeof(int)); treport.defineColumn("webvisible", typeof(string)); treport.defineColumn("active", typeof(string)); treport.defineColumn("flag_both", typeof(string)); treport.defineColumn("flag_cash", typeof(string)); treport.defineColumn("flag_comp", typeof(string)); treport.defineColumn("flag_credit", typeof(string)); treport.defineColumn("flag_proceeds", typeof(string)); Tables.Add(treport); treport.defineKey("reportname"); //////////////////// WEBPAYMENT ///////////////////////////////// var twebpayment = new webpaymentTable(); twebpayment.addBaseColumns("idwebpayment", "cf", "ct", "cu", "email", "forename", "idcustomuser", "idlcard", "idman", "lt", "lu", "nwebpayment", "surname", "ywebpayment", "idwebpaymentstatus", "idreg", "iuv", "qrcode", "idflussocrediti", "adate"); Tables.Add(twebpayment); twebpayment.defineKey("idwebpayment"); //////////////////// WEBPAYMENTSTATUS ///////////////////////////////// var twebpaymentstatus = new MetaTable("webpaymentstatus"); twebpaymentstatus.defineColumn("idwebpaymentstatus", typeof(short), false); twebpaymentstatus.defineColumn("ct", typeof(DateTime), false); twebpaymentstatus.defineColumn("cu", typeof(string), false); twebpaymentstatus.defineColumn("description", typeof(string), false); twebpaymentstatus.defineColumn("listingorder", typeof(int)); twebpaymentstatus.defineColumn("lt", typeof(DateTime), false); twebpaymentstatus.defineColumn("lu", typeof(string), false); Tables.Add(twebpaymentstatus); twebpaymentstatus.defineKey("idwebpaymentstatus"); //////////////////// GENERALREPORTPARAMETER ///////////////////////////////// var tgeneralreportparameter = new MetaTable("generalreportparameter"); tgeneralreportparameter.defineColumn("idparam", typeof(string), false); tgeneralreportparameter.defineColumn("paramvalue", typeof(string)); tgeneralreportparameter.defineColumn("description", typeof(string)); tgeneralreportparameter.defineColumn("lt", typeof(DateTime)); tgeneralreportparameter.defineColumn("lu", typeof(string)); tgeneralreportparameter.defineColumn("stop", typeof(DateTime)); tgeneralreportparameter.defineColumn("start", typeof(DateTime), false); Tables.Add(tgeneralreportparameter); tgeneralreportparameter.defineKey("idparam", "start"); //////////////////// IVAKIND ///////////////////////////////// var tivakind = new ivakindTable(); tivakind.addBaseColumns("ct", "cu", "description", "lt", "lu", "rate", "unabatabilitypercentage", "active", "idivataxablekind", "idivakind", "codeivakind", "flag", "annotations", "idfenature"); Tables.Add(tivakind); tivakind.defineKey("idivakind"); #endregion #region DataRelation creation this.defineRelation("income_incomeinvoice", "income", "incomeinvoice", "idinc"); var cPar = new [] { income.Columns["idinc"] }; var cChild = new [] { invoicedetail.Columns["idinc_taxable"] }; Relations.Add(new DataRelation("income_invoicedetail", cPar, cChild, false)); cPar = new [] { income.Columns["idinc"] }; cChild = new [] { invoicedetail.Columns["idinc_iva"] }; Relations.Add(new DataRelation("income_invoicedetail1", cPar, cChild, false)); this.defineRelation("flussocrediti_flussocreditidetail", "flussocrediti", "flussocreditidetail", "idflusso"); this.defineRelation("registry_flussocreditidetail", "registry", "flussocreditidetail", "idreg"); this.defineRelation("finmotive_finmotivedetail", "finmotive", "finmotivedetail", "idfinmotive"); this.defineRelation("income_incomeestimate", "income", "incomeestimate", "idinc"); this.defineRelation("estimate_incomeestimate", "estimate", "incomeestimate", "idestimkind", "yestim", "nestim"); cPar = new [] { income.Columns["idinc"] }; cChild = new [] { income.Columns["parentidinc"] }; Relations.Add(new DataRelation("incomeincome", cPar, cChild, false)); this.defineRelation("FK_estimate_estimatekind", "estimatekind", "estimate", "idestimkind"); this.defineRelation("FK_estimatedetail_estimatekind", "estimatekind", "estimatedetail", "idestimkind"); this.defineRelation("FK_estimatedetail_estimate", "estimate", "estimatedetail", "idestimkind", "yestim", "nestim"); this.defineRelation("registry_registryreference", "registry", "registryreference", "idreg"); this.defineRelation("invoicekind_invoicedetail", "invoicekind", "invoicedetail", "idinvkind"); this.defineRelation("currency_invoice", "currency", "invoice", "idcurrency"); this.defineRelation("list_flussocreditidetail", "list", "flussocreditidetail", "idlist"); this.defineRelation("ivaregisterkindivaregister", "ivaregisterkind", "ivaregister", "idivaregisterkind"); cPar = new [] { flussocrediti.Columns["idflusso"] }; cChild = new [] { webpayment.Columns["idflussocrediti"] }; Relations.Add(new DataRelation("flussocrediti_webpayment", cPar, cChild, false)); this.defineRelation("webpaymentstatus_webpayment", "webpaymentstatus", "webpayment", "idwebpaymentstatus"); this.defineRelation("invoice_incomeinvoice", "invoice", "incomeinvoice", "ninv", "yinv", "idinvkind"); cPar = new [] { invoicedetail.Columns["idinvkind"], invoicedetail.Columns["yinv"], invoicedetail.Columns["ninv"], invoicedetail.Columns["rownum"] }; cChild = new [] { flussocreditidetail.Columns["idinvkind"], flussocreditidetail.Columns["yinv"], flussocreditidetail.Columns["ninv"], flussocreditidetail.Columns["invrownum"] }; Relations.Add(new DataRelation("invoicedetail_flussocreditidetail", cPar, cChild, false)); this.defineRelation("estimatedetail_flussocreditidetail", "estimatedetail", "flussocreditidetail", "idestimkind", "yestim", "nestim", "rownum"); this.defineRelation("income_incomelast", "income", "incomelast", "idinc"); this.defineRelation("income_incomesorted", "income", "incomesorted", "idinc"); this.defineRelation("income_incomeyear", "income", "incomeyear", "idinc"); this.defineRelation("FK_flussoincassi_flussoincassidetail", "flussoincassi", "flussoincassidetail", "idflusso"); this.defineRelation("invoice_invoicedetail", "invoice", "invoicedetail", "idinvkind", "yinv", "ninv"); this.defineRelation("ivaregisterinvoice", "invoice", "ivaregister", "idinvkind", "yinv", "ninv"); cPar = new [] { income.Columns["idinc"] }; cChild = new [] { estimatedetail.Columns["idinc_taxable"] }; Relations.Add(new DataRelation("income_estimatedetail", cPar, cChild, false)); cPar = new [] { income.Columns["idinc"] }; cChild = new [] { estimatedetail.Columns["idinc_iva"] }; Relations.Add(new DataRelation("income_estimatedetail1", cPar, cChild, false)); this.defineRelation("income_incomevar", "income", "incomevar", "idinc"); #endregion }