Ejemplo n.º 1
0
 partial void Deletetables_t(tables_t instance);
Ejemplo n.º 2
0
 partial void Inserttables_t(tables_t instance);
Ejemplo n.º 3
0
 partial void Updatetables_t(tables_t instance);
Ejemplo n.º 4
0
 public void InsertNewConsole(string consoleName)
 {
     var db = new dbDataContext();
     lock (db)
     {
         Table<tables_t> consolesT = db.GetTable<tables_t>();
         var console = new tables_t
         {
             playstation_id = consoleName,
             playstation_state = "free",
             order_time = new DateTime(2000, 1, 1, 0, 0, 0)
         };
         consolesT.InsertOnSubmit(console);
         var timeZoneList = GetAllTimeZones();
         foreach (timezones_t t in timeZoneList)
         {
             Table<playstation_timezone> playstationPricesT = db.GetTable<playstation_timezone>();
             var timezonePrice = new playstation_timezone
             {
                 playstation_id = consoleName,
                 timezone_cost_per_hour = 0,
                 timezone_name = t.timezone_name
             };
             playstationPricesT.InsertOnSubmit(timezonePrice);
         }
         db.SubmitChanges();
     }
 }