public BLRoutineShow() { db = DataLinkLayer.DBconnect(); bLPlanned = new BLPlanned(); bLExecuted = new BLExecuted(); Executed executed = new Executed() { ID = 1, RoutinePlannedID = 0, RoutineID = 0, ExerciseID = 0, Date = "01:01:01", Reps = "0", Sets = 2, lbs = "0" }; // db.CreateTable<Executed>(); //bLExecuted.InsertRoutineExecuted(executed); //db.DropTable<Exercise>(); //db.CreateTable<Exercise>(); //BLExercise bl = new BLExercise(); //bl.InsertExcercise(new Exercise()); //db.DropTable<Routine>(); //db.CreateTable<Routine>(); //BLRoutine bL = new BLRoutine(); //bL.InsertRoutine(new Routine()); //db.DropTable<Planned>(); //db.CreateTable<Planned>(); }
public BLProfile() { db = DataLinkLayer.DBconnect(); BLRoutine bl = new BLRoutine(); //DeleteProfile(12); //ReadProfile(db); }
public BLPlanned() { db = DataLinkLayer.DBconnect(); bLExercise = new BLExercise(); bLRoutine = new BLRoutine(); exercises = bLExercise.ReadExercise(); routines = bLRoutine.ReadRoutine(); //Planned rpd = new Planned(); // Int32 d = InsertRoutinePlanned(rpd); }
public void InsertData(object sender, EventArgs e) { Profile profile = new Profile(); profile.Name = txt_name.Text; // Metrix = matrix.SelectedItem.ToString() == "US" ? false : true, if (matrix.SelectedItem.ToString() == "US") { profile.Metrix = false; } else { profile.Metrix = true; } if (gender.SelectedItem.ToString() == "Male") { profile.Gender = 1; } else if (gender.SelectedItem.ToString() == "Female") { profile.Gender = 2; } else { profile.Gender = 3; } profile.Height = Double.Parse(txt_height.Text.ToString()); profile.Weight = Double.Parse(txt_weight.Text.ToString()); profile.DOB = dob.Date.ToString(); // Actually insert data in database DataLinkLayer dll = new DataLinkLayer(); SQLiteConnection db = DataLinkLayer.DBconnect(); int insertConfirm = DataLinkLayer.DBinsert(profile); if (insertConfirm > 0) { Console.WriteLine("User Name" + profile.Name); //System.Diagnostics.Debug.WriteLine(""+ profile.Name); //await DisplayAlert(null, profile.Name + "Saved", "ok"); } // dll.ReadProfile(db); DataLinkLayer.DBclose(db); }
public BLExecuted() { db = DataLinkLayer.DBconnect(); //db.CreateTable<Executed>(); exerciseList = bLExercise.ReadExercise(); routineList = bLRoutine.ReadRoutine(); planneds = bLPlanned.ReadRoutinePlanned(); //Planned rpd = new Planned(); // Int32 d = InsertRoutinePlanned(rpd); }
public BLPlanned() { db = DataLinkLayer.DBconnect(); //Planned rpd = new Planned(); // Int32 d = InsertRoutinePlanned(rpd); }
public BLRoutinePlanned() { db = DataLinkLayer.DBconnect(); }
public BLExercise() { db = DataLinkLayer.DBconnect(); }
public BLRoutine() { db = DataLinkLayer.DBconnect(); ReadRoutine(db); }