Example #1
0
 //插入 关注记录
 public bool save(FansMarks f)
 {
     return dll.save(f);
 }
Example #2
0
        //根据sql查询粉丝信息
        IList<FansMarks> GetFansMarksBySql(string sql)
        {
            SqlDataReader reader = DBHelper.ExecuteReader(sql);
            IList<FansMarks> FansMarks = new List<FansMarks>();
            try
            {
                while (reader.Read())
                {
                    FansMarks f = new FansMarks();
                    f.markId = Convert.ToInt32(reader["markId"]);
                    f.onselfId = Convert.ToInt32(reader["onselfId"]);
                    f.otherId = Convert.ToInt32(reader["otherId"]);
                    f.createTime = (DateTime)reader["createTime"];
                    FansMarks.Add(f);
                }

            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return FansMarks;
        }
Example #3
0
 //插入 关注记录
 public bool save(FansMarks f)
 {
     string sql = "insert into t_FansMarks(onselfId,otherId,createTime) values(" + f.onselfId+ "," + f.otherId + ",'" + f.createTime + "')";
     int flag = DBHelper.ExecuteSQL(sql);
     if (flag == 1)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #4
0
 //插入 关注记录
 public bool save(FansMarks f)
 {
     return(dll.save(f));
 }