//Constructor for First Excercise public Strength_Execution(Trainingsplan_Basic tp, int excerciseNumber) { InitializeComponent(); cur_exercise = excerciseNumber; cur_tp = tp; LTrainingsplan.Text = tp.name; LExcerciseNumber.Text = excerciseNumber.ToString(); GetTrainingsplanData(); //Get or Create Execution ID try { var db_execution = new SQLiteConnection(App.filePath); IEnumerable <Excercise_Ausführung> ausf = db_execution.Query <Excercise_Ausführung>("Select execution_id FROM Excercise_Ausführung"); List <Excercise_Ausführung> af = ausf.ToList <Excercise_Ausführung>(); foreach (Excercise_Ausführung element in af) { cur_execution = element.execution_id; } cur_execution++; } catch { using (SQLiteConnection conn = new SQLiteConnection(App.filePath)) { conn.CreateTable <Excercise_Ausführung>(); cur_execution = 0; } } }
public Strength_Execution(Trainingsplan_Basic tp, int excerciseNumber, int excecutionNumber) { InitializeComponent(); cur_exercise = excerciseNumber; cur_tp = tp; LTrainingsplan.Text = tp.name; LExcerciseNumber.Text = excerciseNumber.ToString(); GetTrainingsplanData(); cur_execution = excecutionNumber; }
void SaveTp(object sender, System.EventArgs e) { var db = new SQLiteConnection(App.filePath); var tpname = tp.Text; Trainingsplan_Basic tp_basic = new Trainingsplan_Basic() { name = tpname }; //Insert the Trainingsplan using (SQLiteConnection conn = new SQLiteConnection(App.filePath)) { conn.CreateTable <Trainingsplan_Basic>(); int RowsAdded = conn.Insert(tp_basic); } App.Current.MainPage = new Strength_StartPage(); }
public Overview_Singe_Trainingsplan_Ausf_Statistics(Trainingsplan_Basic tp) { InitializeComponent(); this.tpb = tp; }
public SE_Trainingsplan(Trainingsplan_Basic tp) { InitializeComponent(); cur_tp = tp; }
public Overview_Single_Trainingsplan(Trainingsplan_Basic tp) { InitializeComponent(); this.tp = tp; }
private void ToAusfOverview(object sender, EventArgs e) { Trainingsplan_Basic tp = (Trainingsplan_Basic)lv_Overview.SelectedItem; App.Current.MainPage = new Overview_Singe_Trainingsplan_Ausf_Change(tp); }
private void ToTrainingsplan(object sender, EventArgs e) { Trainingsplan_Basic tp = (Trainingsplan_Basic)lv_Overview.SelectedItem; App.Current.MainPage = new SE_Trainingsplan(tp); }