示例#1
0
 private void mRenameWorkout_Click(object sender, EventArgs e)
 {
     frmWorkout frm = new frmWorkout();
     frm.IdWorkout = IdWorkout;
     frm.GetWorkout();
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Workout.EditWorkout(frm.WorkoutName, frm.WorkoutLocation, DateTime, frm.Duration, IdWorkout);
         Title = frm.WorkoutName;
     }
 }
示例#2
0
 private void btnAddWorkout_Click(object sender, EventArgs e)
 {
     frmWorkout frm = new frmWorkout();
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Workout.AddWorkout(frm.WorkoutName,frm.WorkoutLocation,dtpWorkoutDate.Value,frm.Duration);
         GetWorkouts(null, null);
     }
 }