public static List <Report> GetReports(int person_id) { DBConnection db = new DBConnection(DB.connString); Console.WriteLine(person_id); return(db.ReadToListSP <Report>("SelectReports", repsel, new SqlParameter("id", person_id)).ToList()); }
public static Appearance GetAppearance(int id) { DBConnection db = new DBConnection(DB.connString); var list = db.ReadToListSP <Appearance>("SelectAppearance", appsel, new SqlParameter("id", id)).ToList(); if (list.Count != 0) { return(list[0]); } return(new Appearance(0, "", "", -1)); }
public static Address GetAddress(int id) { DBConnection db = new DBConnection(DB.connString); var list = db.ReadToListSP <Address>("SelectAddress", addsel, new SqlParameter("id", id)).ToList(); if (list.Count != 0) { return(list[0]); } return(new Address("", 0, -1)); }
public static Image GetImage(int id) { DBConnection db = new DBConnection(DB.connString); var list = db.ReadToListSP <Image>("SelectImage", imgsel, new SqlParameter("id", id)).ToList(); if (list.Count != 0) { return(list[0]); } return(new Image(new byte[] { 0x00 }, -1)); }
public static List <Agent> GetAllAgents() { DBConnection db = new DBConnection(DB.connString); return(db.ReadToListSP <Agent>("SelectAllInformers", agsel).ToList()); }
public static List <Report_Log> GetReportLogs(int id) { DBConnection db = new DBConnection(DB.connString); return(db.ReadToListSP <Report_Log>("SelectReportLogs", logsel, new SqlParameter("id", id)).ToList()); }
public static List <Observed> GetAllObserved() { DBConnection db = new DBConnection(DB.connString); return(db.ReadToListSP <Observed>("SelectAllObserved", obssel).ToList()); }
public static List <Informer> GetAllInformers() { DBConnection db = new DBConnection(DB.connString); return(db.ReadToListSP <Informer>("SelectAllInformers", infsel).ToList()); }