Example #1
0
        private static List <MasterTablePath> EntityList(string q)
        {
            List <MasterTablePath> list = new List <MasterTablePath>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    MasterTablePath obj = new MasterTablePath()
                    {
                        Masterpath_id   = redr[MASTERPATH.MASTERPATH_ID].ToString(),
                        Mastertables_id = redr[MASTERTABLES.MASTERTABLES_NAME].ToString(),
                        Root_folder     = redr[MASTERPATH.ROOT_FOLDER].ToString(),
                        Contfolder      = redr[MASTERPATH.CONTFOLDER].ToString(),
                        Classfolder     = redr[MASTERPATH.CLASSFOLDER].ToString(),
                        Formfolder      = redr[MASTERPATH.FORMFOLDER].ToString(),
                        Listfolder      = redr[MASTERPATH.LISTFOLDER].ToString(),
                        Setupfolder     = redr[MASTERPATH.SETUPFOLDER].ToString(),
                        Testfolder      = redr[MASTERPATH.TESTFOLDER].ToString(),
                        Active_id       = redr[MASTERPATH.ACTIVE_ID].ToString(),
                    };

                    list.Add(obj);
                }

                redr.Close();
            }
            return(list);
        }
Example #2
0
        private static List <Stables> EntityList(string q)
        {
            List <Stables> list = new List <Stables>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    Stables obj = new Stables()
                    {
                        Stables_id    = redr[STABLES.STABLES_ID].ToString(),
                        Stables_name  = redr[STABLES.STABLES_NAME].ToString(),
                        Alias         = redr[STABLES.ALIAS].ToString(),
                        Namespaces_id = redr[NAMESPACES.NAMESPACES_NAME].ToString(),
                        Databases_id  = redr[DATABASES.DATABASES_NAME].ToString(),
                        Active_id     = redr[STABLES.ACTIVE_ID].ToString(),
                    };

                    list.Add(obj);
                }

                redr.Close();
            }
            return(list);
        }
Example #3
0
        private static List <SFieldsItems> EntityList(string q)
        {
            List <SFieldsItems> list = new List <SFieldsItems>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    SFieldsItems obj = new SFieldsItems()
                    {
                        Sfields_id  = redr[SFIELDSITEMS.SFIELDSITEMS_ID].ToString(),
                        Stables_id  = redr[SFIELDSITEMS.STABLES_ID].ToString(),
                        Fieldsname  = redr[SFIELDSITEMS.FIELDSNAME].ToString(),
                        Displayname = redr[SFIELDSITEMS.DISPLAY_NAME].ToString(),
                        Datatype    = redr[SFIELDSITEMS.DATATYPE].ToString(),
                        //Lengths = redr[SFIELDSITEMS.LENGTHS].ToString(),
                        //Pkeys = redr[SFIELDSITEMS.PKEYS].ToString(),
                        //Ifnull = redr[SFIELDSITEMS.IFNULL].ToString(),
                        //Refered_tbl = redr[SFIELDSITEMS.REFEREDTBL].ToString(),
                        Inputtype = redr[SFIELDSITEMS.INPUTTYPE].ToString(),
                        Width     = redr[SFIELDSITEMS.WIDTH].ToString()
                    };

                    list.Add(obj);
                }
            }
            return(list);
        }
Example #4
0
 private static Spath EntityData(string q)
 {
     using (IDataReader redr = new SQLITE_DAL().Listreader(q))
     {
         while (redr.Read() == true)
         {
             Spath obj = new Spath()
             {
                 Spath_id    = redr[SPATH.SPATH_ID].ToString(),
                 Stables_id  = redr[STABLES.STABLES_NAME].ToString(),
                 Root_folder = redr[SPATH.ROOT_FOLDER].ToString(),
                 Contfolder  = redr[SPATH.CONTFOLDER].ToString(),
                 Classfolder = redr[SPATH.CLASSFOLDER].ToString(),
                 Formfolder  = redr[SPATH.FORMFOLDER].ToString(),
                 Listfolder  = redr[SPATH.LISTFOLDER].ToString(),
                 Setupfolder = redr[SPATH.SETUPFOLDER].ToString(),
                 Testfolder  = redr[SPATH.TESTFOLDER].ToString(),
                 Active_id   = redr[SPATH.ACTIVE_ID].ToString(),
             };
             return(obj);
         }
         redr.Close();
         return(new Spath());
     }
 }
