Exemplo n.º 1
0
 //收藏模块后期处理
 protected void lbtFavorite_Click(object sender, EventArgs e)
 {
     M_Baike bkMod = bkBll.SelByTittle(Tittle);
     //DataTable dt1 = SqlHelper.ExecuteTable(CommandType.Text, "select * from ZL_Favorite where Owner=" + b_User.GetLogin().UserID + "and FavoriType=4 and InfoID=" + bkMod.ID, null);
     //if (dt1.Rows.Count > 0)
     //{
     //    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('收藏失败,已收藏该词条!');</script>");
     //    return;
     //}
     //int flag = SqlHelper.ExecuteNonQuery(CommandType.Text, "insert into ZL_Favorite values('" + muser.UserID + "','" + bkMod.ID + "','" + DateTime.Now.ToString() + "','4','/Guest/Baike/Details.aspx?soure=manager&tittle=@key','')", sp);
     //if (flag == 1)
     //{
     //    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('收藏成功!');</script>");
     //}
     //else
     //{
     //    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('收藏失败,请重试!');</script>");
     //}
 }