示例#1
0
 public bool CreateExperiment(ExperimentsInfo experimentInfo)
 {
     try
     {
         using (WanTaiEntities entities = new WanTaiEntities())
         {
             entities.AddToExperimentsInfoes(experimentInfo);
             entities.SaveChanges();
             return(true);
         }
     }
     catch (Exception ex)
     {
         string errorMessage = ex.Message + System.Environment.NewLine + ex.StackTrace;
         LogInfoController.AddLogInfo(LogInfoLevelEnum.Error, errorMessage, SessionInfo.LoginName, this.GetType().Name, SessionInfo.ExperimentID);
         return(false);
     }
 }