Ejemplo n.º 1
0
 public void AddOne(ResultLogs ModelResultLog)
 {
     /*strSql.Append("insert into ResultLogs (ID,ModelID,UserID,CalTime,FileFolder)");
     strSql.Append(" values(@ID,@ModelID,@UserID,@CalTime,@FileFolder);");
     SqlParameter[] parameters ={
                                 new SqlParameter("@ID", SqlDbType.NVarChar,50),
                                 new SqlParameter("@ModelID",SqlDbType.NVarChar,50),
                                 new SqlParameter("@UserID",SqlDbType.NVarChar,50),
                                 new SqlParameter("@CalTime",SqlDbType.DateTime),
                                 new SqlParameter("@FileFolder",SqlDbType.NVarChar,200),
                             };
     parameters[0].Value = ModelResultLog.ID;
     parameters[1].Value = ModelResultLog.ModelID;
     parameters[2].Value = ModelResultLog.UserID;
     parameters[3].Value = ModelResultLog.CalTime;
     parameters[4].Value = ModelResultLog.FileFolder;
     object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);*/
     using (OOCEntities db = new OOCEntities()) {
         db.ResultLogs.AddObject(ModelResultLog);
         db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new ResultLogs object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="modelId">Initial value of the modelId property.</param>
 /// <param name="userId">Initial value of the userId property.</param>
 /// <param name="calTime">Initial value of the calTime property.</param>
 public static ResultLogs CreateResultLogs(global::System.String id, global::System.String modelId, global::System.String userId, global::System.DateTime calTime)
 {
     ResultLogs resultLogs = new ResultLogs();
     resultLogs.id = id;
     resultLogs.modelId = modelId;
     resultLogs.userId = userId;
     resultLogs.calTime = calTime;
     return resultLogs;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ResultLogs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToResultLogs(ResultLogs resultLogs)
 {
     base.AddObject("ResultLogs", resultLogs);
 }