//get the info from DB public void loadRecord() { List <string> l = dbc.get("Movie", id); name = l[1]; price = decimal.Parse(l[2]); number = l[3]; date = DateTime.Parse(l[4]); location = l[5]; genre = l[6]; rating = Int32.Parse(l[7]); duration = Int32.Parse(l[8]); }
//get a Transaction object using info from DB private Transaction getTransactionFromDB(int index) { List <string> l = dbc.get("Transaction", index); return(new Transaction(Int32.Parse(l[0]), Int32.Parse(l[1]), Int32.Parse(l[2]), Int32.Parse(l[3]))); }
//get the info from DB public void loadRecord() { List <string> l = dbc.get("Customer", id); name = l[1].ToString(); }
//get a Movie object using info from DB private Movie getMovieFromDB(int index) { List <string> l = dbc.get("Movie", index); return(new Movie(Int32.Parse(l[0]), l[1], decimal.Parse(l[2]), l[3], DateTime.Parse(l[4]), l[5], l[6], Int32.Parse(l[7]), Int32.Parse(l[8]))); }
//get a Customer object using info from DB private Customer getCustomerFromDB(int index) { List <string> l = dbc.get("Customer", index); return(new Customer(Int32.Parse(l[0]), l[1], l[2], l[3], l[4])); }