public bool Create(List <RotationInfo> rotationInfoList)
        {
            try
            {
                using (WanTaiEntities entities = new WanTaiEntities())
                {
                    var oldRotations = entities.RotationInfoes.Where(c => c.ExperimentID == SessionInfo.ExperimentID);

                    if (oldRotations.Count() > 0)
                    {
                        foreach (RotationInfo old in oldRotations)
                        {
                            entities.DeleteObject(old);
                        }
                    }

                    foreach (RotationInfo rotationInfo in rotationInfoList)
                    {
                        entities.AddToRotationInfoes(rotationInfo);
                        if (rotationInfo.TubesBatchID != null)
                        {
                            var plates = entities.Plates.Where(P => P.TubesBatchID == rotationInfo.TubesBatchID);
                            foreach (Plate plate in plates)
                            {
                                plate.RotationID = rotationInfo.RotationID;
                            }
                        }
                    }

                    entities.SaveChanges();
                }

                return(true);
            }
            catch (Exception e)
            {
                string errorMessage = e.Message + System.Environment.NewLine + e.StackTrace;
                LogInfoController.AddLogInfo(LogInfoLevelEnum.Error, errorMessage, SessionInfo.LoginName, this.GetType().ToString() + "->" + "Create()", SessionInfo.ExperimentID);
                return(false);
            }
        }