public static List <Servers> PropertiesList(string q) { List <Servers> list = new List <Servers>(); DataTable tbl = new SQLITE_DAL().Listdata(q); if (tbl.Rows.Count != 0) { for (int i = 0; i < tbl.Rows.Count; i++) { Servers obj = new Servers() { Servers_id = tbl.Rows[i][SERVERS.SERVERS_ID].ToString(), Servers_name = tbl.Rows[i][SERVERS.SERVERS_NAME].ToString(), Servers_version = tbl.Rows[i][SERVERS.SERVERS_VERSION].ToString(), Servers_path = tbl.Rows[i][SERVERS.SERVERS_PATH].ToString(), Servers_backup_path = tbl.Rows[i][SERVERS.SERVERS_BACKUP_PATH].ToString(), Notes = tbl.Rows[i][SERVERS.NOTES].ToString(), Active_id = tbl.Rows[i][SERVERS.ACTIVE_ID].ToString(), User_id = tbl.Rows[i][SERVERS.USER_ID].ToString() }; list.Add(obj); } } return(list); }
private static List <MasterTables> EntityList(string q) { List <MasterTables> list = new List <MasterTables>(); 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(), }; list.Add(obj); } redr.Close(); } return(list); }
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); }
public static void InsertSub(MasterTablesItems v, SQLITE_DAL dalsession) { string q = " INSERT INTO " + MASTERTABLESITEMS.MASTERTABLESITEMS_TBL + " ( "; q += " " + MASTERTABLESITEMS.FIELDSNAME + " \r\n "; q += "," + MASTERTABLESITEMS.MASTERTABLES_ID + " \r\n "; q += "," + MASTERTABLESITEMS.DISPLAYNAME + " \r\n "; q += "," + MASTERTABLESITEMS.DATATYPE + " \r\n "; q += "," + MASTERTABLESITEMS.INPUTTYPE + " \r\n "; q += "," + MASTERTABLESITEMS.WIDTH + " \r\n "; q += "," + MASTERTABLESITEMS.HEIGHT + " \r\n "; q += "," + MASTERTABLESITEMS.CPOSITION + " \r\n "; q += "," + MASTERTABLESITEMS.RPOSITION + " \r\n "; q += "," + MASTERTABLESITEMS.VALIDATE + " \r\n "; q += "," + MASTERTABLESITEMS.ISDEFAULT + " \r\n "; q += "," + MASTERTABLESITEMS.PLACEMENT + " \r\n "; q += "," + MASTERTABLESITEMS.ALIGNTO + " \r\n "; q += " ) VALUES ( "; q += " @" + MASTERTABLESITEMS.FIELDSNAME + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.MASTERTABLES_ID + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.DISPLAYNAME + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.DATATYPE + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.INPUTTYPE + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.WIDTH + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.HEIGHT + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.CPOSITION + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.RPOSITION + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.VALIDATE + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.ISDEFAULT + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.PLACEMENT + "@ \r\n "; q += ", @" + MASTERTABLESITEMS.ALIGNTO + "@ \r\n "; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }
private static List <Spath> EntityList(string q) { List <Spath> list = new List <Spath>(); 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(), }; list.Add(obj); } redr.Close(); } return(list); }
public static void Insert(MasterTablePath v, SQLITE_DAL dalsession) { string q = " INSERT INTO " + MASTERPATH.MASTERPATH_TBL + " ( "; q += " " + MASTERPATH.MASTERTABLES_ID + " \r\n "; q += "," + MASTERPATH.ROOT_FOLDER + " \r\n "; q += "," + MASTERPATH.CONTFOLDER + " \r\n "; q += "," + MASTERPATH.CLASSFOLDER + " \r\n "; q += "," + MASTERPATH.FORMFOLDER + " \r\n "; q += "," + MASTERPATH.LISTFOLDER + " \r\n "; q += "," + MASTERPATH.SETUPFOLDER + " \r\n "; q += "," + MASTERPATH.TESTFOLDER + " \r\n "; q += "," + MASTERPATH.ACTIVE_ID + " \r\n "; q += " ) VALUES ( "; q += " @" + MASTERPATH.MASTERTABLES_ID + "@ \r\n "; q += ", @" + MASTERPATH.ROOT_FOLDER + "@ \r\n "; q += ", @" + MASTERPATH.CONTFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.CLASSFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.FORMFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.LISTFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.SETUPFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.TESTFOLDER + "@ \r\n "; q += ", @" + MASTERPATH.ACTIVE_ID + "@ \r\n "; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }
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()); } }
public static void InsertSub(SFieldsItems v, SQLITE_DAL dalsession) { string q = " INSERT INTO " + SFIELDSITEMS.SFIELDSITEMS_TBL + " ( "; //q += " " + SFIELDSITEMS.SFIELDS_ID + " \r\n "; q += "" + SFIELDSITEMS.STABLES_ID + " \r\n "; q += "," + SFIELDSITEMS.FIELDSNAME + " \r\n "; q += "," + SFIELDSITEMS.DISPLAY_NAME + " \r\n "; q += "," + SFIELDSITEMS.DATATYPE + " \r\n "; //q += "," + SFIELDSITEMS.LENGTHS + " \r\n "; //q += "," + SFIELDSITEMS.PKEYS + " \r\n "; //q += "," + SFIELDSITEMS.IFNULL + " \r\n "; //q += "," + SFIELDSITEMS.REFEREDTBL + " \r\n "; q += "," + SFIELDSITEMS.INPUTTYPE + " \r\n "; q += "," + SFIELDSITEMS.WIDTH + " \r\n "; q += " ) VALUES ( "; //q += " @" + SFIELDSITEMS.SFIELDS_ID + "@ \r\n "; q += " @" + SFIELDSITEMS.STABLES_ID + "@ \r\n "; q += ", @" + SFIELDSITEMS.FIELDSNAME + "@ \r\n "; q += ", @" + SFIELDSITEMS.DISPLAY_NAME + "@ \r\n "; q += ", @" + SFIELDSITEMS.DATATYPE + "@ \r\n "; //q += ", @" + SFIELDSITEMS.LENGTHS + "@ \r\n "; //q += ", @" + SFIELDSITEMS.PKEYS + "@ \r\n "; //q += ", @" + SFIELDSITEMS.IFNULL + "@ \r\n "; //q += ", @" + SFIELDSITEMS.REFEREDTBL + "@ \r\n "; q += ", @" + SFIELDSITEMS.INPUTTYPE + "@ \r\n "; q += ", @" + SFIELDSITEMS.WIDTH + "@ \r\n "; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }
private static MasterTablePath EntityData(string q) { 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(), }; return(obj); } redr.Close(); return(new MasterTablePath()); } }
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); }
public static void Insert(List <SFields> list, SQLITE_DAL dalsession) { for (int i = 0; i < list.Count; i++) { SFields obj = new SFields() { //Sfields_id = list[i].Sfields_id, Stables_id = list[i].Stables_id, Fieldsname = list[i].Fieldsname, Displayname = list[i].Displayname, Datatype = list[i].Datatype, Inputtype = list[i].Inputtype, Width = list[i].Width, Height = list[i].Height, Cposition = list[i].Cposition, Rposition = list[i].Rposition, Alignto = list[i].Alignto, Validate = list[i].Validate, Isdefault = list[i].Isdefault, Placement = list[i].Placement, Readonly = list[i].Readonly }; InsertSub(obj, dalsession); } }
public static List <SFieldsItems> FKId(string id, SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + SFIELDSITEMS.SFIELDSITEMS_TBL + ".* \r\n"; q += " FROM " + SFIELDSITEMS.SFIELDSITEMS_TBL + " \r\n"; q += " WHERE " + SFIELDSITEMS.SFIELDSITEMS_TBL + "." + STABLES.STABLES_ID + " = '" + id + "' \r\n"; q += " ORDER BY " + SFIELDSITEMS.SFIELDSITEMS_TBL + "." + SFIELDSITEMS.SFIELDSITEMS_ID + ";\r\n"; return(EntityList(q)); }
public static void Update(Namespaces v, SQLITE_DAL dalsession) { string q = "UPDATE " + NAMESPACES.NAMESPACES_TBL + " SET"; q += " " + NAMESPACES.NAMESPACES_NAME + " = @" + NAMESPACES.NAMESPACES_NAME + "@ \r\n "; q += "," + NAMESPACES.NOTES + " = @" + NAMESPACES.NOTES + "@ \r\n "; q += "," + NAMESPACES.ACTIVE_ID + " = @" + NAMESPACES.ACTIVE_ID + "@ \r\n "; q += " WHERE " + NAMESPACES.NAMESPACES_ID + " = @" + NAMESPACES.NAMESPACES_ID + "@ "; q = AttachParams(q, v); dalsession.Execute(q); }
public static void Update(Databases _Databases, SQLITE_DAL dalsession) { string q = "UPDATE " + DATABASES.DATABASES_TBL + " SET"; q += " " + DATABASES.DATABASES_NAME + " = @" + DATABASES.DATABASES_NAME + "@ \r\n "; q += "," + DATABASES.NOTES + " = @" + DATABASES.NOTES + "@ \r\n "; q += "," + DATABASES.ACTIVE_ID + " = @" + DATABASES.ACTIVE_ID + "@ \r\n "; q += "," + DATABASES.USER_ID + " = @" + DATABASES.USER_ID + "@ \r\n "; q += " WHERE " + DATABASES.DATABASES_ID + " = @" + DATABASES.DATABASES_ID + "@ "; q = AttachParams(q, _Databases); dalsession.Execute(q); }
public static DataTable GetforLookup() { string q = " SELECT * FROM " + DATABASES.DATABASES_TBL + ""; q += " WHERE " + DATABASES.ACTIVE_ID + " = " + Core.Active + " \r\n"; // q += " AND NOT " + DATABASES.DATABASES_ID + " = '" + Core.One + "' \r\n"; q += " ORDER BY " + DATABASES.DATABASES_NAME + " \r\n"; DataTable xlist = new SQLITE_DAL().Listdata(q); return(xlist); }
public static MasterTablePath PKId(string v, SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + MASTERPATH.MASTERPATH_TBL + ".* \r\n"; q += ", " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_NAME + " \r\n"; q += " FROM " + MASTERPATH.MASTERPATH_TBL + " \r\n"; q += " INNER JOIN " + MASTERTABLES.MASTERTABLES_TBL + " \r\n"; q += " ON( " + MASTERPATH.MASTERPATH_TBL + "." + MASTERTABLES.MASTERTABLES_ID + " = " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_ID + ")\r\n"; q += " WHERE " + MASTERPATH.MASTERPATH_TBL + "." + MASTERPATH.MASTERPATH_ID + " = '" + v + "' \r\n"; return(EntityData(q)); }
public static void Update(MasterTables v, SQLITE_DAL dalsession) { string q = "UPDATE " + MASTERTABLES.MASTERTABLES_TBL + " SET"; q += " " + MASTERTABLES.DATABASES_ID + " = @" + MASTERTABLES.DATABASES_ID + "@ \r\n "; q += "," + MASTERTABLES.MASTERTABLES_NAME + " = @" + MASTERTABLES.MASTERTABLES_NAME + "@ \r\n "; q += "," + MASTERTABLES.ALIAS + " = @" + MASTERTABLES.ALIAS + "@ \r\n "; q += "," + MASTERTABLES.NAMESPACES_ID + " = @" + MASTERTABLES.NAMESPACES_ID + "@ \r\n "; q += "," + MASTERTABLES.ACTIVE_ID + " = @" + MASTERTABLES.ACTIVE_ID + "@ \r\n "; q += " WHERE " + MASTERTABLES.MASTERTABLES_ID + " = @" + MASTERTABLES.MASTERTABLES_ID + "@ "; q = AttachParams(q, v); dalsession.Execute(q); }
public static DataTable GetforLookup(SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + MASTERPATH.MASTERPATH_TBL + ".* \r\n"; q += ", " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_NAME + " \r\n"; q += " FROM " + MASTERPATH.MASTERPATH_TBL + " \r\n"; q += " INNER JOIN " + MASTERTABLES.MASTERTABLES_TBL + " \r\n"; q += " ON( " + MASTERPATH.MASTERPATH_TBL + "." + MASTERTABLES.MASTERTABLES_ID + " = " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_ID + ")\r\n"; q += " WHERE " + MASTERPATH.MASTERPATH_TBL + "." + MASTERPATH.ACTIVE_ID + " = '" + Core.Active + "' \r\n"; q += " ORDER BY " + MASTERPATH.MASTERPATH_TBL + "." + MASTERPATH.MASTERPATH_ID + ";\r\n"; return(SQLITE_DAL.Listdata(q)); }
public static List <MasterTablePath> NotActive(SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + MASTERPATH.MASTERPATH_TBL + ".* \r\n"; q += ", " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_NAME + " \r\n"; q += " FROM " + MASTERPATH.MASTERPATH_TBL + " \r\n"; q += " INNER JOIN " + MASTERTABLES.MASTERTABLES_TBL + " \r\n"; q += " ON( " + MASTERPATH.MASTERPATH_TBL + "." + MASTERTABLES.MASTERTABLES_ID + " = " + MASTERTABLES.MASTERTABLES_TBL + "." + MASTERTABLES.MASTERTABLES_ID + ")\r\n"; q += " WHERE " + MASTERPATH.MASTERPATH_TBL + "." + MASTERPATH.ACTIVE_ID + " = '" + Core.NotActive + "' \r\n"; q += " ORDER BY " + MASTERPATH.MASTERPATH_TBL + "." + MASTERPATH.MASTERPATH_ID + ";\r\n"; return(EntityList(q)); }
public static Spath SearchName(string v, SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + SPATH.SPATH_TBL + ".* \r\n"; q += ", " + STABLES.STABLES_TBL + "." + STABLES.STABLES_NAME + " \r\n"; q += " FROM " + SPATH.SPATH_TBL + " \r\n"; q += " INNER JOIN " + STABLES.STABLES_TBL + " \r\n"; q += " ON( " + SPATH.SPATH_TBL + "." + STABLES.STABLES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.STABLES_ID + ")\r\n"; q += " WHERE " + SPATH.SPATH_TBL + "." + SPATH.STABLES_ID + " = '" + v + "' \r\n"; q += " ORDER BY " + SPATH.SPATH_TBL + "." + SPATH.SPATH_ID + ";\r\n"; return(EntityData(q)); }
public static List <Spath> Active(SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + SPATH.SPATH_TBL + ".* \r\n"; q += ", " + STABLES.STABLES_TBL + "." + STABLES.STABLES_NAME + " \r\n"; q += " FROM " + SPATH.SPATH_TBL + " \r\n"; q += " INNER JOIN " + STABLES.STABLES_TBL + " \r\n"; q += " ON( " + SPATH.SPATH_TBL + "." + STABLES.STABLES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.STABLES_ID + ")\r\n"; q += " WHERE " + SPATH.SPATH_TBL + "." + SPATH.ACTIVE_ID + " = '" + Core.Active + "' \r\n"; q += " ORDER BY " + SPATH.SPATH_TBL + "." + SPATH.SPATH_ID + ";\r\n"; return(EntityList(q)); }
public static void Update(Version v, SQLITE_DAL dalsession) { string q = "UPDATE " + VERSION.VERSION_TBL + " SET"; q += " " + VERSION.VERSION_NAME + " = @" + VERSION.VERSION_NAME + "@ \r\n "; q += "," + VERSION.CREATED_ON + " = @" + VERSION.CREATED_ON + "@ \r\n "; q += "," + VERSION.CHANGES + " = @" + VERSION.CHANGES + "@ \r\n "; //q += "," + VERSION.NOTES + " = @" + VERSION.NOTES + "@ \r\n "; //q += "," + VERSION.ACTIVE_ID + " = @" + VERSION.ACTIVE_ID + "@ \r\n "; //q += "," + VERSION.USER_ID + " = @" + VERSION.USER_ID + "@ \r\n "; q += " WHERE " + VERSION.VERSION_ID + " = @" + VERSION.VERSION_ID + "@ "; q = AttachParams(q, v); dalsession.Execute(q); }
public static Stables PKId(string v, SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + STABLES.STABLES_TBL + ".* \r\n"; q += " , " + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_NAME + " \r\n"; q += " , " + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_NAME + " \r\n"; q += " FROM " + STABLES.STABLES_TBL + " \r\n"; q += " INNER JOIN " + DATABASES.DATABASES_TBL + "\r\n"; q += " ON(" + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.DATABASES_ID + " )\r\n"; q += " INNER JOIN " + NAMESPACES.NAMESPACES_TBL + "\r\n"; q += " ON(" + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.NAMESPACES_ID + " )\r\n"; q += " WHERE " + STABLES.STABLES_TBL + "." + STABLES.STABLES_ID + " = '" + v + "' \r\n"; return(EntityData(q)); }
public static void Update(Servers _Servers, SQLITE_DAL dalsession) { string q = "UPDATE " + SERVERS.SERVERS_TBL + " SET"; q += " " + SERVERS.SERVERS_NAME + " = @" + SERVERS.SERVERS_NAME + "@ \r\n "; q += "," + SERVERS.SERVERS_VERSION + " = @" + SERVERS.SERVERS_VERSION + "@ \r\n "; q += "," + SERVERS.SERVERS_PATH + " = @" + SERVERS.SERVERS_PATH + "@ \r\n "; q += "," + SERVERS.SERVERS_BACKUP_PATH + " = @" + SERVERS.SERVERS_BACKUP_PATH + "@ \r\n "; q += "," + SERVERS.NOTES + " = @" + SERVERS.NOTES + "@ \r\n "; q += "," + SERVERS.ACTIVE_ID + " = @" + SERVERS.ACTIVE_ID + "@ \r\n "; q += "," + SERVERS.USER_ID + " = @" + SERVERS.USER_ID + "@ \r\n "; q += " WHERE " + SERVERS.SERVERS_ID + " = @" + SERVERS.SERVERS_ID + "@ "; q = AttachParams(q, _Servers); dalsession.Execute(q); }
public static void Insert(Namespaces v, SQLITE_DAL dalsession) { string q = " INSERT INTO " + NAMESPACES.NAMESPACES_TBL + " ( "; q += " " + NAMESPACES.NAMESPACES_NAME + " \r\n "; q += "," + NAMESPACES.NOTES + " \r\n "; q += "," + NAMESPACES.ACTIVE_ID + " \r\n "; q += " ) VALUES ( "; q += " @" + NAMESPACES.NAMESPACES_NAME + "@ \r\n "; q += ", @" + NAMESPACES.NOTES + "@ \r\n "; q += ", @" + NAMESPACES.ACTIVE_ID + "@ \r\n "; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }
public static List <Stables> NotActive(SQLITE_DAL SQLITE_DAL) { string q = " SELECT " + STABLES.STABLES_TBL + ".* \r\n"; q += " , " + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_NAME + " \r\n"; q += " , " + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_NAME + " \r\n"; q += " FROM " + STABLES.STABLES_TBL + " \r\n"; q += " INNER JOIN " + DATABASES.DATABASES_TBL + "\r\n"; q += " ON(" + DATABASES.DATABASES_TBL + "." + DATABASES.DATABASES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.DATABASES_ID + " )\r\n"; q += " INNER JOIN " + NAMESPACES.NAMESPACES_TBL + "\r\n"; q += " ON(" + NAMESPACES.NAMESPACES_TBL + "." + NAMESPACES.NAMESPACES_ID + " = " + STABLES.STABLES_TBL + "." + STABLES.NAMESPACES_ID + " )\r\n"; q += " WHERE " + STABLES.STABLES_TBL + "." + STABLES.ACTIVE_ID + " = '" + Core.NotActive + "' \r\n"; q += " ORDER BY " + STABLES.STABLES_TBL + "." + STABLES.STABLES_ID + ";\r\n"; return(EntityList(q)); }
public static void Update(MasterTablePath v, SQLITE_DAL dalsession) { string q = "UPDATE " + MASTERPATH.MASTERPATH_TBL + " SET"; q += " " + MASTERPATH.MASTERTABLES_ID + " = @" + MASTERPATH.MASTERTABLES_ID + "@ \r\n "; q += "," + MASTERPATH.ROOT_FOLDER + " = @" + MASTERPATH.ROOT_FOLDER + "@ \r\n "; q += "," + MASTERPATH.CONTFOLDER + " = @" + MASTERPATH.CONTFOLDER + "@ \r\n "; q += "," + MASTERPATH.CLASSFOLDER + " = @" + MASTERPATH.CLASSFOLDER + "@ \r\n "; q += "," + MASTERPATH.FORMFOLDER + " = @" + MASTERPATH.FORMFOLDER + "@ \r\n "; q += "," + MASTERPATH.LISTFOLDER + " = @" + MASTERPATH.LISTFOLDER + "@ \r\n "; q += "," + MASTERPATH.SETUPFOLDER + " = @" + MASTERPATH.SETUPFOLDER + "@ \r\n "; q += "," + MASTERPATH.TESTFOLDER + " = @" + MASTERPATH.TESTFOLDER + "@ \r\n "; q += "," + MASTERPATH.ACTIVE_ID + " = @" + MASTERPATH.ACTIVE_ID + "@ \r\n "; q += " WHERE " + MASTERPATH.MASTERPATH_ID + " = @" + MASTERPATH.MASTERPATH_ID + "@ "; q = AttachParams(q, v); dalsession.Execute(q); }
public static void Insert(Databases _Databases, SQLITE_DAL dalsession) { string q = " INSERT INTO " + DATABASES.DATABASES_TBL + " ( "; q += " " + DATABASES.DATABASES_NAME + " \r\n "; q += "," + DATABASES.NOTES + " \r\n "; q += "," + DATABASES.ACTIVE_ID + " \r\n "; q += "," + DATABASES.USER_ID + " \r\n "; q += " ) VALUES ( "; q += " @" + DATABASES.DATABASES_NAME + "@ \r\n "; q += ", @" + DATABASES.NOTES + "@ \r\n "; q += ", @" + DATABASES.ACTIVE_ID + "@ \r\n "; q += ", @" + DATABASES.USER_ID + "@ \r\n "; q += " ) \r\n "; q = AttachParams(q, _Databases); dalsession.Execute(q); }
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()); } }
public static void Insert(MasterTables v, SQLITE_DAL dalsession) { string q = " INSERT INTO " + MASTERTABLES.MASTERTABLES_TBL + " ( "; q += " " + MASTERTABLES.DATABASES_ID + " \r\n"; q += "," + MASTERTABLES.MASTERTABLES_NAME + " \r\n"; q += "," + MASTERTABLES.ALIAS + " \r\n"; q += "," + MASTERTABLES.NAMESPACES_ID + " \r\n"; q += "," + MASTERTABLES.ACTIVE_ID + " \r\n"; q += " ) VALUES ( "; q += " @" + MASTERTABLES.DATABASES_ID + "@ \r\n"; q += ", @" + MASTERTABLES.MASTERTABLES_NAME + "@ \r\n"; q += ", @" + MASTERTABLES.ALIAS + "@ \r\n"; q += ", @" + MASTERTABLES.NAMESPACES_ID + "@ \r\n"; q += ", @" + MASTERTABLES.ACTIVE_ID + "@ \r\n"; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }