Ejemplo n.º 1
0
        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>();
        }
Ejemplo n.º 2
0
        public BLProfile()
        {
            db = DataLinkLayer.DBconnect();

            BLRoutine bl = new BLRoutine();

            //DeleteProfile(12);
            //ReadProfile(db);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public BLPlanned()
 {
     db = DataLinkLayer.DBconnect();
     //Planned rpd = new Planned();
   //  Int32 d = InsertRoutinePlanned(rpd);
 }
Ejemplo n.º 7
0
 public BLRoutinePlanned()
 {
     db = DataLinkLayer.DBconnect();
 }
Ejemplo n.º 8
0
 public BLExercise()
 {
     db = DataLinkLayer.DBconnect();
 }
Ejemplo n.º 9
0
 public BLRoutine()
 {
     db = DataLinkLayer.DBconnect();
     ReadRoutine(db);
 }