117 lines
4.9 KiB
C#
117 lines
4.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace Mtxfw.VipSite
|
|
{
|
|
public partial class Admin_Member_renwu_gl_ly : Mtxfw.Utility.MemberBase
|
|
{
|
|
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
|
|
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
public String strTitle = "",strBody = "";
|
|
public int gtype = 0;
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
string hostname = Request.Url.Host;
|
|
|
|
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
|
|
Data_Bind();
|
|
|
|
|
|
Btn_Update.Click += delegate(object s, EventArgs ex)
|
|
{
|
|
Int64 ID = Int64.Parse(Request.QueryString["ID"]);
|
|
Mtxfw.Model.user_Results rmodel = daoResults.GetModel(int.Parse(Request.QueryString["ID"]));
|
|
if (rmodel != null)
|
|
{
|
|
Mtxfw.Model.user_info umodel = new Mtxfw.DAL.user_info().GetModel(rmodel.MemberId);
|
|
if (umodel != null)
|
|
{
|
|
daoResults.UpdateLDR(Hidd_myEditor.Value,ID);
|
|
string atitle = daoArt.Getzd("title", "gtype=" + gtype + " and parentid=18 and Id=" + rmodel.hasRead).ToString();
|
|
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
|
logmodel.MemberId = Card;
|
|
logmodel.AddTime = DateTime.Now;
|
|
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
|
logmodel.Body = "给" + umodel.UserName + "(" + umodel.RealName + ")" + "留言";
|
|
logmodel.UType = 0;
|
|
logmodel.gtype = gtype;
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|
Mtxfw.Model.Article amodel = new Mtxfw.Model.Article();
|
|
amodel.senderid = 0;
|
|
amodel.receiverid = umodel.Id;
|
|
amodel.Title = "任务进度通知";
|
|
amodel.ParentID = 30;
|
|
amodel.CategoryId = "0";
|
|
amodel.AddTime = DateTime.Now;
|
|
amodel.Author = "../image/renwu-ico.png";
|
|
amodel.Content = "您的任务【" + atitle + "】有新的客服留言";
|
|
amodel.Paths = "myrenwu_uploadpic.html";
|
|
amodel.Content2 = "";
|
|
amodel.Paths2 = rmodel.Id.ToString();
|
|
amodel.KeyWords = "";
|
|
amodel.media_id = "";
|
|
amodel.thumb_media_id = "";
|
|
amodel.wtype = 5;
|
|
amodel.wtype2 = 0;
|
|
amodel.LinkID = 1;
|
|
amodel.Seef = 0;
|
|
amodel.gtype = gtype;
|
|
string dataid = daoArt.Add(amodel).ToString();
|
|
if (umodel.registrationId != "")
|
|
{
|
|
List<string> RegistrationIDList = new List<string>();
|
|
RegistrationIDList.Add(umodel.registrationId);
|
|
string title = amodel.Title;
|
|
string strMsg = amodel.Content;
|
|
bool is_production = true;
|
|
string strLog = "";
|
|
new Jiguang.JPush.JPushV3().SendPushV2(RegistrationIDList, title, dataid, strMsg, is_production, out strLog);
|
|
}
|
|
ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('留言成功!');art.dialog.close();</script>");
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
protected void Data_Bind()
|
|
{
|
|
|
|
|
|
|
|
|
|
if (Request.QueryString["ID"] != null)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = strTitle + " - " + GetWebName;
|
|
}
|
|
Mtxfw.Model.user_Results rmodel = daoResults.GetModel(Int64.Parse(Request.QueryString["ID"]));
|
|
if (rmodel != null)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
Mtxfw.Model.user_info umodel = new Mtxfw.DAL.user_info().GetModel(rmodel.MemberId);
|
|
if (umodel != null)
|
|
{
|
|
Text_Title.Text = umodel.UserName + "(" + umodel.RealName + ")";
|
|
}
|
|
}
|
|
strBody = rmodel.LDR;
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
} |