Esempio n. 1
0
        /// <summary>
        ///  更新一条数据
        /// </summary>
        public int Update(SqlTransaction sqltran, Entities.CallEventActionLog model)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@RecID",      SqlDbType.Int,         4),
                new SqlParameter("@EventName",  SqlDbType.NVarChar,  200),
                new SqlParameter("@SessionID",  SqlDbType.NVarChar,  200),
                new SqlParameter("@Loginfo",    SqlDbType.VarChar,  3000),
                new SqlParameter("@UserID",     SqlDbType.Int,         4),
                new SqlParameter("@CreateTime", SqlDbType.DateTime)
            };
            parameters[0].Value = model.RecID;
            parameters[1].Value = model.EventName;
            parameters[2].Value = model.SessionID;
            parameters[3].Value = model.Loginfo;
            parameters[4].Value = model.UserID;
            parameters[5].Value = model.CreateTime;

            return(SqlHelper.ExecuteNonQuery(sqltran, CommandType.StoredProcedure, P_CALLEVENTACTIONLOG_UPDATE, parameters));
        }
Esempio n. 2
0
        /// <summary>
        ///  增加一条数据
        /// </summary>
        public void Insert(Entities.CallEventActionLog model)
        {
            string sqlStr = "INSERT CallEventActionLog VALUES (@EventName,@SessionID,@Loginfo,@UserID,@CreateTime)";

            SqlParameter[] parameters =
            {
                new SqlParameter("@EventName",  SqlDbType.NVarChar,  200),
                new SqlParameter("@SessionID",  SqlDbType.NVarChar,  200),
                new SqlParameter("@Loginfo",    SqlDbType.VarChar,  3000),
                new SqlParameter("@UserID",     SqlDbType.Int,         4),
                new SqlParameter("@CreateTime", SqlDbType.DateTime)
            };
            parameters[0].Value = model.EventName;
            parameters[1].Value = model.SessionID;
            parameters[2].Value = model.Loginfo;
            parameters[3].Value = model.UserID;
            parameters[4].Value = model.CreateTime;

            SqlHelper.ExecuteNonQuery(CONNECTIONSTRINGS, CommandType.Text, sqlStr, parameters);
        }
Esempio n. 3
0
        private Entities.CallEventActionLog LoadSingleCallEventActionLog(DataRow row)
        {
            Entities.CallEventActionLog model = new Entities.CallEventActionLog();

            if (row["RecID"].ToString() != "")
            {
                model.RecID = int.Parse(row["RecID"].ToString());
            }
            model.EventName = row["EventName"].ToString();
            model.SessionID = row["SessionID"].ToString();
            model.Loginfo   = row["Loginfo"].ToString();
            if (row["UserID"].ToString() != "")
            {
                model.UserID = int.Parse(row["UserID"].ToString());
            }
            if (row["CreateTime"].ToString() != "")
            {
                model.CreateTime = DateTime.Parse(row["CreateTime"].ToString());
            }
            return(model);
        }
Esempio n. 4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(SqlTransaction sqltran, Entities.CallEventActionLog model)
 {
     return(Dal.CallEventActionLog.Instance.Update(sqltran, model));
 }
Esempio n. 5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(Entities.CallEventActionLog model)
 {
     return(Dal.CallEventActionLog.Instance.Update(model));
 }
Esempio n. 6
0
        //#region IsExists
        ///// <summary>
        ///// 是否存在该记录
        ///// </summary>
        //public bool IsExistsByRecID(int RecID)
        //{
        //    QueryCallEventActionLog query = new QueryCallEventActionLog();
        //    query.RecID = RecID;
        //    DataTable dt = new DataTable();
        //    int count = 0;
        //    dt = GetCallEventActionLog(query, string.Empty, 1, 1, out count);
        //    if (count > 0)
        //    {
        //        return true;
        //    }
        //    else
        //    {
        //        return false;
        //    }
        //}

        //#endregion

        #region Insert
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Insert(Entities.CallEventActionLog model)
        {
            Dal.CallEventActionLog.Instance.Insert(model);
        }