Example #5
0
        private static List <MasterTablesItems> GetFields(int table_id)
        {
            string q = "SELECT * FROM " + MASTERTABLESITEMS.MASTERTABLESITEMS_TBL + " WHERE  " + MASTERTABLES.MASTERTABLES_ID + " =" + table_id;

            List <MasterTablesItems> list = new List <MasterTablesItems>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    MasterTablesItems obj = new MasterTablesItems()
                    {
                        Mtablesitems_id = redr[MASTERTABLESITEMS.MASTERTABLESITEMS_ID].ToString(),
                        Mtables_id      = redr[MASTERTABLESITEMS.MASTERTABLES_ID].ToString(),
                        Fieldsname      = redr[MASTERTABLESITEMS.FIELDSNAME].ToString(),
                        Displayname     = redr[MASTERTABLESITEMS.DISPLAYNAME].ToString(),
                        Datatype        = redr[MASTERTABLESITEMS.DATATYPE].ToString(),
                        Inputtype       = redr[MASTERTABLESITEMS.INPUTTYPE].ToString(),
                        Width           = redr[MASTERTABLESITEMS.WIDTH].ToString(),
                        Height          = redr[MASTERTABLESITEMS.HEIGHT].ToString(),
                        Cposition       = redr[MASTERTABLESITEMS.CPOSITION].ToString(),
                        Rposition       = redr[MASTERTABLESITEMS.RPOSITION].ToString(),
                        Validate        = redr[MASTERTABLESITEMS.VALIDATE].ToString(),
                        Isdefault       = redr[MASTERTABLESITEMS.ISDEFAULT].ToString(),
                        Placement       = redr[MASTERTABLESITEMS.PLACEMENT].ToString(),
                        Alignto         = redr[MASTERTABLESITEMS.ALIGNTO].ToString(),
                    };

                    list.Add(obj);
                }
            }
            return(list);
        }
Example #6
0
        private static MasterTables GetTables(int table_id)
        {
            string q = "SELECT " + MASTERTABLES.MASTERTABLES_TBL + ".* \r\n";

            q += ", " + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_NAME + " \r\n";
            q += ", " + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_NAME + " \r\n";
            q += " FROM " + MASTERTABLES.MASTERTABLES_TBL + " \r\n";

            q += " INNER JOIN  " + NAMESPACES.NAMESPACES_TBL + "\r\n";
            q += " ON(" + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_ID + " = " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.NAMESPACES_ID + " )\r\n";

            q += " INNER JOIN  " + DATABASES.DATABASES_TBL + "\r\n";
            q += " ON(" + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_ID + " = " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.DATABASES_ID + " )\r\n";

            q += " WHERE  " + MASTERTABLES.MASTERTABLES_ID + " =" + table_id;

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    MasterTables obj = new MasterTables()
                    {
                        Mastertables_id   = redr[MASTERTABLES.MASTERTABLES_ID].ToString(),
                        Mastertables_name = redr[MASTERTABLES.MASTERTABLES_NAME].ToString(),
                        Alias             = redr[MASTERTABLES.ALIAS].ToString(),
                        Namespaces_id     = redr[NAMESPACES.NAMESPACES_NAME].ToString(),
                        Databases_id      = redr[DATABASES.DATABASES_NAME].ToString()
                    };
                    return(obj);
                }
                return(new MasterTables());
            }
        }
Example #7
0
 private static Version EntityData(string q)
 {
     using (IDataReader redr = new SQLITE_DAL().Listreader(q))
     {
         while (redr.Read() == true)
         {
             Version obj = new Version()
             {
                 Version_id   = redr[VERSION.VERSION_ID].ToString(),
                 Version_name = redr[VERSION.VERSION_NAME].ToString(),
                 Created_on   = redr[VERSION.CREATED_ON].ToString(),
                 Changes      = redr[VERSION.CHANGES].ToString()
             };
             return(obj);
         }
         redr.Close();
         return(new Version());
     }
 }
Example #8
0
 private static Namespaces EntityData(string q)
 {
     using (IDataReader redr = new SQLITE_DAL().Listreader(q))
     {
         while (redr.Read() == true)
         {
             Namespaces obj = new Namespaces()
             {
                 Namespaces_id   = redr[NAMESPACES.NAMESPACES_ID].ToString(),
                 Namespaces_name = redr[NAMESPACES.NAMESPACES_NAME].ToString(),
                 Notes           = redr[NAMESPACES.NOTES].ToString(),
                 Active_id       = redr[NAMESPACES.ACTIVE_ID].ToString()
             };
             return(obj);
         }
         redr.Close();
         return(new Namespaces());
     }
 }
