// SchemaReader.ReadSchema
 public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory)
 {
     var result=new Tables();	
     this._connection=connection;
     this._factory=factory;
     var cmd=this._factory.CreateCommand();        
     cmd.Connection=connection;
     cmd.CommandText=TABLE_SQL;
     //cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null);
     //pull the tables in a reader
     using(cmd)
     {
         using (var rdr=cmd.ExecuteReader())
         {
             while(rdr.Read())
             {
                 Table tbl=new Table();
                 tbl.Name=rdr["name"].ToString();
                 tbl.Schema = "";
                 tbl.IsView=String.Compare(rdr["type"].ToString(), "view", true)==0;
                 tbl.CleanName=CleanUp(tbl.Name);
                 tbl.ClassName=Inflector.MakeSingular(tbl.CleanName);
                 tbl.SQL = rdr["sql"].ToString();
                 result.Add(tbl);
             }
         }
     }
     foreach (var tbl in result)
     {
         tbl.Columns=this.LoadColumns(tbl);
         tbl.Indexes = this.LoadIndices(tbl.Name);
         tbl.ForeignKeys = this.LoadForeignKeys(tbl.Name);
     }
     return result;
 }
        // SchemaReader.ReadSchema
        public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory)
        {
            var result = new Tables();


            var cmd = factory.CreateCommand();
            cmd.Connection = connection;
            cmd.CommandText = TABLE_SQL;

            //pull the tables in a reader
            using (cmd)
            {
                using (var rdr = cmd.ExecuteReader())
                {
                    while (rdr.Read())
                    {
                        Table tbl = new Table();
                        tbl.Name = rdr["TABLE_NAME"].ToString();
                        tbl.Schema = rdr["TABLE_SCHEMA"].ToString();
                        tbl.IsView = String.Compare(rdr["TABLE_TYPE"].ToString(), "View", true) == 0;
                        tbl.CleanName = CleanUp(tbl.Name);
                        tbl.ClassName = Inflector.MakeSingular(tbl.CleanName);
                        result.Add(tbl);
                    }
                }
            }

            //this will return everything for the DB
            var schema = connection.GetSchema("COLUMNS");

            //loop again - but this time pull by table name
            foreach (var item in result)
            {
                item.Columns = new List<Column>();

                //pull the columns from the schema
                var columns = schema.Select("TABLE_NAME='" + item.Name + "'");
                foreach (var row in columns)
                {
                    var type = GetPropertyType(row);
                    Column col = new Column();
                    col.Name = row["COLUMN_NAME"].ToString();
                    col.PropertyName = CleanUp(col.Name);
                    col.PropertyType = type;
                    col.CustomType = type == null 
                        ? row["DATA_TYPE"].ToString().ToLowerInvariant() 
                        : null;
                    col.Size = GetDatatypeSize(row["DATA_TYPE"].ToString());
                    col.Precision = GetDatatypePrecision(row["DATA_TYPE"].ToString());
                    col.IsNullable = row["IS_NULLABLE"].ToString() == "YES";
                    col.IsPrimaryKey = row["COLUMN_KEY"].ToString() == "PRI";
                    col.IsAutoIncrement = row["extra"].ToString().ToLower().IndexOf("auto_increment") >= 0;

                    item.Columns.Add(col);
                }
            }

            return result;

        }
        // SchemaReader.ReadSchema
        public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory)
        {
            var result=new Tables();
        
            this._connection=connection;
            this._factory=factory;

            var cmd=this._factory.CreateCommand();
            cmd.Connection=connection;
            cmd.CommandText=TABLE_SQL;
            cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null);

            //pull the tables in a reader
            using(cmd)
            {

                using (var rdr=cmd.ExecuteReader())
                {
                    while(rdr.Read())
                    {
                        Table tbl=new Table();
                        tbl.Name=rdr["TABLE_NAME"].ToString();
                        tbl.Schema = rdr["TABLE_SCHEMA"].ToString();
                        tbl.IsView=String.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0;
                        tbl.CleanName=CleanUp(tbl.Name);
                        tbl.ClassName=Inflector.MakeSingular(tbl.CleanName);
                        result.Add(tbl);
                    }
                }
            }

            foreach (var tbl in result)
            {
                tbl.Columns=this.LoadColumns(tbl);
                tbl.Indexes = this.LoadIndices(tbl.Name);
                tbl.ForeignKeys = this.LoadFKeys(tbl.Name);
			
                // Mark the primary key
                string PrimaryKey=this.GetPK(tbl.Name);
                var pkColumn=tbl.Columns.SingleOrDefault(x=>x.Name.ToLower().Trim()==PrimaryKey.ToLower().Trim());
                if(pkColumn!=null)
                    pkColumn.IsPrimaryKey=true;
            }
        

            return result;
        }
Exemple #4
0
        public Result GetResult()
        {
            Schemas schems = GetSchemas();
            Tables tables = new Tables();

            var oTables = schems.Select(p => new { p.表格名稱 }).GroupBy(p => p);

            foreach (var oTable in oTables)
            {
                tables.Add(new Table() {
                    表格名稱 = oTable.Key.表格名稱,
                    Schemas = schems.Where(p => p.表格名稱== oTable.Key.表格名稱).ToList<Schema>()
                });
            }

            return new Result() {
                Schems = schems,
                Tables = tables
            };
        }
Exemple #5
0
		/// <summary>
		/// Carga las tablas de la base de datos accediendo a la base de datos nuevamente.-
		/// </summary>
        /// <returns>Tables </returns>
        internal Tables LoadTables(bool pLoadColumns)
		{

            DataTable wDttTablas = null;
            Table wTable = null;
            Tables wTables = new Tables();
			try 
			{
				wDttTablas = GetTablesFromDataBase ();
                wDttTablas.TableName = "Tablas";
                foreach (DataRow oDtr in wDttTablas.Rows)
                {
                    if (oDtr["Schema"].ToString().Trim() != "sys")
                        if (!SysDataBasesList.Contains(oDtr["Name"].ToString().ToLower()))
                        {
                            wTable = new Table(oDtr["Name"].ToString());
                            //Carga el nombre del esquema
                            wTable.Schema = oDtr["Schema"].ToString();//GetSchema(wTable.Name);
                            wTables.Add(wTable);
                        }
                }

			    if(pLoadColumns)
				    SetColumnsAndKeysToTables(wTables);

                wDttTablas.Dispose();
                wDttTablas = null;

                OnAddElementEvent();
				return wTables;
                
			}
			catch(Exception ex)
			{throw ex;}

        }
