示例#1
0
 public void SaveBackUp(ref string Backup, ref TBLTemp temp)
 {
     if (Backup == "")
     {
         Backup = String.Format(" ('{0}' ", temp.FirstEx);
     }
     else
     {
         Backup = String.Format("{0} ,'{1}' ", Backup, temp.FirstEx);
     }
 }
示例#2
0
        public void SetData(ref TBLTemp temp, ref TBLExercise a, int day)/////only setting up data in temp
        {
            temp.day           = day + 1;
            temp.FirstEx       = a.Name;
            temp.ImgReference  = a.ImgReference;
            temp.ImgReference2 = a.ImgReference2;

            temp.sets   = 10;
            temp.reps   = 110;
            temp.target = a.target;
        }
示例#3
0
        public void SaveInTemp(ref List <TBLExercise> Data, ref DAERSEntities db, ref TBLTemp temp, int j)
        {
            var a = new TBLExercise();

            if (Data.Count >= 2)
            {
                a = Data[random.Next(0, Data.Count - 1)];
            }
            else
            {
                a = Data[Data.Count - 1];
            }

            SetData(ref temp, ref a, j);
            db.TBLTemps.Add(temp);
            db.SaveChanges();
        }//save in temp table