Example #9
0
 private static MasterTables EntityData(string q)
 {
     using (IDataReader redr = new SQLITE_DAL().Listreader(q))
     {
         while (redr.Read() == true)
         {
             MasterTables obj = new MasterTables()
             {
                 Mastertables_id   = redr[MASTERTABLES.MASTERTABLES_ID].ToString(),
                 Databases_id      = redr[DATABASES.DATABASES_NAME].ToString(),
                 Mastertables_name = redr[MASTERTABLES.MASTERTABLES_NAME].ToString(),
                 Alias             = redr[MASTERTABLES.ALIAS].ToString(),
                 Namespaces_id     = redr[NAMESPACES.NAMESPACES_NAME].ToString(),
                 Active_id         = redr[MASTERTABLES.ACTIVE_ID].ToString(),
             };
             return(obj);
         }
         redr.Close();
         return(new MasterTables());
     }
 }
Example #10
0
        private static MasterTablePath GetPath(int table_id)
        {
            string q = "SELECT * FROM " + MASTERPATH.MASTERPATH_TBL + " WHERE  " + MASTERTABLES.MASTERTABLES_ID + " =" + table_id;

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    MasterTablePath obj = new MasterTablePath()
                    {
                        Contfolder  = redr[MASTERPATH.CONTFOLDER].ToString(),
                        Classfolder = redr[MASTERPATH.CLASSFOLDER].ToString(),
                        Formfolder  = redr[MASTERPATH.FORMFOLDER].ToString(),
                        Listfolder  = redr[MASTERPATH.LISTFOLDER].ToString(),
                        Setupfolder = redr[MASTERPATH.SETUPFOLDER].ToString(),
                        Testfolder  = redr[MASTERPATH.TESTFOLDER].ToString()
                    };
                    return(obj);
                }
                return(new MasterTablePath());
            }
        }
Example #11
0
        private static List <Version> EntityList(string q)
        {
            List <Version> list = new List <Version>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    Version obj = new Version()
                    {
                        Version_id   = redr[VERSION.VERSION_ID].ToString(),
                        Version_name = redr[VERSION.VERSION_NAME].ToString(),
                        Created_on   = redr[VERSION.CREATED_ON].ToString(),
                        Changes      = redr[VERSION.CHANGES].ToString()
                    };

                    list.Add(obj);
                }

                redr.Close();
            }
            return(list);
        }
Example #12
0
        private static List <Namespaces> EntityList(string q)
        {
            List <Namespaces> list = new List <Namespaces>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    Namespaces obj = new Namespaces()
                    {
                        Namespaces_id   = redr[NAMESPACES.NAMESPACES_ID].ToString(),
                        Namespaces_name = redr[NAMESPACES.NAMESPACES_NAME].ToString(),
                        Notes           = redr[NAMESPACES.NOTES].ToString(),
                        Active_id       = redr[NAMESPACES.ACTIVE_ID].ToString()
                    };

                    list.Add(obj);
                }

                redr.Close();
            }
            return(list);
        }
Example #13
0
        private static List <SFields> EntityList(string q)
        {
            List <SFields> list = new List <SFields>();

            using (IDataReader redr = new SQLITE_DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    SFields obj = new SFields()
                    {
                        Sfields_id  = redr[SFIELDS.SFIELDS_ID].ToString(),
                        Stables_id  = redr[SFIELDS.STABLES_ID].ToString(),
                        Fieldsname  = redr[SFIELDS.FIELDSNAME].ToString(),
                        Displayname = redr[SFIELDS.DISPLAY_NAME].ToString(),
                        Datatype    = redr[SFIELDS.DATATYPE].ToString(),
                        //Lengths = redr[SFIELDS.LENGTHS].ToString(),
                        //Pkeys = redr[SFIELDS.PKEYS].ToString(),
                        //Ifnull = redr[SFIELDS.IFNULL].ToString(),
                        //Refered_tbl = redr[SFIELDS.REFEREDTBL].ToString(),
                        Inputtype = redr[SFIELDS.INPUTTYPE].ToString(),
                        Width     = redr[SFIELDS.WIDTH].ToString(),
                        Height    = redr[SFIELDS.HEIGHT].ToString(),
                        Cposition = redr[SFIELDS.CPOSITION].ToString(),
                        Rposition = redr[SFIELDS.RPOSITION].ToString(),
                        Alignto   = redr[SFIELDS.ALIGNTO].ToString(),
                        Validate  = redr[SFIELDS.VALIDATE].ToString(),
                        Isdefault = redr[SFIELDS.ISDEFAULT].ToString(),
                        Placement = redr[SFIELDS.PLACEMENT].ToString(),
                        Readonly  = redr[SFIELDS.READONLY].ToString(),
                    };

                    list.Add(obj);
                }
            }
            return(list);
        }