Example #1
0
        public MainForm(User user)
        {
            this.user = user;
            InitializeComponent();
            queryAdapter   = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
            findDays       = new NewGymPlannerDataSetTableAdapters.FindDaysTableAdapter();
            daysAdapter    = new NewGymPlannerDataSetTableAdapters.DaysTableAdapter();
            userDayAdapter = new NewGymPlannerDataSetTableAdapters.User_DayTableAdapter();
            if (this.user.isAdmin())
            {
                ExercisesMenuStrip.Visible = true;
            }
            else
            {
                ExercisesMenuStrip.Visible = false;
            }

            DataTable muscleDT = (new NewGymPlannerDataSetTableAdapters.MuscleGroupsTableAdapter()).GetData();

            this.MuscleGroupToolStripComboBox.ComboBox.DisplayMember = muscleDT.Columns[0].ToString();
            this.MuscleGroupToolStripComboBox.ComboBox.ValueMember   = muscleDT.Columns[0].ToString();
            this.MuscleGroupToolStripComboBox.ComboBox.DataSource    = muscleDT;

            DataTable daysDT = findDays.GetWorkoutDays(user.Login);

            Calendar.RemoveAllBoldedDates();
            foreach (DataRow row in daysDT.Rows)
            {
                Calendar.AddBoldedDate(Convert.ToDateTime(row["Date"]));
            }
        }
Example #2
0
 public NewAccountForm()
 {
     InitializeComponent();
     newGymPlannerDataSet = new NewGymPlannerDataSet();
     usersTableAdapter    = new NewGymPlannerDataSetTableAdapters.UsersTableAdapter();
     QueryAdapter         = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
 }
Example #3
0
 public NewExerciseForm()
 {
     InitializeComponent();
     exercisesTableAdapter = new NewGymPlannerDataSetTableAdapters.ExercisesTableAdapter();
     exerciseGroupAdapter  = new NewGymPlannerDataSetTableAdapters.Exercise_MuscleGroupTableAdapter();
     queryAdapter          = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
 }
Example #4
0
 public AuthorizationForm()
 {
     InitializeComponent();
     QueryAdapter           = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
     this.LoginTextBox.Text = "admin";
     this.PassTextBox.Text  = "admin";
     this.PassTextBox.UseSystemPasswordChar = true;
 }
Example #5
0
 public EditSetsForm(int workoutId)
 {
     InitializeComponent();
     this.workoutId    = workoutId;
     dataSet           = new NewGymPlannerDataSet();
     queryAdapter      = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
     setsAdapter       = new NewGymPlannerDataSetTableAdapters.SetsTableAdapter();
     workoutSetAdapter = new NewGymPlannerDataSetTableAdapters.Workout_SetTableAdapter();
     UpdateListView();
 }
Example #6
0
 private void DayForm_Load(object sender, EventArgs e)
 {
     dataSet                = new NewGymPlannerDataSet();
     daysAdapter            = new NewGymPlannerDataSetTableAdapters.DaysTableAdapter();
     queryAdapter           = new NewGymPlannerDataSetTableAdapters.QueryAdapter();
     workoutsAdapter        = new NewGymPlannerDataSetTableAdapters.WorkoutsTableAdapter();
     workoutExerciseAdapter = new NewGymPlannerDataSetTableAdapters.Workout_ExerciseTableAdapter();
     dayWorkoutAdapter      = new NewGymPlannerDataSetTableAdapters.Day_WorkoutTableAdapter();
     workoutByDayAdapter    = new NewGymPlannerDataSetTableAdapters.WorkoutByDayAdapter();
     setsAdapter            = new NewGymPlannerDataSetTableAdapters.SetsTableAdapter();
     UpdateTreeView();
 }