Пример #1
0
        public void SetFieldDataTypes(SQLBuilder sqlb)
        {
            XSDAdapter xsda = new XSDAdapter(PhysicalAppPath);

            SetFilterFieldDataTypes(sqlb, xsda);

            SetDataFieldDataTypes(sqlb, xsda);
        }
Пример #2
0
        //SMELL : return void met "Get..."
        public void GetFieldDataTypes(SQLBuilder sqlb)
        {
            XSDAdapter xsda = new XSDAdapter(_physappath);

            SetFilterFieldDataTypes(sqlb, xsda);

            SetDataFieldDataTypes(sqlb, xsda);
        }
Пример #3
0
        /// <summary>
        /// Sets the datatype on the Filter- en DataFields of the SQLBuilder
        /// </summary>
        /// <param name="sqlb">SQLBuilder</param>
        public void SetFieldDataTypes(SQLBuilder sqlb)
        {
            XSDAdapter xsda = xsdAdapterFactory.Create(PhysicalAppPath);

            SetFilterFieldDataTypes(sqlb, xsda);

            SetDataFieldDataTypes(sqlb, xsda);
        }
Пример #4
0
        private static void SetDataFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            if (MustSetDataFieldDataTypes(sqlb))
            {
                string[] datatypes = GetDataFieldDataTypes(sqlb, xsda);

                SetFieldDataType(sqlb, datatypes, typeof(DataField));
            }
        }
Пример #5
0
        private void SetFilterFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            if (sqlb.FilterFields.Count > 0)
            {
                string[] datatypes = GetFilterFieldDataTypes(sqlb, xsda);

                SetFieldDataType(sqlb, datatypes, typeof(FilterField));
            }
        }
Пример #6
0
        public void SetFieldDataTypes(SQLBuilder sqlb)
        {
            //DEFECT : DI-violation - gebruik IXSDAAdapterFactory
            XSDAdapter xsda = new XSDAdapter(PhysicalAppPath);

            SetFilterFieldDataTypes(sqlb, xsda);

            SetDataFieldDataTypes(sqlb, xsda);
        }
Пример #7
0
        private void SetFilterFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            if (sqlb.FilterFields.Count > 0)
            {
                string[] fields = GetFilterFieldNames(sqlb);

                string[] datatypes = xsda.GetDataTypes(_xsdn, fields);

                SetFilterFieldsDataType(sqlb, datatypes);
            }
        }
        private void SetDataFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            //only get datafield types when not sql select or sql delete
            if (sqlb.SQLtype != snpSQLtype.sqlSelect && sqlb.SQLtype != snpSQLtype.sqlDelete)
            {
                string[] fields = GetDataFieldNames(sqlb);

                string[] datatypes = xsda.GetDataTypes(_xsdn, fields);

                SetDataFieldsDataType(sqlb, datatypes);
            }
        }
Пример #9
0
        private void SetFilterFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            if (sqlb.FilterFields.Count > 0)
            {
                //SMELL : "fields" en "datatypes"
                //kunnen samengebracht worden in 1 nieuwe functie :
                //GetFilterFieldDatatypes
                //dat onmiddellijk string[] datatypes teruggeeft
                string[] fields = GetFilterFieldNames(sqlb);

                string[] datatypes = xsda.GetDataTypes(XsdName, fields);
                //end SMELL

                SetFilterFieldsDataType(sqlb, datatypes);
            }
        }
Пример #10
0
        private void SetDataFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            //SMELL : functie met duidelijk naam ipv. comment

            //SMELL : level of abstraction

            //only get datafield types when not sql select or sql delete
            if (sqlb.SQLtype != snpSQLtype.sqlSelect && sqlb.SQLtype != snpSQLtype.sqlDelete)
            {
                //SMELL : "fields" en "datatypes"
                //kunnen samengebracht worden in 1 nieuwe functie :
                //GetFilterFieldDatatypes
                //dat onmiddellijk string[] datatypes teruggeeft
                string[] fields = GetDataFieldNames(sqlb);

                string[] datatypes = xsda.GetDataTypes(XsdName, fields);
                //end SMELL

                SetDataFieldsDataType(sqlb, datatypes);
            }
        }
Пример #11
0
        private static string[] GetDataFieldDataTypes(SQLBuilder sqlb, XSDAdapter xsda)
        {
            string[] fields = GetDataFieldNames(sqlb);

            return(xsda.GetDataTypes(XsdName, fields));
        }
Пример #12
0
        public void GetFieldDataTypes(SQLBuilder sqlb)
        {
            XSDAdapter xsda = new XSDAdapter(_physappath);

            ArrayList al_fields = new ArrayList();

            //getting datatypes for filterfields

            if (sqlb.FilterFields.Count > 0)
            {
                if (sqlb.DDLDataFilterField > 0)
                {
                    DataField dfield = sqlb.DataFields.Item(sqlb.DDLDataFilterField - 1);

                    al_fields.Add(dfield.Name);
                }
                else
                {
                    foreach (FilterField ffield in sqlb.FilterFields)
                    {
                        al_fields.Add(ffield.Name);
                    }
                }

                string[] fields = (string[])al_fields.ToArray(typeof(string));

                string[] datatypes = xsda.GetDataTypes(_xsdn, fields);

                int u = datatypes.GetUpperBound(0);

                for (int i = 0; i <= u; i++)
                {
                    FilterField ffield = sqlb.FilterFields.Item(i);
                    ffield.DataType = datatypes[i];
                }
            }


            //only get datafield types when not sql select or sql delete
            if (sqlb.SQLtype != snpSQLtype.sqlSelect && sqlb.SQLtype != snpSQLtype.sqlDelete)
            {
                al_fields = new ArrayList();

                foreach (DataField dfield in sqlb.DataFields)
                {
                    al_fields.Add(dfield.Name);
                }

                string[] fields = (string[])al_fields.ToArray(typeof(string));

                string[] datatypes = xsda.GetDataTypes(_xsdn, fields);

                int u = datatypes.GetUpperBound(0);

                for (int i = 0; i <= u; i++)
                {
                    DataField dfield = sqlb.DataFields.Item(i);
                    dfield.DataType = datatypes[i];
                }
            }
        }