Exemplo n.º 1
0
        public int ArticleCompose(int user_id, int article_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from dt_user_read_log where article_id = '" + article_id + "' and user_id = '" + user_id + "' and compose_count < read_count");
            Model.UserReadLog log = DbHelperSQL.Entity <Model.UserReadLog>(strSql.ToString());

            string sql = "update dt_user_read_log set [compose_count] = [compose_count] +1 where article_id = '" + article_id + "' and user_id = '" + user_id + "' and id='" + log.id + "'";

            return(DbHelperSQL.ExecuteSql(sql));
        }
Exemplo n.º 2
0
 public int Update(Model.UserReadLog model, string where)
 {
     return(dal.Update(model, where));
 }
Exemplo n.º 3
0
 public int Add(Model.UserReadLog model)
 {
     return(dal.Add(model));
 }
Exemplo n.º 4
0
 public int Update(Model.UserReadLog model, string where)
 {
     return(DbHelperSQL.Update <Model.UserReadLog>(databaseprefix + "user_read_log", model, "id", where));
 }
Exemplo n.º 5
0
        public int Add(Model.UserReadLog model)
        {
            int id = 0;

            return(DbHelperSQL.Insert(databaseprefix + "user_read_log", model, out id));
        }