Ejemplo n.º 1
0
 /// <summary>
 /// 添加系统访问记录
 /// </summary>
 /// <param name="visitor"></param>
 /// <returns></returns>
 public int Insert(System_Visitor visitor)
 {
     var parameters = new List<SqlParameter>
     {
         this.SqlServer.CreateSqlParameter(
             "SessionID",
             SqlDbType.NVarChar,
             visitor.SessionID,
             ParameterDirection.Input
             ),
         this.SqlServer.CreateSqlParameter(
             "UserName",
             SqlDbType.NVarChar,
             visitor.UserName,
             ParameterDirection.Input
             ),
         this.SqlServer.CreateSqlParameter(
             "IP4Address",
             SqlDbType.NVarChar,
             visitor.IP4Address,
             ParameterDirection.Input
             ),
             this.SqlServer.CreateSqlParameter(
             "EndTime",
             SqlDbType.DateTime,
             visitor.EndTime,
             ParameterDirection.Input
             ),
         this.SqlServer.CreateSqlParameter(
             "ReferenceID",
             SqlDbType.Int,
             null,
             ParameterDirection.Output
             )
     };
     return this.SqlServer.ExecuteNonQuery(CommandType.StoredProcedure, "sp_System_visitor_InsertUser", parameters, null);
 }
 public int Update(System_Visitor visitor)
 {
     return this.systemVisitorDA.Update(visitor);
 }
 public int Insert(System_Visitor visitor)
 {
     return this.systemVisitorDA.Insert(visitor);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 修改系统访问记录
 /// </summary>
 /// <param name="visitor"></param>
 /// <returns></returns>
 public int Update(System_Visitor visitor)
 {
     var parameters = new List<SqlParameter>
     {
         this.SqlServer.CreateSqlParameter(
             "SessionID",
             SqlDbType.NVarChar,
             visitor.SessionID,
             ParameterDirection.Input
             )
     };
     return this.SqlServer.ExecuteNonQuery(CommandType.StoredProcedure, "sp_System_Visitor_Update", parameters, null);
 }