/// <summary> /// 插入消息表根据[作品ID] /// </summary> /// <param name="xx">消息</param> /// <param name="xiaozucy">编号</param> /// <returns></returns> public int getshoucangxiaoxi_zuop_DLL(xiaoxinfo xx, shoucinfo sc, int yonghuid, string[] xiaozucy) { try { for (int i = 0; i < xiaozucy.Length - 1; i++) { string sqlstr = "select 姓名 from 用户表 where 用户ID=@用户ID";//收藏者姓名 string name = getnamebyid(yonghuid.ToString(), sqlstr); SqlParameter[] parame = new SqlParameter[] { new SqlParameter("@内容", SqlDbType.NVarChar, 300), new SqlParameter("@类型", SqlDbType.NVarChar, 10), new SqlParameter("@已读", SqlDbType.Bit), new SqlParameter("@时间", SqlDbType.DateTime), new SqlParameter("@用户编号", SqlDbType.NVarChar, 20), //将要收到消息的id }; parame[0].Value = string.Format("您的作品<b><a href='zuopin.aspx?wenzhangid={0}'>{1}</a></b>被<b><a href='people.aspx?yonghuid={2}'>{3}</a></b>收藏了", sc.zuopId, sc.tmName, yonghuid, name); parame[1].Value = "系统消息"; parame[2].Value = 0; parame[3].Value = DateTime.Now.ToShortTimeString(); parame[4].Value = xiaozucy[i]; DB.ExecuteNonQuery(cs, "插入_消息表", parame); } return(1); } catch { return(0); } }
/// <summary> /// 插入消息表根据[活动ID] /// </summary> /// <param name="sc"></param> /// <returns></returns> public int getshoucangxiaoxi_huod_DLL(shoucinfo sc, int yonghuid, string huodongfaqiren) { try { string sqlstr = "select 姓名 from 用户表 where 用户编号=@用户编号";//收藏者姓名 string name = getname(sc.yonghubianhao, sqlstr); SqlParameter[] parame = new SqlParameter[] { new SqlParameter("@内容", SqlDbType.NVarChar, 300), new SqlParameter("@类型", SqlDbType.NVarChar, 10), new SqlParameter("@已读", SqlDbType.Bit), new SqlParameter("@时间", SqlDbType.DateTime), new SqlParameter("@用户编号", SqlDbType.NVarChar, 20), //将要收到消息的id }; parame[0].Value = string.Format("您的活动<b><a href='zhanlan.aspx?huodongid={0}'>{1}</a></b>被<b><a href='people.aspx?yonghuid={2}'>{3}</a></b>收藏了", sc.huodId, sc.tmName, yonghuid, name); parame[1].Value = "系统消息"; parame[2].Value = 0; parame[3].Value = DateTime.Now.ToShortTimeString(); parame[4].Value = huodongfaqiren; return(DB.ExecuteNonQuery(cs, "插入_消息表", parame)); } catch { return(0); } }
/// <summary> /// 插入消息表[活动ID] /// </summary> /// <param name="sc"></param> /// <returns></returns> public int getshoucangxiaoxi(shoucinfo sc, int yonghuid, string huodongfaqiren) { return(xiaoxiDLL.getshoucangxiaoxi_huod_DLL(sc, yonghuid, huodongfaqiren)); }
/// <summary> /// 插入消息表[作品ID] /// </summary> /// <param name="xx"></param> /// <param name="shoucangzheyonghubianhao"></param> /// <param name="xiaozucy"></param> /// <returns></returns> public int getshoucangxiaoxi(xiaoxinfo xx, shoucinfo sc, int yonghuid, string[] xiaozucy) { return(xiaoxiDLL.getshoucangxiaoxi_zuop_DLL(xx, sc, yonghuid, xiaozucy)); }
public int getshoucanghuodong(shoucinfo sc) { return(scDAL.getshoucanghuodong_DLL(sc)); }
/// <summary> /// 收藏作品 /// </summary> /// <param name="sc"></param> /// <returns></returns> public int getshoucangzuopin(shoucinfo sc) { return(scDAL.getshoucangzuopin_DLL(sc)); }
/// <summary> /// 收藏人物 /// </summary> /// <param name="sc"></param> /// <returns></returns> public int getshoucangrenwu(shoucinfo sc, int yonghuid) { return(scDAL.getshoucangrenwu_DLL(sc, yonghuid)); }
public int updateshouchang(shoucinfo sc) { return(scDAL.updateCollectInfo(sc)); }
// PROC_DLL Bll = new PROC_DLL(); /// <summary> /// insertCollect 插入收藏信息 /// </summary> /// <param name="sc"></param> public int insertCollect(shoucinfo sc) { return(scDAL.insertCollect(sc)); }