Exemple #6
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// INCOME /////////////////////////////////
            T             = new DataTable("income");
            C             = new DataColumn("adate", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("doc", typeof(String)));
            T.Columns.Add(new DataColumn("docdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("expiration", typeof(DateTime)));
            T.Columns.Add(new DataColumn("idreg", typeof(Int32)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("nmov", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            C             = new DataColumn("ymov", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            C             = new DataColumn("nphase", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpayment", typeof(Int32)));
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("parentidinc", typeof(Int32)));
            T.Columns.Add(new DataColumn("autokind", typeof(Byte)));
            T.Columns.Add(new DataColumn("autocode", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idinc"] };


            //////////////////// PETTYCASHOPERATION /////////////////////////////////
            T             = new DataTable("pettycashoperation");
            C             = new DataColumn("yoperation", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("noperation", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idpettycash", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            T.Columns.Add(new DataColumn("idexp", typeof(Int32)));
            T.Columns.Add(new DataColumn("yrestore", typeof(Int16)));
            T.Columns.Add(new DataColumn("nrestore", typeof(Int32)));
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("doc", typeof(String)));
            T.Columns.Add(new DataColumn("docdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("amount", typeof(Decimal)));
            C             = new DataColumn("adate", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idsor01", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor02", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor03", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor04", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor05", typeof(Int32)));
            T.Columns.Add(new DataColumn("idaccmotive_cost", typeof(String)));
            T.Columns.Add(new DataColumn("idaccmotive_debit", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["yoperation"], T.Columns["noperation"], T.Columns["idpettycash"] };


            //////////////////// PETTYCASH /////////////////////////////////
            T             = new DataTable("pettycash");
            C             = new DataColumn("idpettycash", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("pettycode", typeof(String)));
            T.Columns.Add(new DataColumn("active", typeof(String)));
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idsor01", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor02", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor03", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor04", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor05", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idpettycash"] };


            //////////////////// PETTYCASHSETUP /////////////////////////////////
            T             = new DataTable("pettycashsetup");
            C             = new DataColumn("idpettycash", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("registrymanager", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinincome", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinexpense", typeof(Int32)));
            T.Columns.Add(new DataColumn("amount", typeof(Decimal)));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flag", typeof(Int32)));
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("autoclassify", typeof(String)));
            T.Columns.Add(new DataColumn("idsor_siopeexp", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor_siopeinc", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idpettycash"], T.Columns["ayear"] };


            //////////////////// PETTYCASHINCOME /////////////////////////////////
            T             = new DataTable("pettycashincome");
            C             = new DataColumn("yoperation", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("noperation", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idpettycash", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["yoperation"], T.Columns["noperation"], T.Columns["idpettycash"], T.Columns["idinc"] };


            //////////////////// INCOMEYEAR /////////////////////////////////
            T             = new DataTable("incomeyear");
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("amount", typeof(Decimal)));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idinc"], T.Columns["ayear"] };


            //////////////////// FIN /////////////////////////////////
            T             = new DataTable("fin");
            C             = new DataColumn("idfin", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("codefin", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idfin"] };


            //////////////////// REGISTRY /////////////////////////////////
            T             = new DataTable("registry");
            C             = new DataColumn("idreg", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("title", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idreg"] };


            //////////////////// INCOMEPHASE /////////////////////////////////
            T             = new DataTable("incomephase");
            C             = new DataColumn("nphase", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["nphase"] };


            //////////////////// PROCEEDS /////////////////////////////////
            T             = new DataTable("proceeds");
            C             = new DataColumn("ypro", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("npro", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idtreasurer", typeof(Int32)));
            T.Columns.Add(new DataColumn("idreg", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            C             = new DataColumn("adate", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("printdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("annulmentdate", typeof(DateTime)));
            C             = new DataColumn("kpro", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idstamphandling", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor01", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor02", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor03", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor04", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor05", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["kpro"] };


            //////////////////// UPB /////////////////////////////////
            T             = new DataTable("upb");
            C             = new DataColumn("idupb", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("codeupb", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idupb"] };


            //////////////////// INCOMESORTED /////////////////////////////////
            T             = new DataTable("incomesorted");
            C             = new DataColumn("idsor", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idsubclass", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("amount", typeof(Decimal)));
            T.Columns.Add(new DataColumn("ayear", typeof(Int16)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("description", typeof(String)));
            T.Columns.Add(new DataColumn("flagnodate", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("paridsor", typeof(Int32)));
            T.Columns.Add(new DataColumn("paridsubclass", typeof(Int16)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("start", typeof(DateTime)));
            T.Columns.Add(new DataColumn("stop", typeof(DateTime)));
            T.Columns.Add(new DataColumn("tobecontinued", typeof(String)));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("valuen1", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuen2", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuen3", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuen4", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuen5", typeof(Decimal)));
            T.Columns.Add(new DataColumn("values1", typeof(String)));
            T.Columns.Add(new DataColumn("values2", typeof(String)));
            T.Columns.Add(new DataColumn("values3", typeof(String)));
            T.Columns.Add(new DataColumn("values4", typeof(String)));
            T.Columns.Add(new DataColumn("values5", typeof(String)));
            T.Columns.Add(new DataColumn("valuev1", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuev2", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuev3", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuev4", typeof(Decimal)));
            T.Columns.Add(new DataColumn("valuev5", typeof(Decimal)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idinc"], T.Columns["idsor"], T.Columns["idsubclass"] };


            //////////////////// SORTINGKIND /////////////////////////////////
            T             = new DataTable("sortingkind");
            C             = new DataColumn("idsorkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("active", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagdate", typeof(String)));
            T.Columns.Add(new DataColumn("forcedN1", typeof(String)));
            T.Columns.Add(new DataColumn("forcedN2", typeof(String)));
            T.Columns.Add(new DataColumn("forcedN3", typeof(String)));
            T.Columns.Add(new DataColumn("forcedN4", typeof(String)));
            T.Columns.Add(new DataColumn("forcedN5", typeof(String)));
            T.Columns.Add(new DataColumn("forcedS1", typeof(String)));
            T.Columns.Add(new DataColumn("forcedS2", typeof(String)));
            T.Columns.Add(new DataColumn("forcedS3", typeof(String)));
            T.Columns.Add(new DataColumn("forcedS4", typeof(String)));
            T.Columns.Add(new DataColumn("forcedS5", typeof(String)));
            T.Columns.Add(new DataColumn("forcedv1", typeof(String)));
            T.Columns.Add(new DataColumn("forcedv2", typeof(String)));
            T.Columns.Add(new DataColumn("forcedv3", typeof(String)));
            T.Columns.Add(new DataColumn("forcedv4", typeof(String)));
            T.Columns.Add(new DataColumn("forcedv5", typeof(String)));
            T.Columns.Add(new DataColumn("labelfordate", typeof(String)));
            T.Columns.Add(new DataColumn("labeln1", typeof(String)));
            T.Columns.Add(new DataColumn("labeln2", typeof(String)));
            T.Columns.Add(new DataColumn("labeln3", typeof(String)));
            T.Columns.Add(new DataColumn("labeln4", typeof(String)));
            T.Columns.Add(new DataColumn("labeln5", typeof(String)));
            T.Columns.Add(new DataColumn("labels1", typeof(String)));
            T.Columns.Add(new DataColumn("labels2", typeof(String)));
            T.Columns.Add(new DataColumn("labels3", typeof(String)));
            T.Columns.Add(new DataColumn("labels4", typeof(String)));
            T.Columns.Add(new DataColumn("labels5", typeof(String)));
            T.Columns.Add(new DataColumn("labelv1", typeof(String)));
            T.Columns.Add(new DataColumn("labelv2", typeof(String)));
            T.Columns.Add(new DataColumn("labelv3", typeof(String)));
            T.Columns.Add(new DataColumn("labelv4", typeof(String)));
            T.Columns.Add(new DataColumn("labelv5", typeof(String)));
            T.Columns.Add(new DataColumn("lockedN1", typeof(String)));
            T.Columns.Add(new DataColumn("lockedN2", typeof(String)));
            T.Columns.Add(new DataColumn("lockedN3", typeof(String)));
            T.Columns.Add(new DataColumn("lockedN4", typeof(String)));
            T.Columns.Add(new DataColumn("lockedN5", typeof(String)));
            T.Columns.Add(new DataColumn("lockedS1", typeof(String)));
            T.Columns.Add(new DataColumn("lockedS2", typeof(String)));
            T.Columns.Add(new DataColumn("lockedS3", typeof(String)));
            T.Columns.Add(new DataColumn("lockedS4", typeof(String)));
            T.Columns.Add(new DataColumn("lockedS5", typeof(String)));
            T.Columns.Add(new DataColumn("lockedv1", typeof(String)));
            T.Columns.Add(new DataColumn("lockedv2", typeof(String)));
            T.Columns.Add(new DataColumn("lockedv3", typeof(String)));
            T.Columns.Add(new DataColumn("lockedv4", typeof(String)));
            T.Columns.Add(new DataColumn("lockedv5", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("nodatelabel", typeof(String)));
            T.Columns.Add(new DataColumn("nphaseexpense", typeof(Byte)));
            T.Columns.Add(new DataColumn("nphaseincome", typeof(Byte)));
            T.Columns.Add(new DataColumn("totalexpression", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idsorkind"] };


            //////////////////// INCOMEVIEW /////////////////////////////////
            T             = new DataTable("incomeview");
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("!livprecedente", typeof(String)));
            T.Columns.Add(new DataColumn("nphase", typeof(Byte)));
            C             = new DataColumn("phase", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ymov", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("nmov", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idsor01", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor02", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor03", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor04", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor05", typeof(Int32)));
            T.Columns.Add(new DataColumn("parentymov", typeof(Int16)));
            T.Columns.Add(new DataColumn("parentnmov", typeof(Int32)));
            T.Columns.Add(new DataColumn("parentidinc", typeof(Int32)));
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("codefin", typeof(String)));
            T.Columns.Add(new DataColumn("finance", typeof(String)));
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("codeupb", typeof(String)));
            T.Columns.Add(new DataColumn("upb", typeof(String)));
            T.Columns.Add(new DataColumn("idreg", typeof(Int32)));
            T.Columns.Add(new DataColumn("registry", typeof(String)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            T.Columns.Add(new DataColumn("manager", typeof(String)));
            T.Columns.Add(new DataColumn("ypro", typeof(Int16)));
            T.Columns.Add(new DataColumn("npro", typeof(Int32)));
            T.Columns.Add(new DataColumn("doc", typeof(String)));
            T.Columns.Add(new DataColumn("docdate", typeof(DateTime)));
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("amount", typeof(Decimal)));
            T.Columns.Add(new DataColumn("ayearstartamount", typeof(Decimal)));
            T.Columns.Add(new DataColumn("curramount", typeof(Decimal)));
            T.Columns.Add(new DataColumn("available", typeof(Decimal)));
            T.Columns.Add(new DataColumn("unpartitioned", typeof(Decimal)));
            T.Columns.Add(new DataColumn("flag", typeof(Byte)));
            C             = new DataColumn("totflag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagarrear", typeof(String)));
            T.Columns.Add(new DataColumn("autokind", typeof(Byte)));
            T.Columns.Add(new DataColumn("autocode", typeof(Int32)));
            T.Columns.Add(new DataColumn("idpayment", typeof(Int32)));
            T.Columns.Add(new DataColumn("expiration", typeof(DateTime)));
            C             = new DataColumn("adate", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("nbill", typeof(Int32)));
            T.Columns.Add(new DataColumn("idpro", typeof(Int32)));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);

            //////////////////// INCOMELAST /////////////////////////////////
            T             = new DataTable("incomelast");
            C             = new DataColumn("idinc", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpro", typeof(Int32)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("nbill", typeof(Int32)));
            T.Columns.Add(new DataColumn("kpro", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idinc"] };


            //////////////////// CONFIG /////////////////////////////////
            T             = new DataTable("config");
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("agencycode", typeof(String)));
            T.Columns.Add(new DataColumn("appname", typeof(String)));
            T.Columns.Add(new DataColumn("appropriationphasecode", typeof(Byte)));
            T.Columns.Add(new DataColumn("assessmentphasecode", typeof(Byte)));
            T.Columns.Add(new DataColumn("asset_flagnumbering", typeof(String)));
            T.Columns.Add(new DataColumn("asset_flagrestart", typeof(String)));
            T.Columns.Add(new DataColumn("assetload_flag", typeof(Byte)));
            T.Columns.Add(new DataColumn("boxpartitiontitle", typeof(String)));
            T.Columns.Add(new DataColumn("cashvaliditykind", typeof(Byte)));
            T.Columns.Add(new DataColumn("casualcontract_flagrestart", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("currpartitiontitle", typeof(String)));
            T.Columns.Add(new DataColumn("deferredexpensephase", typeof(String)));
            T.Columns.Add(new DataColumn("deferredincomephase", typeof(String)));
            T.Columns.Add(new DataColumn("electronicimport", typeof(String)));
            T.Columns.Add(new DataColumn("electronictrasmission", typeof(String)));
            T.Columns.Add(new DataColumn("expense_expiringdays", typeof(Int16)));
            T.Columns.Add(new DataColumn("expensephase", typeof(Byte)));
            T.Columns.Add(new DataColumn("flagautopayment", typeof(String)));
            T.Columns.Add(new DataColumn("flagautoproceeds", typeof(String)));
            T.Columns.Add(new DataColumn("flagcredit", typeof(String)));
            T.Columns.Add(new DataColumn("flagepexp", typeof(String)));
            T.Columns.Add(new DataColumn("flagfruitful", typeof(String)));
            T.Columns.Add(new DataColumn("flagpayment", typeof(String)));
            T.Columns.Add(new DataColumn("flagproceeds", typeof(String)));
            T.Columns.Add(new DataColumn("flagrefund", typeof(String)));
            T.Columns.Add(new DataColumn("foreignhours", typeof(Int32)));
            T.Columns.Add(new DataColumn("idacc_accruedcost", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_accruedrevenue", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_customer", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_deferredcost", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_deferredcredit", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_deferreddebit", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_deferredrevenue", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_ivapayment", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_ivarefund", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_patrimony", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_pl", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_supplier", typeof(String)));
            T.Columns.Add(new DataColumn("idaccmotive_admincar", typeof(String)));
            T.Columns.Add(new DataColumn("idaccmotive_foot", typeof(String)));
            T.Columns.Add(new DataColumn("idaccmotive_owncar", typeof(String)));
            T.Columns.Add(new DataColumn("idclawback", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinexpense", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinexpensesurplus", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinincomesurplus", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinivapayment", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfinivarefund", typeof(Int32)));
            T.Columns.Add(new DataColumn("idivapayperiodicity", typeof(Int32)));
            T.Columns.Add(new DataColumn("idregauto", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsortingkind1", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsortingkind2", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsortingkind3", typeof(Int32)));
            T.Columns.Add(new DataColumn("importappname", typeof(String)));
            T.Columns.Add(new DataColumn("income_expiringdays", typeof(Int16)));
            T.Columns.Add(new DataColumn("incomephase", typeof(Byte)));
            T.Columns.Add(new DataColumn("linktoinvoice", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("minpayment", typeof(Decimal)));
            T.Columns.Add(new DataColumn("minrefund", typeof(Decimal)));
            T.Columns.Add(new DataColumn("motivelen", typeof(Int16)));
            T.Columns.Add(new DataColumn("motiveprefix", typeof(String)));
            T.Columns.Add(new DataColumn("motiveseparator", typeof(String)));
            T.Columns.Add(new DataColumn("payment_finlevel", typeof(Byte)));
            T.Columns.Add(new DataColumn("payment_flag", typeof(Byte)));
            T.Columns.Add(new DataColumn("payment_flagautoprintdate", typeof(String)));
            T.Columns.Add(new DataColumn("paymentagency", typeof(Int32)));
            T.Columns.Add(new DataColumn("prevpartitiontitle", typeof(String)));
            T.Columns.Add(new DataColumn("proceeds_finlevel", typeof(Byte)));
            T.Columns.Add(new DataColumn("proceeds_flag", typeof(Byte)));
            T.Columns.Add(new DataColumn("proceeds_flagautoprintdate", typeof(String)));
            T.Columns.Add(new DataColumn("profservice_flagrestart", typeof(String)));
            T.Columns.Add(new DataColumn("refundagency", typeof(Int32)));
            T.Columns.Add(new DataColumn("wageaddition_flagrestart", typeof(String)));
            T.Columns.Add(new DataColumn("flagpcashautopayment", typeof(String)));
            T.Columns.Add(new DataColumn("flagpcashautoproceeds", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"] };


            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[1] {
                income.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                incomelast.Columns["idinc"]
            };
            Relations.Add(new DataRelation("income_incomelast", CPar, CChild, false));

            CPar = new DataColumn[1] {
                proceeds.Columns["kpro"]
            };
            CChild = new DataColumn[1] {
                incomelast.Columns["kpro"]
            };
            Relations.Add(new DataRelation("proceeds_incomelast", CPar, CChild, false));

            CPar = new DataColumn[1] {
                income.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                incomesorted.Columns["idinc"]
            };
            Relations.Add(new DataRelation("income_incomesorted", CPar, CChild, false));

            CPar = new DataColumn[1] {
                fin.Columns["idfin"]
            };
            CChild = new DataColumn[1] {
                incomeyear.Columns["idfin"]
            };
            Relations.Add(new DataRelation("finincomeyear", CPar, CChild, false));

            CPar = new DataColumn[1] {
                income.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                incomeyear.Columns["idinc"]
            };
            Relations.Add(new DataRelation("incomeincomeyear", CPar, CChild, false));

            CPar = new DataColumn[1] {
                upb.Columns["idupb"]
            };
            CChild = new DataColumn[1] {
                incomeyear.Columns["idupb"]
            };
            Relations.Add(new DataRelation("upbincomeyear", CPar, CChild, false));

            CPar = new DataColumn[1] {
                income.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                pettycashincome.Columns["idinc"]
            };
            Relations.Add(new DataRelation("incomepettycashincome", CPar, CChild, false));

            CPar = new DataColumn[3] {
                pettycashoperation.Columns["yoperation"], pettycashoperation.Columns["noperation"], pettycashoperation.Columns["idpettycash"]
            };
            CChild = new DataColumn[3] {
                pettycashincome.Columns["yoperation"], pettycashincome.Columns["noperation"], pettycashincome.Columns["idpettycash"]
            };
            Relations.Add(new DataRelation("pettycashoperationpettycashincome", CPar, CChild, false));

            CPar = new DataColumn[1] {
                pettycash.Columns["idpettycash"]
            };
            CChild = new DataColumn[1] {
                pettycashoperation.Columns["idpettycash"]
            };
            Relations.Add(new DataRelation("pettycashpettycashoperation", CPar, CChild, false));

            CPar = new DataColumn[1] {
                upb.Columns["idupb"]
            };
            CChild = new DataColumn[1] {
                pettycashoperation.Columns["idupb"]
            };
            Relations.Add(new DataRelation("upbpettycashoperation", CPar, CChild, false));

            CPar = new DataColumn[1] {
                incomephase.Columns["nphase"]
            };
            CChild = new DataColumn[1] {
                income.Columns["nphase"]
            };
            Relations.Add(new DataRelation("incomephaseincome", CPar, CChild, false));

            CPar = new DataColumn[1] {
                registry.Columns["idreg"]
            };
            CChild = new DataColumn[1] {
                income.Columns["idreg"]
            };
            Relations.Add(new DataRelation("registryincome", CPar, CChild, false));

            CPar = new DataColumn[1] {
                income.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                income.Columns["parentidinc"]
            };
            Relations.Add(new DataRelation("incomeincome", CPar, CChild, false));

            #endregion
        }
Exemple #7
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("payroll");
            C             = new DataColumn("idpayroll", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("fiscalyear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("npayroll", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagbalance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("disbursementdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idresidence", typeof(System.Int32), ""));
            C             = new DataColumn("workingdays", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("feegross", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flagcomputed", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idcon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("currentrounding", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            C             = new DataColumn("enabletaxrelief", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("start", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("stop", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("netfee", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("flagsummarybalance", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idpayroll"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("parasubcontract");
            C             = new DataColumn("idcon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ycon", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ncon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idreg", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("duty", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idpayrollkind", typeof(System.String), ""));
            C             = new DataColumn("idser", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("employed", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("payrollccinfo", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("start", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("stop", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("monthlen", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("grossamount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idpat", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("matricula", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idmatriculabook", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idcon"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("payrollview");
            C             = new DataColumn("idpayroll", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("fiscalyear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("npayroll", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagbalance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("disbursementdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idresidence", typeof(System.Int32), ""));
            C             = new DataColumn("workingdays", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("feegross", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flagcomputed", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idcon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("currentrounding", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            C             = new DataColumn("enabletaxrelief", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("start", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("stop", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("netfee", typeof(System.Decimal), ""));
            C             = new DataColumn("ycon", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ncon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("registry", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idreg", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("matricula", typeof(System.Int32), ""));
            C             = new DataColumn("idser", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("service", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("residencecity", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!causa", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagsummarybalance", typeof(System.String), ""));
            Tables.Add(T);

//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["parasubcontract"];
            TChild = Tables["payroll"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idcon"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idcon"]
            };
            Relations.Add(new DataRelation("parasubcontractpayroll", CPar, CChild));
        }
Exemple #8
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("accmotivedetail");
            C             = new DataColumn("idaccmotive", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idaccmotive"], T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account");
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["account"];
            TChild = Tables["accmotivedetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc"]
            };
            Relations.Add(new DataRelation("accountaccmotivedetail", CPar, CChild));
        }
Exemple #9
0
        private void InitClass()
        {
            DataSetName        = "vistaResponsabiliCespiti";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaResponsabiliCespiti.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// ASSET /////////////////////////////////
            T             = new DataTable("asset");
            C             = new DataColumn("idasset", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idpiece", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idasset_prev", typeof(Int32)));
            T.Columns.Add(new DataColumn("idpiece_prev", typeof(Int32)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("lifestart", typeof(DateTime)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("nassetacquire", typeof(Int32)));
            T.Columns.Add(new DataColumn("ninventory", typeof(Int32)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("transmitted", typeof(String)));
            T.Columns.Add(new DataColumn("idassetunload", typeof(Int32)));
            C             = new DataColumn("flag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("multifield", typeof(String)));
            T.Columns.Add(new DataColumn("idcurrlocation", typeof(Int32)));
            T.Columns.Add(new DataColumn("idcurrman", typeof(Int32)));
            T.Columns.Add(new DataColumn("idcurrsubman", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idasset"], T.Columns["idpiece"] };


            //////////////////// ASSETLOCATION /////////////////////////////////
            T             = new DataTable("assetlocation");
            C             = new DataColumn("idasset", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idassetlocation", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("start", typeof(DateTime)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idlocation", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idasset"], T.Columns["idassetlocation"] };


            //////////////////// ASSETMANAGER /////////////////////////////////
            T             = new DataTable("assetmanager");
            C             = new DataColumn("idasset", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idassetmanager", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("start", typeof(DateTime)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idman", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idasset"], T.Columns["idassetmanager"] };


            //////////////////// MANAGER /////////////////////////////////
            T = new DataTable("manager");
            T.Columns.Add(new DataColumn("active", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("email", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("passwordweb", typeof(String)));
            T.Columns.Add(new DataColumn("phonenumber", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            C             = new DataColumn("title", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("financeactive", typeof(String)));
            T.Columns.Add(new DataColumn("userweb", typeof(String)));
            C             = new DataColumn("idman", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("iddivision", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idman"] };


            //////////////////// LOCATION /////////////////////////////////
            T = new DataTable("location");
            T.Columns.Add(new DataColumn("active", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("locationcode", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            C             = new DataColumn("nlevel", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idlocation", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("paridlocation", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idlocation"] };


            //////////////////// DIVISION /////////////////////////////////
            T = new DataTable("division");
            T.Columns.Add(new DataColumn("address", typeof(String)));
            T.Columns.Add(new DataColumn("cap", typeof(String)));
            T.Columns.Add(new DataColumn("city", typeof(String)));
            T.Columns.Add(new DataColumn("country", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("faxnumber", typeof(String)));
            T.Columns.Add(new DataColumn("faxprefix", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("phonenumber", typeof(String)));
            T.Columns.Add(new DataColumn("phoneprefix", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            C             = new DataColumn("codedivision", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("iddivision", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["iddivision"] };


            //////////////////// ASSETTOLINK /////////////////////////////////
            T             = new DataTable("assettolink");
            C             = new DataColumn("idasset", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idpiece", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idinventory_tolink", typeof(Int32)));
            T.Columns.Add(new DataColumn("ninventory_tolink", typeof(Int32)));
            T.Columns.Add(new DataColumn("idpiece_tolink", typeof(Int32)));
            C             = new DataColumn("kind", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idasset"], T.Columns["idpiece"], T.Columns["kind"] };


            //////////////////// ASSETSUBMANAGER /////////////////////////////////
            T             = new DataTable("assetsubmanager");
            C             = new DataColumn("idasset", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idassetsubmanager", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("start", typeof(DateTime)));
            T.Columns.Add(new DataColumn("idmanager", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idasset"], T.Columns["idassetsubmanager"] };


            //////////////////// ASSETACQUIRE /////////////////////////////////
            T             = new DataTable("assetacquire");
            C             = new DataColumn("nassetacquire", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("abatable", typeof(Decimal)));
            C             = new DataColumn("adate", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("discount", typeof(Double)));
            T.Columns.Add(new DataColumn("idmankind", typeof(String)));
            T.Columns.Add(new DataColumn("idreg", typeof(Int32)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("nman", typeof(Int32)));
            C             = new DataColumn("number", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("rownum", typeof(Int32)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("startnumber", typeof(Int32)));
            T.Columns.Add(new DataColumn("tax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("taxable", typeof(Decimal)));
            T.Columns.Add(new DataColumn("taxrate", typeof(Double)));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("yman", typeof(Int16)));
            T.Columns.Add(new DataColumn("transmitted", typeof(String)));
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            C             = new DataColumn("idinventory", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idmot", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idinv", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idassetload", typeof(Int32)));
            C             = new DataColumn("flag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idsor1", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor2", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor3", typeof(Int32)));
            T.Columns.Add(new DataColumn("historicalvalue", typeof(Decimal)));
            T.Columns.Add(new DataColumn("idlist", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["nassetacquire"] };


            //////////////////// INVENTORY /////////////////////////////////
            T             = new DataTable("inventory");
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("startnumber", typeof(Int32)));
            C             = new DataColumn("idinventoryagency", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idinventorykind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("codeinventory", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idinventory", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flag", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("active", typeof(String)));
            T.Columns.Add(new DataColumn("idsor01", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor02", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor03", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor04", typeof(Int32)));
            T.Columns.Add(new DataColumn("idsor05", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idinventory"] };


            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[1] {
                manager.Columns["idman"]
            };
            CChild = new DataColumn[1] {
                assetsubmanager.Columns["idmanager"]
            };
            Relations.Add(new DataRelation("manager_assetsubmanager", CPar, CChild, false));

            CPar = new DataColumn[1] {
                asset.Columns["idasset"]
            };
            CChild = new DataColumn[1] {
                assetsubmanager.Columns["idasset"]
            };
            Relations.Add(new DataRelation("asset_assetsubmanager", CPar, CChild, false));

            CPar = new DataColumn[2] {
                asset.Columns["idasset"], asset.Columns["idpiece"]
            };
            CChild = new DataColumn[2] {
                assettolink.Columns["idasset"], assettolink.Columns["idpiece"]
            };
            Relations.Add(new DataRelation("asset_assettolink", CPar, CChild, false));

            CPar = new DataColumn[1] {
                division.Columns["iddivision"]
            };
            CChild = new DataColumn[1] {
                manager.Columns["iddivision"]
            };
            Relations.Add(new DataRelation("division_manager", CPar, CChild, false));

            CPar = new DataColumn[1] {
                manager.Columns["idman"]
            };
            CChild = new DataColumn[1] {
                assetmanager.Columns["idman"]
            };
            Relations.Add(new DataRelation("manager_assetmanager", CPar, CChild, false));

            CPar = new DataColumn[1] {
                asset.Columns["idasset"]
            };
            CChild = new DataColumn[1] {
                assetmanager.Columns["idasset"]
            };
            Relations.Add(new DataRelation("asset_assetmanager", CPar, CChild, false));

            CPar = new DataColumn[1] {
                asset.Columns["idasset"]
            };
            CChild = new DataColumn[1] {
                assetlocation.Columns["idasset"]
            };
            Relations.Add(new DataRelation("asset_assetlocation", CPar, CChild, false));

            CPar = new DataColumn[1] {
                location.Columns["idlocation"]
            };
            CChild = new DataColumn[1] {
                assetlocation.Columns["idlocation"]
            };
            Relations.Add(new DataRelation("location_assetlocation", CPar, CChild, false));

            CPar = new DataColumn[2] {
                asset.Columns["idasset"], asset.Columns["idpiece"]
            };
            CChild = new DataColumn[2] {
                asset.Columns["idasset_prev"], asset.Columns["idpiece_prev"]
            };
            Relations.Add(new DataRelation("asset_asset", CPar, CChild, false));

            CPar = new DataColumn[1] {
                manager.Columns["idman"]
            };
            CChild = new DataColumn[1] {
                asset.Columns["idcurrman"]
            };
            Relations.Add(new DataRelation("manager_asset", CPar, CChild, false));

            CPar = new DataColumn[1] {
                location.Columns["idlocation"]
            };
            CChild = new DataColumn[1] {
                asset.Columns["idcurrlocation"]
            };
            Relations.Add(new DataRelation("location_asset", CPar, CChild, false));

            CPar = new DataColumn[1] {
                manager.Columns["idman"]
            };
            CChild = new DataColumn[1] {
                asset.Columns["idcurrsubman"]
            };
            Relations.Add(new DataRelation("manager_asset1", CPar, CChild, false));

            CPar = new DataColumn[1] {
                inventory.Columns["idinventory"]
            };
            CChild = new DataColumn[1] {
                assetacquire.Columns["idinventory"]
            };
            Relations.Add(new DataRelation("inventory_assetacquire", CPar, CChild, false));

            CPar = new DataColumn[1] {
                assetacquire.Columns["nassetacquire"]
            };
            CChild = new DataColumn[1] {
                asset.Columns["nassetacquire"]
            };
            Relations.Add(new DataRelation("assetacquire_asset", CPar, CChild, false));

            #endregion
        }
Exemple #10
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("entrysetup");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idacc_customer", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_supplier", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_ivapayment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_ivarefund", typeof(System.String), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagepexp", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_accruedcost", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_accruedrevenue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferredcost", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferredrevenue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_pl", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_patrimony", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["ayear"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_ivapayment");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_supplier");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_ivarefund");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_customer");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_accruedcost");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_accruedrevenue");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_deferredcost");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_deferredrevenue");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_pat");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idpatrimony", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idplaccount", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagprofit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagloss", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("placcount_sign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("patrimony_sign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagcompetency", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("account_pl");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagregistry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagtransitory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccountkind", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridacc", typeof(System.String), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idpatrimony", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idplaccount", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagprofit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagloss", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("placcount_sign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("patrimony_sign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagcompetency", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idacc"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["account_deferredrevenue"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_deferredrevenue"]
            };
            Relations.Add(new DataRelation("account_deferredrevenueentrysetup", CPar, CChild));

            TPar   = Tables["account_ivarefund"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_ivarefund"]
            };
            Relations.Add(new DataRelation("account_ivarefundentrysetup", CPar, CChild));

            TPar   = Tables["account_ivapayment"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_ivapayment"]
            };
            Relations.Add(new DataRelation("account_ivapaymententrysetup", CPar, CChild));

            TPar   = Tables["account_supplier"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_supplier"]
            };
            Relations.Add(new DataRelation("account_supplierentrysetup", CPar, CChild));

            TPar   = Tables["account_customer"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_customer"]
            };
            Relations.Add(new DataRelation("account_customerentrysetup", CPar, CChild));

            TPar   = Tables["account_accruedcost"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_accruedcost"]
            };
            Relations.Add(new DataRelation("account_accruedcostentrysetup", CPar, CChild));

            TPar   = Tables["account_accruedrevenue"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_accruedrevenue"]
            };
            Relations.Add(new DataRelation("account_accruedrevenueentrysetup", CPar, CChild));

            TPar   = Tables["account_deferredcost"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_deferredcost"]
            };
            Relations.Add(new DataRelation("account_deferredcostentrysetup", CPar, CChild));

            TPar   = Tables["account_pat"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_patrimony"]
            };
            Relations.Add(new DataRelation("account_pat_entrysetup", CPar, CChild));

            TPar   = Tables["account_pl"];
            TChild = Tables["entrysetup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idacc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idacc_pl"]
            };
            Relations.Add(new DataRelation("account_pl_entrysetup", CPar, CChild));
        }
Exemple #11
0
        private void GetStoredProcedures(OleDbConnection conn)
        {
            // add stored procedures
            var dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedures, null);

            foreach (DataRow dr in dt.Rows)
            {
                // get the procedure name, skip system stuff
                var name = dr[PROCEDURE_NAME] as string;
                if (name.StartsWith("~") || name.StartsWith("dt_", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }
                var schema = dr[PROCEDURE_SCHEMA] as string;
                if (object.Equals(schema, "sys"))
                {
                    continue;
                }

                // trim number that comes after name in Sql databases
                int pos = name.LastIndexOf(';');
                if (pos > -1)
                {
                    if (int.TryParse(name.Substring(pos + 1), out var i))
                    {
                        name = name.Substring(0, pos);
                    }
                }

                // create table
                var table = new DataTable(name);

                // get parameters
                var parmList = new List <OleDbParameter>();
                table.ExtendedProperties[PROCEDURE_PARAMETERS] = parmList;
                if (!conn.Provider.Contains("SQLOLEDB"))
                {
                    GetAccessParameters(dr, parmList);
                }
                else
                {
                    var dtParms      = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedure_Parameters, new object[] { null, null, name, null });
                    var returnsValue = GetSqlServerParameters(dtParms, parmList);
                    if (!returnsValue)
                    {
                        continue;
                    }
                }

                // get table schema
                try
                {
                    var select = GetSelectStatement(table);
                    var da     = new OleDbDataAdapter(select, ConnectionString);
                    da.FillSchema(table, SchemaType.Mapped);
                }
                catch (Exception x)
                {
                    Debug.WriteLine(x.Message);
                }

                // add to collection (with or without schema)
                Tables.Add(table);
            }
        }
Exemple #12
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("placcountlookup");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("oldidplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newidplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["oldidplaccount"], T.Columns["newidplaccount"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("placcountlookupview");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("oldidplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("oldayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("oldcodeplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("oldtitle", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("oldplaccpart", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newidplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newcodeplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newtitle", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("newplaccpart", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["oldidplaccount"], T.Columns["newidplaccount"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("placcountlevel");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ayear"], T.Columns["nlevel"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("placcount");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("active", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("paridplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("placcpart", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idplaccount"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("placcount1");
            T.Namespace   = this.Namespace;
            C             = new DataColumn("idplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("active", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("paridplaccount", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("placcpart", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idplaccount"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["placcount1"];
            TChild = Tables["placcountlookup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idplaccount"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["newidplaccount"]
            };
            Relations.Add(new DataRelation("placcount1_placcountlookup", CPar, CChild));

            TPar   = Tables["placcount"];
            TChild = Tables["placcountlookup"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idplaccount"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["oldidplaccount"]
            };
            Relations.Add(new DataRelation("placcount_placcountlookup", CPar, CChild));
        }
Exemple #13
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("itinerationrefundkindgroup");
            C             = new DataColumn("iditinerationrefundkindgroup", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("allowalways", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["iditinerationrefundkindgroup"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("itinerationrefundkindgroupreduction");
            C             = new DataColumn("iditinerationrefundkindgroup", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idreduction", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["iditinerationrefundkindgroup"], T.Columns["idreduction"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("reduction");
            C             = new DataColumn("idreduction", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idreduction"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["reduction"];
            TChild = Tables["itinerationrefundkindgroupreduction"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idreduction"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idreduction"]
            };
            Relations.Add(new DataRelation("reduction_itinerationrefundkindgroupreduction", CPar, CChild));

            TPar   = Tables["itinerationrefundkindgroup"];
            TChild = Tables["itinerationrefundkindgroupreduction"];
            CPar   = new DataColumn[1] {
                TPar.Columns["iditinerationrefundkindgroup"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["iditinerationrefundkindgroup"]
            };
            Relations.Add(new DataRelation("itinerationrefundkindgroup_itinerationrefundkindgroupreduction", CPar, CChild));
        }
Exemple #14
0
        private void InitClass()
        {
            this.DataSetName        = "vistaResponsabile";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaResponsabile.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T = new DataTable("manager");
            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("email", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("passwordweb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("phonenumber", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("userweb", typeof(System.String), ""));
            C             = new DataColumn("idman", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("iddivision", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("wantswarn", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idsor01", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor02", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor03", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor04", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor05", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idman"]
            };
            T.PrimaryKey = key;

            T = new DataTable("division");
            T.Columns.Add(new DataColumn("address", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cap", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("city", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("country", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("faxnumber", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("faxprefix", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("phonenumber", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("phoneprefix", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            C             = new DataColumn("codedivision", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("iddivision", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["iddivision"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["division"];
            TChild = Tables["manager"];
            CPar   = new DataColumn[1] {
                TPar.Columns["iddivision"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["iddivision"]
            };
            Relations.Add(new DataRelation("division_manager", CPar, CChild));
        }
Exemple #15
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// PARASUBCONTRACT /////////////////////////////////
            T             = new DataTable("parasubcontract");
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpayrollkind", typeof(String)));
            C             = new DataColumn("idreg", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idser", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idmatriculabook", typeof(String)));
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            C             = new DataColumn("stop", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("start", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("duty", typeof(String)));
            C             = new DataColumn("monthlen", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ycon", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpat", typeof(Int32)));
            C             = new DataColumn("grossamount", typeof(Decimal));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("payrollccinfo", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("employed", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("matricula", typeof(Int32)));
            C             = new DataColumn("ncon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagroundedmonths", typeof(String)));
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            T.Columns.Add(new DataColumn("requested_doc", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcon"] };


            #endregion
        }
Exemple #16
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// ABATEMENTCODE /////////////////////////////////
            T             = new DataTable("abatementcode");
            C             = new DataColumn("idabatement", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("code", typeof(String)));
            T.Columns.Add(new DataColumn("description", typeof(String)));
            T.Columns.Add(new DataColumn("exemption", typeof(Decimal)));
            T.Columns.Add(new DataColumn("maximal", typeof(Decimal)));
            T.Columns.Add(new DataColumn("rate", typeof(Decimal)));
            T.Columns.Add(new DataColumn("longdescription", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idabatement"], T.Columns["ayear"] };


            //////////////////// TAX /////////////////////////////////
            T             = new DataTable("tax");
            C             = new DataColumn("taxcode", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("taxkind", typeof(Int16)));
            T.Columns.Add(new DataColumn("fiscaltaxcode", typeof(String)));
            T.Columns.Add(new DataColumn("flagunabatable", typeof(String)));
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("active", typeof(String)));
            T.Columns.Add(new DataColumn("taxablecode", typeof(String)));
            T.Columns.Add(new DataColumn("geoappliance", typeof(String)));
            T.Columns.Add(new DataColumn("appliancebasis", typeof(String)));
            C             = new DataColumn("taxref", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("maintaxcode", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["taxcode"] };


            //////////////////// ABATEMENT /////////////////////////////////
            T             = new DataTable("abatement");
            C             = new DataColumn("idabatement", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("calculationkind", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("taxcode", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("evaluatesp", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("validitystart", typeof(DateTime)));
            T.Columns.Add(new DataColumn("validitystop", typeof(DateTime)));
            T.Columns.Add(new DataColumn("evaluationorder", typeof(Int32)));
            C             = new DataColumn("flagabatableexpense", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("!descrizione", typeof(String)));
            T.Columns.Add(new DataColumn("!franchigia", typeof(Decimal)));
            T.Columns.Add(new DataColumn("!massimale", typeof(Decimal)));
            T.Columns.Add(new DataColumn("!aliquota", typeof(Decimal)));
            T.Columns.Add(new DataColumn("appliance", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idabatement"] };


            //////////////////// ABATEMENTVIEW /////////////////////////////////
            T             = new DataTable("abatementview");
            C             = new DataColumn("idabatement", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("abatementcode", typeof(String)));
            C             = new DataColumn("calculationkind", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("taxcode", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("longdescription", typeof(String)));
            T.Columns.Add(new DataColumn("validitystart", typeof(DateTime)));
            T.Columns.Add(new DataColumn("validitystop", typeof(DateTime)));
            C             = new DataColumn("evaluatesp", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("evaluationorder", typeof(Int32)));
            T.Columns.Add(new DataColumn("abatementtitle", typeof(String)));
            T.Columns.Add(new DataColumn("exemption", typeof(Decimal)));
            T.Columns.Add(new DataColumn("maximal", typeof(Decimal)));
            T.Columns.Add(new DataColumn("rate", typeof(Decimal)));
            T.Columns.Add(new DataColumn("appliance", typeof(String)));
            T.Columns.Add(new DataColumn("flagabatableexpense", typeof(String)));
            T.Columns.Add(new DataColumn("taxref", typeof(String)));
            Tables.Add(T);

            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[1] {
                tax.Columns["taxcode"]
            };
            CChild = new DataColumn[1] {
                abatement.Columns["taxcode"]
            };
            Relations.Add(new DataRelation("taxabatement", CPar, CChild, false));

            CPar = new DataColumn[1] {
                abatement.Columns["idabatement"]
            };
            CChild = new DataColumn[1] {
                abatementcode.Columns["idabatement"]
            };
            Relations.Add(new DataRelation("abatementabatementcode", CPar, CChild, false));

            #endregion
        }
Exemple #17
0
 public void AddTable(LogTable table)
 {
     Tables.Add((LogTable)table.Clone());
 }
Exemple #18
0
        private void InitClass()
        {
            DataSetName        = "dsMov";
            Prefix             = "";
            Namespace          = "http://tempuri.org/dsMov.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("epexpview");
            C             = new DataColumn("idepexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("yepexp", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nepexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C          = new DataColumn("phase", typeof(System.String), "");
            C.ReadOnly = true;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available5", typeof(System.Decimal), ""));
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("account", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("upb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridepexp", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("parentyepexp", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("parentnepexp", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("start", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idrelated", typeof(System.String), ""));
            Tables.Add(T);
            T             = new DataTable("epexpsorting");
            C             = new DataColumn("idepexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("rownum", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("description", typeof(System.String), ""));
            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("kind", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("!sorting", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!sortcode", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idepexp"], T.Columns["rownum"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("epexpvarview");
            C             = new DataColumn("idepexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nvar", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("yvar", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C          = new DataColumn("phase", typeof(System.String), "");
            C.ReadOnly = true;
            T.Columns.Add(C);

            C             = new DataColumn("yepexp", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nepexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount5", typeof(System.Decimal), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("codeacc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("account", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("codeupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("upb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idtreasurer", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor01", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor02", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor03", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor04", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor05", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idepexp"], T.Columns["nvar"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["epexpview"];
            TChild = Tables["epexpsorting"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idepexp"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idepexp"]
            };
            Relations.Add(new DataRelation("epexpview_epexpsorting", CPar, CChild));
        }
        private Tables GetTables(XmlNodeList tableNodes)
        {
            if (tableNodes == null ||
                tableNodes.Count == 0) return null;

            Tables tables = new Tables(tableNodes.Count);
            foreach (XmlNode tableNode in tableNodes)
            {
                string id = tableNode.Attributes["Id"].InnerText;
                string displayName = tableNode["a:Name"].InnerText;
                string name = tableNode["a:Code"].InnerText;
                string comment = tableNode["a:Comment"] != null ? tableNode["a:Comment"].InnerText : string.Empty;

                Table table = new Table(id, displayName, name, comment);
                table.OriginalName = name;
                table.Columns = this.GetColumns(tableNode);
                table.Keys = this.GetKeys(tableNode, table.Columns);
                table.PrimaryKeys = this.GetPrimaryKeys(tableNode, table.Keys);
                tables.Add(id, table);
            }

            return tables;
        }
Exemple #20
0
        /// <summary>
        /// Retorna las tablas seleccionadas en el tree view.-
        /// </summary>
        /// <returns></returns>
        public  Tables GetSelectedTables()
        {
            if (_Tablas == null) return null;

            Tables wTablesSelected = new Tables();
            foreach (Table wTable in _Tablas)
            {
               if(wTable.Checked )
                wTablesSelected.Add (_Tablas[ _Tablas.IndexOf(wTable)]);
                
            }

            return wTablesSelected;
        }
Exemple #21
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("sorting");
            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("defaultN1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultv1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv5", typeof(System.Decimal), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("movkind", typeof(System.String), ""));
            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("printingorder", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("sortcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsor"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sortinglevel");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idsorkind"], T.Columns["nlevel"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sortingkind");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagdate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelfordate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv5", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("nodatelabel", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nphaseexpense", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("nphaseincome", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("totalexpression", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsorkind"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("admpay_incomesorted");
            C             = new DataColumn("yadmpay", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nadmpay", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nincome", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsubclass", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[5] {
                T.Columns["yadmpay"], T.Columns["nadmpay"], T.Columns["nincome"], T.Columns["idsor"], T.Columns["idsubclass"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["sorting"];
            TChild = Tables["admpay_incomesorted"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsor"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsor"]
            };
            Relations.Add(new DataRelation("sorting_admpay_incomesorted", CPar, CChild));

            TPar   = Tables["sortinglevel"];
            TChild = Tables["sorting"];
            CPar   = new DataColumn[2] {
                TPar.Columns["idsorkind"], TPar.Columns["nlevel"]
            };
            CChild = new DataColumn[2] {
                TChild.Columns["idsorkind"], TChild.Columns["nlevel"]
            };
            Relations.Add(new DataRelation("sortinglevel_sorting", CPar, CChild));

            TPar   = Tables["sortingkind"];
            TChild = Tables["sorting"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsorkind"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsorkind"]
            };
            Relations.Add(new DataRelation("sortingkind_sorting", CPar, CChild));
        }
Exemple #22
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("costpartitiondetail");
            C             = new DataColumn("idcostpartition", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("iddetail", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rate", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idsor1", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor2", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor3", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("!codesor1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!codesor2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!codesor3", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idcostpartition"], T.Columns["iddetail"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sorting1");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("sortcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("defaultN1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("movkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("printingorder", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultv1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv5", typeof(System.Decimal), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsor"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sorting2");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("sortcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("defaultN1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("movkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("printingorder", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultv1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv5", typeof(System.Decimal), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsor"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sorting3");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("sortcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("defaultN1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("movkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("printingorder", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultv1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv5", typeof(System.Decimal), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsor"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["sorting3"];
            TChild = Tables["costpartitiondetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsor"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsor3"]
            };
            Relations.Add(new DataRelation("sorting3_costpartitiondetail", CPar, CChild));

            TPar   = Tables["sorting2"];
            TChild = Tables["costpartitiondetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsor"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsor2"]
            };
            Relations.Add(new DataRelation("sorting2_costpartitiondetail", CPar, CChild));

            TPar   = Tables["sorting1"];
            TChild = Tables["costpartitiondetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsor"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsor1"]
            };
            Relations.Add(new DataRelation("sorting1_costpartitiondetail", CPar, CChild));
        }
Exemple #23
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("billtransaction");
            C             = new DataColumn("ybilltran", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nbilltran", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nbill", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("adate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("kind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idbankimport", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ybilltran"], T.Columns["nbilltran"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("bill");
            C             = new DataColumn("ybill", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nbill", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("billkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("covered", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("total", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("adate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("motive", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idtreasurer", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("regularizationnote", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("reduction", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("banknum", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idbank", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["ybill"], T.Columns["nbill"], T.Columns["billkind"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["bill"];
            TChild = Tables["billtransaction"];
            CPar   = new DataColumn[3] {
                TPar.Columns["ybill"], TPar.Columns["nbill"], TPar.Columns["billkind"]
            };
            CChild = new DataColumn[3] {
                TChild.Columns["ybilltran"], TChild.Columns["nbill"], TChild.Columns["kind"]
            };
            Relations.Add(new DataRelation("bill_billtransaction", CPar, CChild));
        }
Exemple #24
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("manager");
            C             = new DataColumn("idman", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("iddivision", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("email", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("phonenumber", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("userweb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("passwordweb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idman"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("asset");
            C             = new DataColumn("idasset", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nassetacquire", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("ninventory", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("lifestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idlocation", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idassetunloadkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("yassetunload", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nassetunload", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("!location", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!ninventory", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!manager", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!numeroriga", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!assetdescription", typeof(System.String), ""));
            C             = new DataColumn("idpiece", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("transmitted", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idasset"], T.Columns["idpiece"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("locationview");
            C             = new DataColumn("idlocation", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("locationcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("leveldescr", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridlocation", typeof(System.String), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
            T             = new DataTable("inventorytree");
            C             = new DataColumn("idinv", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeinv", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridinv", typeof(System.String), ""));
            C             = new DataColumn("nlevel", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idinv"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("assetacquire");
            C             = new DataColumn("nassetacquire", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("yman", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("rownum", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            C             = new DataColumn("idmot", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idinv", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idinventory", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idassetloadkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("yassetload", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nassetload", typeof(System.Int32), ""));
            C             = new DataColumn("number", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("taxable", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxrate", typeof(System.Double), ""));
            T.Columns.Add(new DataColumn("discount", typeof(System.Double), ""));
            C             = new DataColumn("startnumber", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flagload", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("loadkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("abatable", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("tax", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("transmitted", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["nassetacquire"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("assetview");
            C             = new DataColumn("idasset", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idpiece", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lifestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("nassetacquire", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("ninventory", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idlocation", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("locationcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("location", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            C             = new DataColumn("idinv", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeinv", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("inventorytree", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idinventory", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("inventory", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idassetloadkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("yassetload", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nassetload", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("taxable", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxrate", typeof(System.Double), ""));
            T.Columns.Add(new DataColumn("discount", typeof(System.Double), ""));
            T.Columns.Add(new DataColumn("total", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("currentvalue", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("idassetunloadkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("yassetunload", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nassetunload", typeof(System.Int32), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("cost", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("abatable", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("transmitted", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["idasset"], T.Columns["idpiece"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["inventorytree"];
            TChild = Tables["assetacquire"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idinv"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idinv"]
            };
            Relations.Add(new DataRelation("inventorytreeassetacquire", CPar, CChild));

            TPar   = Tables["assetview"];
            TChild = Tables["asset"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idasset"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idasset"]
            };
            Relations.Add(new DataRelation("assetviewasset", CPar, CChild));

            TPar   = Tables["assetacquire"];
            TChild = Tables["asset"];
            CPar   = new DataColumn[1] {
                TPar.Columns["nassetacquire"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["nassetacquire"]
            };
            Relations.Add(new DataRelation("assetacquireasset", CPar, CChild));

            TPar   = Tables["manager"];
            TChild = Tables["asset"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idman"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idman"]
            };
            Relations.Add(new DataRelation("managerasset", CPar, CChild));

            TPar   = Tables["locationview"];
            TChild = Tables["asset"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idlocation"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idlocation"]
            };
            Relations.Add(new DataRelation("locationviewasset", CPar, CChild));
        }
Exemple #25
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T = new DataTable("f24epdetail");
            T.Columns.Add(new DataColumn("idf24ep", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("fiscaltaxcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("identifying_marks", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("code", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("tiporiga", typeof(System.String), ""));
            C             = new DataColumn("ycon", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ncon", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("iddetail", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rifb_month", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("rifb_year", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("rifa_month", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("rifa_year", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("rifa", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!rifa_monthname", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!rifb_monthname", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["ycon"], T.Columns["ncon"], T.Columns["iddetail"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("monthname1");
            C             = new DataColumn("code", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("cfvalue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("title", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["code"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("monthname2");
            C             = new DataColumn("code", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("cfvalue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("title", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["code"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("lookup_tiporigaf24ep");
            C             = new DataColumn("tiporiga", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("description", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["tiporiga"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["monthname1"];
            TChild = Tables["f24epdetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["code"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["rifa_month"]
            };
            Relations.Add(new DataRelation("monthname_f24epdetail", CPar, CChild));

            TPar   = Tables["monthname2"];
            TChild = Tables["f24epdetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["code"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["rifb_month"]
            };
            Relations.Add(new DataRelation("monthname1_f24epdetail", CPar, CChild));

            TPar   = Tables["lookup_tiporigaf24ep"];
            TChild = Tables["f24epdetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["tiporiga"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["tiporiga"]
            };
            Relations.Add(new DataRelation("lookup_tiporigaf24ep_f24epdetail", CPar, CChild));
        }
Exemple #26
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("entry");
            C             = new DataColumn("nentry", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("yentry", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idrelated", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("official", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["nentry"], T.Columns["yentry"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("entrydetail");
            C             = new DataColumn("ndetail", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nentry", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("yentry", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("amount", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idacc", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor1", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor2", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor3", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idaccmotive", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("official", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["ndetail"], T.Columns["nentry"], T.Columns["yentry"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["entry"];
            TChild = Tables["entrydetail"];
            CPar   = new DataColumn[2] {
                TPar.Columns["nentry"], TPar.Columns["yentry"]
            };
            CChild = new DataColumn[2] {
                TChild.Columns["nentry"], TChild.Columns["yentry"]
            };
            Relations.Add(new DataRelation("entryentrydetail", CPar, CChild));
        }
Exemple #27
0
 public void Add(string type, string description, int?table)
 {
     DataTypes.Add(type);
     Descriptions.Add(description);
     Tables.Add(table);
 }
Exemple #28
0
        private void InitClass()
        {
            DataSetName        = "vistaContributiTipiContrattiCSA";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaContributiTipiContrattiCSA.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// CSA_CONTRACT /////////////////////////////////
            T             = new DataTable("csa_contract");
            C             = new DataColumn("idcsa_contract", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ycontract", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ncontract", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idcsa_contractkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("description", typeof(String)));
            C             = new DataColumn("title", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flagkeepalive", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_main", typeof(String)));
            T.Columns.Add(new DataColumn("idexp_main", typeof(Int32)));
            T.Columns.Add(new DataColumn("idfin_main", typeof(Int32)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagrecreate", typeof(String)));
            T.Columns.Add(new DataColumn("active", typeof(String)));
            T.Columns.Add(new DataColumn("idsor_siope_main", typeof(Int32)));
            T.Columns.Add(new DataColumn("idunderwriting", typeof(Int32)));
            T.Columns.Add(new DataColumn("idepexp_main", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contract"], T.Columns["ayear"] };


            //////////////////// CSA_CONTRACTKINDYEAR /////////////////////////////////
            T             = new DataTable("csa_contractkindyear");
            C             = new DataColumn("idcsa_contractkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("idacc_main", typeof(String)));
            T.Columns.Add(new DataColumn("idfin_main", typeof(Int32)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idsor_siope_main", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contractkind"], T.Columns["ayear"] };


            //////////////////// CSA_CONTRACTKIND /////////////////////////////////
            T             = new DataTable("csa_contractkind");
            C             = new DataColumn("idcsa_contractkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("contractkindcode", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flagcr", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagkeepalive", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("active", typeof(String)));
            T.Columns.Add(new DataColumn("idunderwriting", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contractkind"] };


            //////////////////// CSA_CONTRACTTAX /////////////////////////////////
            T             = new DataTable("csa_contracttax");
            C             = new DataColumn("idcsa_contract", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idcsa_contracttax", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("vocecsa", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("idexp", typeof(Int32)));
            T.Columns.Add(new DataColumn("idacc", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("idsor_siope", typeof(Int32)));
            T.Columns.Add(new DataColumn("idepexp", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contract"], T.Columns["idcsa_contracttax"], T.Columns["ayear"] };


            //////////////////// CSA_CONTRACTKINDRULES /////////////////////////////////
            T             = new DataTable("csa_contractkindrules");
            C             = new DataColumn("idcsa_contractkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idcsa_rule", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("capitoloCSA", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("ruoloCSA", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contractkind"], T.Columns["idcsa_rule"], T.Columns["ayear"] };


            //////////////////// CSA_CONTRACTKINDDATA /////////////////////////////////
            T             = new DataTable("csa_contractkinddata");
            C             = new DataColumn("idcsa_contractkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idcsa_contractkinddata", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("vocecsa", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idfin", typeof(Int32)));
            T.Columns.Add(new DataColumn("idacc", typeof(String)));
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idupb", typeof(String)));
            T.Columns.Add(new DataColumn("idsor_siope", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcsa_contractkind"], T.Columns["idcsa_contractkinddata"], T.Columns["ayear"] };


            //////////////////// SORTING /////////////////////////////////
            T             = new DataTable("sorting");
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("defaultN1", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultN2", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultN3", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultN4", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultN5", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultS1", typeof(String)));
            T.Columns.Add(new DataColumn("defaultS2", typeof(String)));
            T.Columns.Add(new DataColumn("defaultS3", typeof(String)));
            T.Columns.Add(new DataColumn("defaultS4", typeof(String)));
            T.Columns.Add(new DataColumn("defaultS5", typeof(String)));
            T.Columns.Add(new DataColumn("defaultv1", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultv2", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultv3", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultv4", typeof(Decimal)));
            T.Columns.Add(new DataColumn("defaultv5", typeof(Decimal)));
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagnodate", typeof(String)));
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("movkind", typeof(String)));
            T.Columns.Add(new DataColumn("printingorder", typeof(String)));
            T.Columns.Add(new DataColumn("rtf", typeof(Byte[])));
            C             = new DataColumn("sortcode", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("txt", typeof(String)));
            C             = new DataColumn("idsorkind", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idsor", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("paridsor", typeof(Int32)));
            C             = new DataColumn("nlevel", typeof(Byte));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("start", typeof(Int16)));
            T.Columns.Add(new DataColumn("stop", typeof(Int16)));
            T.Columns.Add(new DataColumn("email", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idsor"] };


            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[2] {
                csa_contract.Columns["idcsa_contract"], csa_contract.Columns["ayear"]
            };
            CChild = new DataColumn[2] {
                csa_contracttax.Columns["idcsa_contract"], csa_contracttax.Columns["ayear"]
            };
            Relations.Add(new DataRelation("csa_contract_csa_contracttax", CPar, CChild, false));

            CPar = new DataColumn[1] {
                csa_contractkind.Columns["idcsa_contractkind"]
            };
            CChild = new DataColumn[1] {
                csa_contractkindyear.Columns["idcsa_contractkind"]
            };
            Relations.Add(new DataRelation("csa_contractkind_csa_contractkindyear", CPar, CChild, false));

            CPar = new DataColumn[1] {
                csa_contractkind.Columns["idcsa_contractkind"]
            };
            CChild = new DataColumn[1] {
                csa_contract.Columns["idcsa_contractkind"]
            };
            Relations.Add(new DataRelation("csa_contractkind_csa_contract", CPar, CChild, false));

            CPar = new DataColumn[1] {
                csa_contractkind.Columns["idcsa_contractkind"]
            };
            CChild = new DataColumn[1] {
                csa_contractkinddata.Columns["idcsa_contractkind"]
            };
            Relations.Add(new DataRelation("csa_contractkind_csa_contractkinddata", CPar, CChild, false));

            CPar = new DataColumn[1] {
                csa_contractkinddata.Columns["idsor_siope"]
            };
            CChild = new DataColumn[1] {
                sorting.Columns["idsor"]
            };
            Relations.Add(new DataRelation("csa_contractkinddata_sorting", CPar, CChild, false));

            #endregion
        }
Exemple #29
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("expensetax");
            C             = new DataColumn("taxcode", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nbracket", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("taxablegross", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("exemptionquota", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("abatements", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxablenumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxabledenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employrate", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employnumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employdenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("adminrate", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("adminnumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("admindenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employtax", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("admintax", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("competencydate", typeof(System.DateTime), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("taxablenet", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("ayear", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("idinc", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfiscaltaxregion", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ytaxpay", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("ntaxpay", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["taxcode"], T.Columns["idexp"], T.Columns["nbracket"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("tax");
            C             = new DataColumn("taxcode", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("taxref", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("taxkind", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("fiscaltaxcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagunabatable", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("geoappliance", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["taxcode"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("fiscaltaxregion");
            C             = new DataColumn("idfiscaltaxregion", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("active", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idcountry", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idregion", typeof(System.Int32), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idfiscaltaxregion"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("geo_cityview");
            C             = new DataColumn("idcity", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("title", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("oldcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("start", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.DateTime), ""));
            C             = new DataColumn("idcountry", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("provincecode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("country", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("oldcountry", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newcountry", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("countrydatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("countrydatestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idregion", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("region", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("regiondatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("regiondatestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("oldregion", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newregion", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idcontinent", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("nation", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nationdatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("nationdatestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("oldnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newnation", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idcity"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expensetaxview");
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("taxcode", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nbracket", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("taxkind", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("taxablegross", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxablenet", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxableoriginal", typeof(System.Decimal), ""));
            C             = new DataColumn("taxref", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("exemptionquota", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("abatements", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxablenumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("taxabledenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employrate", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employnumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employdenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("employtax", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("adminrate", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("adminnumerator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("admindenominator", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("admintax", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("competencydate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("datetaxpay", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("ytaxpay", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("ntaxpay", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idaccmotive_debit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccmotive_pay", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("city", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("provincecode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idfiscaltaxregion", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("fiscaltaxregion", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idinc", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("yincmov", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nincmov", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("ayear", typeof(System.Int32), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
            T             = new DataTable("incomeview");
            C             = new DataColumn("idinc", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("phase", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ymov", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nmov", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("parentymov", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("parentnmov", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("parentidinc", typeof(System.Int32), ""));
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("codefin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("finance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("codeupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("upb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("kpro", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("ypro", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("npro", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("ayearstartamount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("unpartitioned", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("flag", typeof(System.Byte), ""));
            C             = new DataColumn("totflag", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagarrear", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("autokind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("autocode", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("expiration", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("nbill", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpro", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("nproceedstransmission", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("transmissiondate", typeof(System.DateTime), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idinc"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["tax"];
            TChild = Tables["expensetax"];
            CPar   = new DataColumn[1] {
                TPar.Columns["taxcode"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["taxcode"]
            };
            Relations.Add(new DataRelation("taxexpensetax", CPar, CChild));

            TPar   = Tables["fiscaltaxregion"];
            TChild = Tables["expensetax"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idfiscaltaxregion"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idfiscaltaxregion"]
            };
            Relations.Add(new DataRelation("fiscaltaxregionexpensetax", CPar, CChild));

            TPar   = Tables["geo_cityview"];
            TChild = Tables["expensetax"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idcity"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idcity"]
            };
            Relations.Add(new DataRelation("geo_cityviewexpensetax", CPar, CChild));

            TPar   = Tables["incomeview"];
            TChild = Tables["expensetax"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idinc"]
            };
            Relations.Add(new DataRelation("incomeviewexpensetax", CPar, CChild));
        }
Exemple #30
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// BANKDISPOSITIONSETUP /////////////////////////////////
            T             = new DataTable("bankdispositionsetup");
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("kpaymenttransmission", typeof(Int32)));
            T.Columns.Add(new DataColumn("kproceedstransmission", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"] };


            //////////////////// PAYMENTTRANSMISSION /////////////////////////////////
            T             = new DataTable("paymenttransmission");
            C             = new DataColumn("npaymenttransmission", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ypaymenttransmission", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("transmissiondate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            T.Columns.Add(new DataColumn("idtreasurer", typeof(Int32)));
            C             = new DataColumn("kpaymenttransmission", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagmailsent", typeof(String)));
            T.Columns.Add(new DataColumn("transmissionkind", typeof(String)));
            T.Columns.Add(new DataColumn("streamdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("flagtransmissionenabled", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["kpaymenttransmission"] };


            //////////////////// PROCEEDSTRANSMISSION /////////////////////////////////
            T             = new DataTable("proceedstransmission");
            C             = new DataColumn("nproceedstransmission", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("yproceedstransmission", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ct", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("cu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lt", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("lu", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("transmissiondate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("idman", typeof(Int32)));
            T.Columns.Add(new DataColumn("idtreasurer", typeof(Int32)));
            C             = new DataColumn("kproceedstransmission", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("transmissionkind", typeof(String)));
            T.Columns.Add(new DataColumn("streamdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("flagtransmissionenabled", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["kproceedstransmission"] };


            //////////////////// XMLDOCS /////////////////////////////////
            T             = new DataTable("xmldocs");
            C             = new DataColumn("pk", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("xCol", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["pk"] };


            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[1] {
                proceedstransmission.Columns["kproceedstransmission"]
            };
            CChild = new DataColumn[1] {
                bankdispositionsetup.Columns["kproceedstransmission"]
            };
            Relations.Add(new DataRelation("proceedstransmission_bankdispositionsetup", CPar, CChild, false));

            CPar = new DataColumn[1] {
                paymenttransmission.Columns["kpaymenttransmission"]
            };
            CChild = new DataColumn[1] {
                bankdispositionsetup.Columns["kpaymenttransmission"]
            };
            Relations.Add(new DataRelation("paymenttransmission_bankdispositionsetup", CPar, CChild, false));

            #endregion
        }
Exemple #31
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T = new DataTable("sortingincomefilterview");
            T.Columns.Add(new DataColumn("codefin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("finance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("codeupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("upb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("regsortingkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("registrysortcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("registrykind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            C             = new DataColumn("sortingkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("sortingcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("sorting", typeof(System.String), ""));
            C             = new DataColumn("ayear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idautosort", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idsorkind", typeof(System.Int32), ""));
            C             = new DataColumn("codesorkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idsorkindreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("codesorkindreg", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            C             = new DataColumn("jointolessspecifics", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idsorreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ayear"], T.Columns["idautosort"]
            };
            T.PrimaryKey = key;

            T = new DataTable("sortingkind");
            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagdate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelfordate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv5", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("nodatelabel", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("totalexpression", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nphaseexpense", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("nphaseincome", typeof(System.Byte), ""));
            C             = new DataColumn("codesorkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flag", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("start", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("idparentkind", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsorkind"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("upb");
            C             = new DataColumn("idupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("assured", typeof(System.String), ""));
            C             = new DataColumn("codeupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("expiration", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("granted", typeof(System.Decimal), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("previousappropriation", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("previousassessment", typeof(System.Decimal), ""));
            C             = new DataColumn("printingorder", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("requested", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idunderwriter", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("cupcode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idsor01", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor02", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor03", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor04", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsor05", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idupb"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sorting");
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("defaultN1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultN5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("defaultv1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("defaultv5", typeof(System.Decimal), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("movkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("printingorder", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("sortcode", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            C             = new DataColumn("nlevel", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("start", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.Int16), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsor"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sortingincomefilter");
            C             = new DataColumn("ayear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idautosort", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            C             = new DataColumn("jointolessspecifics", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idsorreg", typeof(System.Int32), ""));
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idsorkindreg", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ayear"], T.Columns["idautosort"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["sorting"];
            TChild = Tables["sortingincomefilter"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsor"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsor"]
            };
            Relations.Add(new DataRelation("FK_sorting_sortingincomefilter", CPar, CChild));

            TPar   = Tables["upb"];
            TChild = Tables["sortingincomefilter"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idupb"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idupb"]
            };
            Relations.Add(new DataRelation("FK_upb_sortingincomefilter", CPar, CChild));

            TPar   = Tables["sortingkind"];
            TChild = Tables["sortingincomefilter"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsorkind"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsorkind"]
            };
            Relations.Add(new DataRelation("FK_sortingkind_sortingincomefilter", CPar, CChild));

            TPar   = Tables["sortingkind"];
            TChild = Tables["sorting"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idsorkind"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idsorkind"]
            };
            Relations.Add(new DataRelation("FK_sortingkind_sorting", CPar, CChild));
        }
Exemple #32
0
        private void InitClass()
        {
            DataSetName        = "dsContratto";
            Prefix             = "";
            Namespace          = "http://tempuri.org/dsContratto.xsd";
            EnforceConstraints = false;

            #region create DataTables
            DataTable  T;
            DataColumn C;
            //////////////////// PARASUBCONTRACT /////////////////////////////////
            T             = new DataTable("parasubcontract");
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ycon", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ncon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idreg", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("duty", typeof(String)));
            T.Columns.Add(new DataColumn("idpayrollkind", typeof(String)));
            C             = new DataColumn("idser", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("employed", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("payrollccinfo", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("start", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("stop", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("monthlen", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("grossamount", typeof(Decimal));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpat", typeof(Int32)));
            T.Columns.Add(new DataColumn("matricula", typeof(Int32)));
            T.Columns.Add(new DataColumn("idmatriculabook", typeof(String)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("!denominazione", typeof(String)));
            T.Columns.Add(new DataColumn("!causa", typeof(String)));
            T.Columns.Add(new DataColumn("requested_doc", typeof(Int32)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcon"] };


            //////////////////// PARASUBCONTRACTYEAR /////////////////////////////////
            T             = new DataTable("parasubcontractyear");
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("regionaltax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("countrytax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("citytax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("ratequantity", typeof(Int32)));
            T.Columns.Add(new DataColumn("startmonth", typeof(Int32)));
            T.Columns.Add(new DataColumn("suspendedregionaltax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("suspendedcitytax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("suspendedcountrytax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("idotherinsurance", typeof(String)));
            T.Columns.Add(new DataColumn("activitycode", typeof(String)));
            T.Columns.Add(new DataColumn("idemenscontractkind", typeof(String)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("notaxappliance", typeof(String)));
            T.Columns.Add(new DataColumn("applybrackets", typeof(String)));
            T.Columns.Add(new DataColumn("highertax", typeof(Decimal)));
            T.Columns.Add(new DataColumn("taxablecud", typeof(Decimal)));
            T.Columns.Add(new DataColumn("cuddays", typeof(Int16)));
            T.Columns.Add(new DataColumn("taxablecontract", typeof(Decimal)));
            T.Columns.Add(new DataColumn("ndays", typeof(Int32)));
            T.Columns.Add(new DataColumn("taxablepension", typeof(Decimal)));
            T.Columns.Add(new DataColumn("fiscaldeduction", typeof(Decimal)));
            T.Columns.Add(new DataColumn("notaxdeduction", typeof(Decimal)));
            T.Columns.Add(new DataColumn("taxablegross", typeof(Decimal)));
            T.Columns.Add(new DataColumn("taxablenet", typeof(Decimal)));
            T.Columns.Add(new DataColumn("startcompetency", typeof(DateTime)));
            T.Columns.Add(new DataColumn("stopcompetency", typeof(DateTime)));
            T.Columns.Add(new DataColumn("idresidence", typeof(Int32)));
            T.Columns.Add(new DataColumn("flagbonusappliance", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"], T.Columns["idcon"] };


            //////////////////// PARASUBCONTRACTFAMILY /////////////////////////////////
            T             = new DataTable("parasubcontractfamily");
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idfamily", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idaffinity", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("surname", typeof(String)));
            T.Columns.Add(new DataColumn("forename", typeof(String)));
            T.Columns.Add(new DataColumn("idcitybirth", typeof(Int32)));
            T.Columns.Add(new DataColumn("idnation", typeof(Int32)));
            T.Columns.Add(new DataColumn("birthdate", typeof(DateTime)));
            T.Columns.Add(new DataColumn("gender", typeof(String)));
            T.Columns.Add(new DataColumn("flagforeign", typeof(String)));
            T.Columns.Add(new DataColumn("cf", typeof(String)));
            T.Columns.Add(new DataColumn("startapplication", typeof(DateTime)));
            T.Columns.Add(new DataColumn("stopapplication", typeof(DateTime)));
            T.Columns.Add(new DataColumn("appliancepercentage", typeof(Decimal)));
            T.Columns.Add(new DataColumn("starthandicap", typeof(DateTime)));
            C             = new DataColumn("foreignresident", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flagdependent", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcon"], T.Columns["idfamily"], T.Columns["ayear"] };


            //////////////////// CONTRATTONONTRASFERIBILE /////////////////////////////////
            T             = new DataTable("contrattonontrasferibile");
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("!causa", typeof(String)));
            C             = new DataColumn("ycon", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ncon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idreg", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("duty", typeof(String)));
            T.Columns.Add(new DataColumn("idpayrollkind", typeof(String)));
            C             = new DataColumn("idser", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("employed", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("payrollccinfo", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("start", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("stop", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("monthlen", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("grossamount", typeof(Decimal));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idpat", typeof(Int32)));
            T.Columns.Add(new DataColumn("matricula", typeof(Int32)));
            T.Columns.Add(new DataColumn("idmatriculabook", typeof(String)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("!denominazione", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idcon"] };


            //////////////////// OTHERINSURANCE /////////////////////////////////
            T             = new DataTable("otherinsurance");
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("idotherinsurance", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("description", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"], T.Columns["idotherinsurance"] };


            //////////////////// INPSACTIVITY /////////////////////////////////
            T             = new DataTable("inpsactivity");
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("activitycode", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("description", typeof(String)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"], T.Columns["activitycode"] };


            //////////////////// EMENSCONTRACTKIND /////////////////////////////////
            T             = new DataTable("emenscontractkind");
            C             = new DataColumn("idemenscontractkind", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("ayear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("description", typeof(String)));
            T.Columns.Add(new DataColumn("annotations", typeof(String)));
            T.Columns.Add(new DataColumn("flagactivityrequested", typeof(String)));
            T.Columns.Add(new DataColumn("module", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["ayear"], T.Columns["idemenscontractkind"] };


            //////////////////// PAYROLL /////////////////////////////////
            T             = new DataTable("payroll");
            C             = new DataColumn("idpayroll", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("fiscalyear", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("enabletaxrelief", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("currentrounding", typeof(Decimal));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("feegross", typeof(Decimal));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("netfee", typeof(Decimal)));
            T.Columns.Add(new DataColumn("ct", typeof(DateTime)));
            T.Columns.Add(new DataColumn("cu", typeof(String)));
            T.Columns.Add(new DataColumn("disbursementdate", typeof(DateTime)));
            C             = new DataColumn("stop", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("start", typeof(DateTime));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            C             = new DataColumn("flagcomputed", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagbalance", typeof(String)));
            C             = new DataColumn("workingdays", typeof(Int16));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("idresidence", typeof(Int32)));
            C             = new DataColumn("idcon", typeof(String));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("lt", typeof(DateTime)));
            T.Columns.Add(new DataColumn("lu", typeof(String)));
            C             = new DataColumn("npayroll", typeof(Int32));
            C.AllowDBNull = false;
            T.Columns.Add(C);
            T.Columns.Add(new DataColumn("flagsummarybalance", typeof(String)));
            Tables.Add(T);
            T.PrimaryKey = new DataColumn[] { T.Columns["idpayroll"] };


            #endregion


            #region DataRelation creation
            DataColumn [] CPar;
            DataColumn [] CChild;
            CPar = new DataColumn[1] {
                parasubcontract.Columns["idcon"]
            };
            CChild = new DataColumn[1] {
                payroll.Columns["idcon"]
            };
            Relations.Add(new DataRelation("parasubcontractpayroll", CPar, CChild, false));

            CPar = new DataColumn[1] {
                parasubcontract.Columns["idcon"]
            };
            CChild = new DataColumn[1] {
                parasubcontractfamily.Columns["idcon"]
            };
            Relations.Add(new DataRelation("parasubcontractparasubcontractfamily", CPar, CChild, false));

            CPar = new DataColumn[1] {
                parasubcontract.Columns["idcon"]
            };
            CChild = new DataColumn[1] {
                parasubcontractyear.Columns["idcon"]
            };
            Relations.Add(new DataRelation("parasubcontractparasubcontractyear", CPar, CChild, false));

            CPar = new DataColumn[2] {
                otherinsurance.Columns["ayear"], otherinsurance.Columns["idotherinsurance"]
            };
            CChild = new DataColumn[2] {
                parasubcontractyear.Columns["ayear"], parasubcontractyear.Columns["idotherinsurance"]
            };
            Relations.Add(new DataRelation("otherinsuranceparasubcontractyear", CPar, CChild, false));

            CPar = new DataColumn[2] {
                inpsactivity.Columns["ayear"], inpsactivity.Columns["activitycode"]
            };
            CChild = new DataColumn[2] {
                parasubcontractyear.Columns["ayear"], parasubcontractyear.Columns["activitycode"]
            };
            Relations.Add(new DataRelation("inpsactivityparasubcontractyear", CPar, CChild, false));

            CPar = new DataColumn[2] {
                emenscontractkind.Columns["ayear"], emenscontractkind.Columns["idemenscontractkind"]
            };
            CChild = new DataColumn[2] {
                parasubcontractyear.Columns["ayear"], parasubcontractyear.Columns["idemenscontractkind"]
            };
            Relations.Add(new DataRelation("emenscontractkindparasubcontractyear", CPar, CChild, false));

            #endregion
        }
Exemple #33
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("fin");
            C             = new DataColumn("idfin", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codefin", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idfin"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("finvar");
            C             = new DataColumn("yvar", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nvar", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("enactment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("variationkind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("nenactment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("enactmentdate", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagprevision", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagcredit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagproceeds", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagsecondaryprev", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["yvar"], T.Columns["nvar"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("finvardetail");
            C             = new DataColumn("yvar", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nvar", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idfin", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("description", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idunderwriting", typeof(System.Int32), ""));
            C             = new DataColumn("rownum", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["yvar"], T.Columns["nvar"], T.Columns["rownum"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("upb");
            C             = new DataColumn("idupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("codeupb", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("title", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idupb"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expensesorted");
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsor", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idsubclass", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("ayear", typeof(System.Int16), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("description", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagnodate", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("paridsor", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("paridsubclass", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            T.Columns.Add(new DataColumn("start", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("tobecontinued", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("valuen1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuen2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuen3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuen4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuen5", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("values1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("values2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("values3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("values4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("values5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("valuev1", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuev2", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuev3", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuev4", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("valuev5", typeof(System.Decimal), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["idexp"], T.Columns["idsor"], T.Columns["idsubclass"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("sortingkind");
            C             = new DataColumn("idsorkind", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("active", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagdate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forcedv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelfordate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labeln5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labels5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("labelv5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedN5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedS5", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv1", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv2", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv3", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv4", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lockedv5", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("nodatelabel", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nphaseexpense", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("nphaseincome", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("totalexpression", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idsorkind"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expensephase");
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["nphase"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expensevar");
            C             = new DataColumn("nvar", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            T.Columns.Add(new DataColumn("transferkind", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            C             = new DataColumn("yvar", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idinvkind", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("movkind", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("ninv", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("yinv", typeof(System.Int16), ""));
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idpayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("autokind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("autocode", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idunderwriting", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["nvar"], T.Columns["idexp"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expenseyear");
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ayear"], T.Columns["idexp"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expensetotal");
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("available", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount", typeof(System.Decimal), ""));
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flag", typeof(System.Byte), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["ayear"], T.Columns["idexp"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expense");
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("expiration", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nmov", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("rtf", typeof(System.Byte[]), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            C             = new DataColumn("ymov", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idclawback", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            C             = new DataColumn("nphase", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("parentidexp", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idformerexpense", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("autokind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("autocode", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idexp"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("config");
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("agencycode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("appname", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("appropriationphasecode", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("assessmentphasecode", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("asset_flagnumbering", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("asset_flagrestart", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("assetload_flag", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("boxpartitiontitle", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cashvaliditykind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("casualcontract_flagrestart", typeof(System.String), ""));
            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("currpartitiontitle", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("deferredexpensephase", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("deferredincomephase", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("electronicimport", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("electronictrasmission", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("expense_expiringdays", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("expensephase", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("flagautopayment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagautoproceeds", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagcredit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagepexp", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagfruitful", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagpayment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagproceeds", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("flagrefund", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("foreignhours", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idacc_accruedcost", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_accruedrevenue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_customer", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferredcost", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferredcredit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferreddebit", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_deferredrevenue", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_ivapayment", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_ivarefund", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_patrimony", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_pl", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idacc_supplier", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccmotive_admincar", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccmotive_foot", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idaccmotive_owncar", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idclawback", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfinexpense", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfinexpensesurplus", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfinincomesurplus", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfinivapayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idfinivarefund", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idivapayperiodicity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idregauto", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsortingkind1", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsortingkind2", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idsortingkind3", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("importappname", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("income_expiringdays", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("incomephase", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("linktoinvoice", typeof(System.String), ""));
            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("minpayment", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("minrefund", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("motivelen", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("motiveprefix", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("motiveseparator", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("payment_finlevel", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("payment_flag", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("payment_flagautoprintdate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("paymentagency", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("prevpartitiontitle", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("proceeds_finlevel", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("proceeds_flag", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("proceeds_flagautoprintdate", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("profservice_flagrestart", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("refundagency", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("wageaddition_flagrestart", typeof(System.String), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["ayear"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("expenseview");
            C             = new DataColumn("idexp", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("phase", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ymov", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nmov", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("parentidexp", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("parentymov", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("parentnmov", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idformerexpense", typeof(System.Int32), ""));
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("codefin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("finance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("codeupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("upb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            C          = new DataColumn("ypay", typeof(System.Int16), "");
            C.ReadOnly = true;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("npay", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("paymentadate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("ayearstartamount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("idregistrypaymethod", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpaymethod", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("cin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idbank", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idcab", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("iddeputy", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("deputy", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("refexternaldoc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("paymentdescr", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idser", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("service", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("servicestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("servicestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("ivaamount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("flag", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("totflag", typeof(System.Byte), ""));
            C          = new DataColumn("flagarrear", typeof(System.String), "");
            C.ReadOnly = true;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("autokind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("idpayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("expiration", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("autocode", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idclawback", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("clawback", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nbill", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpay", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("txt", typeof(System.String), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("!realavailable", typeof(System.Decimal), ""));
            Tables.Add(T);

//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["expensephase"];
            TChild = Tables["expense"];
            CPar   = new DataColumn[1] {
                TPar.Columns["nphase"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["nphase"]
            };
            Relations.Add(new DataRelation("expensephase_expense", CPar, CChild));

            TPar   = Tables["expense"];
            TChild = Tables["expensetotal"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idexp"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idexp"]
            };
            Relations.Add(new DataRelation("expense_expensetotal", CPar, CChild));

            TPar   = Tables["fin"];
            TChild = Tables["expenseyear"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idfin"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idfin"]
            };
            Relations.Add(new DataRelation("fin_expenseyear", CPar, CChild));

            TPar   = Tables["upb"];
            TChild = Tables["expenseyear"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idupb"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idupb"]
            };
            Relations.Add(new DataRelation("upb_expenseyear", CPar, CChild));

            TPar   = Tables["expense"];
            TChild = Tables["expensevar"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idexp"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idexp"]
            };
            Relations.Add(new DataRelation("expense_expensevar", CPar, CChild));

            TPar   = Tables["expense"];
            TChild = Tables["expensesorted"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idexp"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idexp"]
            };
            Relations.Add(new DataRelation("expense_expensesorted", CPar, CChild));

            TPar   = Tables["fin"];
            TChild = Tables["finvardetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idfin"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idfin"]
            };
            Relations.Add(new DataRelation("fin_finvardetail", CPar, CChild));

            TPar   = Tables["finvar"];
            TChild = Tables["finvardetail"];
            CPar   = new DataColumn[2] {
                TPar.Columns["yvar"], TPar.Columns["nvar"]
            };
            CChild = new DataColumn[2] {
                TChild.Columns["yvar"], TChild.Columns["nvar"]
            };
            Relations.Add(new DataRelation("finvar_finvardetail", CPar, CChild));

            TPar   = Tables["upb"];
            TChild = Tables["finvardetail"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idupb"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idupb"]
            };
            Relations.Add(new DataRelation("upb_finvardetail", CPar, CChild));
        }
Exemple #34
0
			// SchemaReader.ReadSchema
			public Tables ReadSchema(DbConnection connection, DbProviderFactory factory)
			{
				var result = new Tables();
		
				_connection=connection;
				_factory=factory;

				var cmd = _factory.CreateCommand();
				cmd.Connection = connection;
				cmd.CommandText = ConstructTableSelectSql();

				//pull the tables in a reader
				using(cmd)
				{
					using (var rdr = cmd.ExecuteReader())
					{
						while(rdr.Read())
						{
							Table tbl=new Table();
							tbl.Name=rdr["TABLE_NAME"].ToString();
							tbl.Schema=rdr["TABLE_SCHEMA"].ToString();
							//tbl.IsView=string.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0;
							tbl.CleanName=CleanUp(tbl.Name);
							tbl.ClassName=Inflector.MakeSingular(tbl.CleanName);
							if (tbl.Name.EndsWith("Enum"))
							{
								tbl.EnumName = tbl.ClassName;
								tbl.IsEnum = true;
								tbl.ClassName += "Poco";
							}
							else
							{
								tbl.EnumName = null;
								tbl.IsEnum = false;
							}
							tbl.RepoName = tbl.ClassName + "Db";
							result.Add(tbl);
						}
					}
				}
		
				foreach (var tbl in result)
				{
					tbl.Columns = LoadColumns(tbl);

					// Mark the primary key(s)
					string[] pkNames = GetPK(tbl.Name);
					if (pkNames != null)
					{
						var pkCols = tbl.Columns.Where(a => pkNames.Contains(a.Name));
						foreach (var c in pkCols)
						{
							c.IsPK = true;
						}
						tbl.IsAutoIncrement = pkCols.Any(a => a.IsAutoIncrement);
					}
				}

				return result;
			}
        private Tables GetTables(string originalDbName,string connectionString)
        {
            Tables tables = new Tables(10);

            string sqlCmd = string.Format("SELECT TABLE_NAME, TABLE_COMMENT FROM TABLES WHERE TABLE_SCHEMA = '{0}'", originalDbName);
            MySqlDataReader dr = MySqlHelper.ExecuteReader(connectionString, sqlCmd);
            while (dr.Read())
            {
                string id = dr.GetString(0);
                string displayName = dr.GetString(0);
                string name = dr.GetString(0);
                string comment = dr.IsDBNull(1) ? string.Empty : dr.GetString(1);

                Table table = new Table(id, displayName, name, comment);
                table.OriginalName = name;
                table.Columns = this.GetColumns(displayName, originalDbName, connectionString);
                table.PrimaryKeys = this.GetPrimaryKeys(displayName, originalDbName, connectionString);
                tables.Add(id, table);
            }
            dr.Close();

            return tables;
        }
Exemple #36
0
        //--------------------------------------------------------------------------
        //
        // 功能:创建对象数据表
        //
        //  作者:
        //
        //  日期:200708
        //
        //   历史:
        //--------------------------------------------------------------------------
        public bool CreateTable(Tables tables, string tableName)
        {
            ErrorCode errODCode = ErrorCode.OK;
            Autodesk.Gis.Map.ObjectData.Table table = null;

            try
            {
                table = tables[tableName];
            }
            catch (MapException e)
            {
                errODCode = (ErrorCode)(e.ErrorCode);
            }

            if (ErrorCode.ErrorObjectNotFound == errODCode)
            {
                try
                {
                    MapApplication app = HostMapApplicationServices.Application;

                    //   定义一个表名称为"MyODTable" 包含下面四个字段定义:
                    //
                    //    字段名称        数值类型
                    //    FIRST_FIELD                字符串
                    //   SECOND_FIELD           整型
                    //   THIRD_FIELD                 浮点型
                    //    LAST_FIELD                  点
                    FieldDefinitions tabDefs = app.ActiveProject.MapUtility.NewODFieldDefinitions();

                    FieldDefinition def1 = FieldDefinition.Create("FIRST_FIELD", "String Type", "A");
                    tabDefs.AddColumn(def1, 0);

                    FieldDefinition def2 = FieldDefinition.Create("SECOND_FIELD", "Int Type", 0);
                    tabDefs.AddColumn(def2, 1);

                    FieldDefinition def3 = FieldDefinition.Create("THIRD_FIELD", "Real Type", 0.0);
                    tabDefs.AddColumn(def3, 2);

                    FieldDefinition def4 = FieldDefinition.Create("LAST_FIELD", "Point Type", new Point3d(0, 0, 0));
                    tabDefs.AddColumn(def4, 3);

                    tables.Add(tableName, tabDefs, "Desc", true);

                    return true;
                }
                catch (MapException e)
                {
                    AcadEditor.WriteMessage(e.Message);
                    return false;
                }
            }

            return false;
        }
		public static void BuildCurrentPocos()
		{
			var tbls = new Tables();

			var iobj = new MyApp.Models.IdentityObject();
			var asm = Assembly.GetAssembly(iobj.GetType());

			Type[] types = asm.GetTypes();

			foreach (Type t in types)
			{
				var tbl = new Table();
				tbl.Columns = new List<Column>();
				Attribute[] attrs = Attribute.GetCustomAttributes(t);

				foreach (Attribute atr in attrs)
				{
					if (atr is NPoco.PrimaryKeyAttribute)
					{
						var pka = (NPoco.PrimaryKeyAttribute)atr;
						tbl.PrimaryKeyNamesFromAttribute =pka.Value;
						tbl.IsAutoIncrement = tbl.IsAutoIncrement || pka.AutoIncrement;
					}

					if (atr is NPoco.TableNameAttribute)
					{
						var a = (NPoco.TableNameAttribute)atr;
						tbl.ClassName = t.Name;
						tbl.CleanName = a.Value;

						var props = t.GetProperties();

						foreach (var p in props)
						{
							var col = new Column();

							Attribute[] propAttributes = Attribute.GetCustomAttributes(p);
							foreach (Attribute patr in propAttributes)
							{
								if (patr is StringLengthAttribute)
								{
									col.StringLength = ((StringLengthAttribute)patr).MaximumLength;
								}

								if (patr is NPoco.ColumnAttribute)
								{
									var ca = patr as NPoco.ColumnAttribute;
									col.Name = String.IsNullOrEmpty(ca.Name) ? p.Name : ca.Name;
									col.PropertyName = p.Name;
									col.PropertyType = TypeMap.CommonSystemTypeFromFrameworkType(p.PropertyType.ToString());
									col.IsNullable = col.PropertyType.EndsWith("?");
									col.IsAutoIncrement = col.IsPK && tbl.IsAutoIncrement;
								}

								if (patr is EquivalentTypeForTestingAttribute)
								{
									var ca = patr as EquivalentTypeForTestingAttribute;
									col.PropertyType = ca.Name;
									col.IsNullable = col.PropertyType.EndsWith("?");
								}
							}

							if (!String.IsNullOrEmpty(col.PropertyName))
							{
								tbl.Columns.Add(col);
							}
						}
					}
				}

				if (!String.IsNullOrEmpty(tbl.ClassName))
				{
					// Assign Primary Key(s) if found
					if (!String.IsNullOrEmpty(tbl.PrimaryKeyNamesFromAttribute))
					{
						string[] pkNames = tbl.PrimaryKeyNamesFromAttribute.Split(',').Select(a => a.Trim()).ToArray();
						var cols = tbl.Columns.Where(a => pkNames.Contains(a.PropertyName));
						foreach (var col in cols)
						{
							col.IsPK = true;
							col.IsAutoIncrement = tbl.IsAutoIncrement;
						}
					}

					tbls.Add(tbl);
				}

			}

			currentPocos = tbls;
		}
 /// <inheritdoc/>
 public void AddChild(Base child)
 {
     Tables.Add(child as TableDataSource);
 }
Exemple #39
0
        private void InitClass()
        {
            DataSetName        = "vistaForm";
            Prefix             = "";
            Namespace          = "http://tempuri.org/vistaForm.xsd";
            EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("proceedsview");
            C             = new DataColumn("kpro", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ypro", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("npro", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("npro_treasurer", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("total", typeof(System.Decimal), ""));
            C             = new DataColumn("performed", typeof(System.Decimal), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idtreasurer", typeof(System.Int32), ""));
            C             = new DataColumn("kind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("accountkind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("codefin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("finance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("kproceedstransmission", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("yproceedstransmission", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("nproceedstransmission", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("transmissiondate", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("printdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("annulmentdate", typeof(System.DateTime), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["kpro"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("banktransaction");
            C             = new DataColumn("yban", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nban", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("kind", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("bankreference", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("transactiondate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("valuedate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("kpay", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("kpro", typeof(System.Int32), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idpay", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpro", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idexp", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idinc", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[2] {
                T.Columns["yban"], T.Columns["nban"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("incomeview");
            C             = new DataColumn("idinc", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nphase", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("phase", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("kpro", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("ypro", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("npro", typeof(System.Int32), ""));
            C             = new DataColumn("ymov", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("nmov", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("parentymov", typeof(System.Int16), ""));
            T.Columns.Add(new DataColumn("parentnmov", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("parentidinc", typeof(System.Int32), ""));
            C             = new DataColumn("ayear", typeof(System.Int16), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idfin", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("codefin", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("finance", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("codeupb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("upb", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("registry", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idman", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("manager", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("doc", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("docdate", typeof(System.DateTime), ""));
            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("ayearstartamount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("curramount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("available", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("unpartitioned", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("flag", typeof(System.Byte), ""));
            C             = new DataColumn("totflag", typeof(System.Byte), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("flagarrear", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("autokind", typeof(System.Byte), ""));
            T.Columns.Add(new DataColumn("autocode", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpayment", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("expiration", typeof(System.DateTime), ""));
            C             = new DataColumn("adate", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("nbill", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("idpro", typeof(System.Int32), ""));
            C             = new DataColumn("cu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ct", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lu", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("lt", typeof(System.DateTime), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
            T             = new DataTable("no_table");
            C             = new DataColumn("idnotable", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idnotable"]
            };
            T.PrimaryKey = key;


//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["incomeview"];
            TChild = Tables["banktransaction"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idinc"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idinc"]
            };
            Relations.Add(new DataRelation("incomeview_banktransaction", CPar, CChild));
        }
Exemple #40
0
        /// <summary>
        /// Analyze data schema before data processing
        /// </summary>
        public virtual void Analyze()
        {
            Table lookupTable;

            m_fromSchema.ImmediateClose = false;
            m_fromSchema.Analyze();

            m_toSchema.ImmediateClose = false;
            m_toSchema.Analyze();

            m_excludedTables.Sort();

            m_tableCollection = new Tables(m_fromSchema);

            // We preprocess which tables we are going to access for data operation...
            foreach (Table table in m_fromSchema.Tables)
            {
                // Bypass excluded tables
                if (m_excludedTables.BinarySearch(table.MapName) < 0)
                {
                    // Lookup table name in destination data source by map name
                    lookupTable = m_toSchema.Tables.FindByMapName(table.MapName);

                    if ((object)lookupTable != null)
                    {
                        // If user requested to use referential integrity of destination tables then
                        // we use process priority of those tables instead...
                        if (!m_useFromSchemaRI)
                            table.Priority = lookupTable.Priority;

                        table.Process = true;
                        m_tableCollection.Add(table);
                    }
                }
            }

        }
        /// <summary>
        /// Fills the <see cref="Tables"/> collection with all tables available in the database.
        /// </summary>
        /// <param name="initSchema">Set to <b>true</b> to initialize each table's schema.</param>
        public void CreateAllTables(bool initSchema)
        {
            List <string> tableNames = new List <string>();

            tableNames.AddRange(GetTableNames());

            // filter tables
            for (int i = 0; i < tableNames.Count; i++)
            {
                FilterConnectionTablesEventArgs e = new FilterConnectionTablesEventArgs(this, tableNames[i]);
                Config.DesignerSettings.OnFilterConnectionTables(this, e);
                if (e.Skip)
                {
                    tableNames.RemoveAt(i);
                    i--;
                }
            }

            // remove tables with tablename that does not exist in the connection.
            for (int i = 0; i < Tables.Count; i++)
            {
                TableDataSource table = Tables[i];
                bool            found = !String.IsNullOrEmpty(table.SelectCommand);
                // skip tables with non-empty selectcommand
                if (!found)
                {
                    foreach (string tableName in tableNames)
                    {
                        if (String.Compare(table.TableName, tableName, true) == 0)
                        {
                            found = true;
                            break;
                        }
                    }
                }
                // table name not found between actual tablenames. It may happen if we have edited the connection.
                if (!found)
                {
                    table.Dispose();
                    i--;
                }
            }

            // now create tables that are not created yet.
            foreach (string tableName in tableNames)
            {
                bool found = false;
                foreach (TableDataSource table in Tables)
                {
                    if (String.Compare(table.TableName, tableName, true) == 0)
                    {
                        found = true;
                        break;
                    }
                }
                if (!found)
                {
                    TableDataSource table          = new TableDataSource();
                    string          fixedTableName = tableName.Replace(".", "_").Replace("[", "").Replace("]", "").Replace("\"", "");
                    if (Report != null)
                    {
                        table.Name  = Report.Dictionary.CreateUniqueName(fixedTableName);
                        table.Alias = Report.Dictionary.CreateUniqueAlias(table.Alias);
                    }
                    else
                    {
                        table.Name = fixedTableName;
                    }

                    table.TableName  = tableName;
                    table.Connection = this;
                    table.Enabled    = false;

                    Tables.Add(table);
                }
            }

            // init table schema
            if (initSchema)
            {
                foreach (TableDataSource table in Tables)
                {
                    table.InitSchema();
                }
            }
        }
        private Tables GetTables(string connectionString)
        {
            Tables tables = new Tables(10);

            string sqlCmd = "select [name],[object_id] from sys.tables where type='U'";
            SqlDataReader dr = SqlHelper.ExecuteReader(connectionString, CommandType.Text, sqlCmd);
            while (dr.Read())
            {
                string id = dr.GetString(0);
                string displayName = dr.GetString(0);
                string name = dr.GetString(0);
                string comment = string.Empty;
                int objectId = dr.GetInt32(1);

                Table table = new Table(id, displayName, name, comment);
                table.OriginalName = name;
                table.Columns = this.GetColumns(objectId, connectionString);
                table.PrimaryKeys = this.GetPrimaryKeys(objectId, connectionString, table.Columns);
                tables.Add(id, table);
            }
            dr.Close();

            return tables;
        }
Exemple #43
0
        private void InitClass()
        {
            this.DataSetName        = "vistaForm";
            this.Prefix             = "";
            this.Namespace          = "http://tempuri.org/vistaForm.xsd";
            this.EnforceConstraints = false;
            DataTable  T;
            DataColumn C;

            DataColumn [] key;
            T             = new DataTable("parasubcontractfamily");
            C             = new DataColumn("idcon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idfamily", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("ayear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idaffinity", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("!descrparentela", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("surname", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forename", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idcitybirth", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("!comune", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!sigla", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("!nazione", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("birthdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("flagforeign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("gender", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cf", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("startapplication", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stopapplication", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("appliancepercentage", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("starthandicap", typeof(System.DateTime), ""));
            C             = new DataColumn("foreignresident", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flagdependent", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("childasparent", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[3] {
                T.Columns["idcon"], T.Columns["idfamily"], T.Columns["ayear"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("geo_cityview");
            C             = new DataColumn("idcity", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("title", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("oldcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newcity", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("start", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stop", typeof(System.DateTime), ""));
            C             = new DataColumn("idcountry", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("provincecode", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("country", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("oldcountry", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newcountry", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("countrydatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("countrydatestop", typeof(System.DateTime), ""));
            C             = new DataColumn("idregion", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("region", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("regiondatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("regiondatestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("oldregion", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newregion", typeof(System.Int32), ""));
            C             = new DataColumn("idnation", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idcontinent", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("nation", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("nationdatestart", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("nationdatestop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("oldnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("newnation", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idcity"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("affinity");
            C             = new DataColumn("idaffinity", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("description", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idaffinity"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("geo_nation");
            C             = new DataColumn("idnation", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("stop", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("start", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("title", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idcontinent", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("newnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("oldnation", typeof(System.Int32), ""));
            Tables.Add(T);
//Primary Key
            key = new DataColumn[1] {
                T.Columns["idnation"]
            };
            T.PrimaryKey = key;

            T             = new DataTable("parasubcontractfamilyview");
            C             = new DataColumn("idcon", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idreg", typeof(System.Int32), ""));
            C             = new DataColumn("ayear", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("idfamily", typeof(System.Int32), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("surname", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("forename", typeof(System.String), ""));
            C             = new DataColumn("idaffinity", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("affinity", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("idcitybirth", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("city", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("province", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("idnation", typeof(System.Int32), ""));
            T.Columns.Add(new DataColumn("nation", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("birthdate", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("flagforeign", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("gender", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("cf", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("startapplication", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("stopapplication", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("appliancepercentage", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("starthandicap", typeof(System.DateTime), ""));
            C             = new DataColumn("foreignresident", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            C             = new DataColumn("flagdependent", typeof(System.String), "");
            C.AllowDBNull = false;
            T.Columns.Add(C);

            T.Columns.Add(new DataColumn("amount", typeof(System.Decimal), ""));
            T.Columns.Add(new DataColumn("childasparent", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("lt", typeof(System.DateTime), ""));
            T.Columns.Add(new DataColumn("cu", typeof(System.String), ""));
            T.Columns.Add(new DataColumn("ct", typeof(System.DateTime), ""));
            Tables.Add(T);

//Relations
            DataTable TPar;
            DataTable TChild;

            DataColumn [] CPar;
            DataColumn [] CChild;
            TPar   = Tables["geo_nation"];
            TChild = Tables["parasubcontractfamily"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idnation"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idnation"]
            };
            Relations.Add(new DataRelation("geo_nationparasubcontractfamily", CPar, CChild));

            TPar   = Tables["affinity"];
            TChild = Tables["parasubcontractfamily"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idaffinity"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idaffinity"]
            };
            Relations.Add(new DataRelation("affinityparasubcontractfamily", CPar, CChild));

            TPar   = Tables["geo_cityview"];
            TChild = Tables["parasubcontractfamily"];
            CPar   = new DataColumn[1] {
                TPar.Columns["idcity"]
            };
            CChild = new DataColumn[1] {
                TChild.Columns["idcitybirth"]
            };
            Relations.Add(new DataRelation("geo_cityviewparasubcontractfamily", CPar, CChild));
        }