/// <summary> /// 发送站内短信 /// </summary> private void SendLoginNameShort(string descript, DataTable dt) { Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); Tz888.Model.InnerInfo infomodel = new Tz888.Model.InnerInfo(); foreach (DataRow dataRow in dt.Rows) { infomodel.SendName = loginname; //"020bluemax";//发件人 infomodel.Topic = "推广信息:" + title; infomodel.SendName = loginname; //dataRow["loginname"].ToString().Trim(); infomodel.Context = descript; infomodel.InfoTime = DateTime.Now; infomodel.ReceiveName = dataRow["loginname"].ToString().Trim(); //收件人"hellocindy"; infomodel.ChangeBy = loginname; //"020bluemax";//修改人 bool statu = infoBLL.SendInfoBLL(infomodel, true); if (statu) { Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); Tz888.Model.SubscribeSetTabLog model = new Tz888.Model.SubscribeSetTabLog(); model.LoginName = dataRow["loginname"].ToString().Trim(); model.SubType = "站内短信"; model.Sid = id; bll.Insert(model); } } }
protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "") { Response.Redirect("../Login.aspx"); } //page指令中设置了不安全验证 Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); if (Request.QueryString["ReceivedId"] != null && Request.QueryString["ReceivedId"] != "") { model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["ReceivedId"]), 0); } this.HlpTopic.Text = model.Topic; this.InfoTime.Text = model.InfoTime.ToString(); this.HplSendman.Text = model.SendName; this.TBoxInfoText.Text = model.Context; infoBLL.ReadInfoSet(Convert.ToInt32(Request.QueryString["ReceivedId"])); if (Request.QueryString["Ac"] != null && Request.QueryString["Ac"] != "") { if (Convert.ToInt32(Request.QueryString["Ac"].Trim()) == 1) { SetResponse(); } } if (model.SendName.Trim() == "拓富网" || model.SendName.Trim().ToLower() == "tz888admin") { //this.BtnStartResponse.Visible = false; this.BtnInfoResponse.Visible = false; this.plreply.Visible = false; this.HplSendman.Text = "拓富网"; } }
protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "") { Response.Redirect("../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl)); } Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); string userName = Page.User.Identity.Name; if (Request.QueryString.Count > 0) { if (Request.QueryString["SendId"] != null && Request.QueryString["SendId"] != "" && Request.QueryString["SendId"] != "%") { model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["SendId"]), 1); this.txtReceivedMan.Text = model.ReceiveName; this.txtTopic.Text = model.Topic; this.txtContext.Text = model.Context; } if (Request.QueryString["name"] != null && Request.QueryString["name"].ToString() != "" && Request.QueryString["name"].ToString() != "%") { this.txtReceivedMan.Text = Request.QueryString["name"].ToString(); } } //userName = "******"; //好友列表 //DataTable dt = infoBLL.getFriends(userName); //string strWhere = "loginName='" + userName + "'"; //Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); //string sqlText = "select DISTINCT nickName from innerInfoContactManInfoVIW where loginName='" + userName + "' and groupId=1"; //DataTable dt = Tz888.DBUtility.DbHelperSQL.Query(sqlText).Tables[0]; long CurrPage = 0; long TotalCount = 0; long pageSize = 0; Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); string strWhere = "loginName= '" + userName + "'and groupId= '1'"; DataTable dt = dal.GetList("innerInfoContactManInfoVIW", "ContactId", "ContactId,nickName", strWhere, "ContactId desc", ref CurrPage, pageSize, ref TotalCount); this.lstFriend.DataSource = dt; if (dt != null && dt.Rows.Count > 0) { lstFriend.DataValueField = dt.Columns["ContactId"].ToString(); lstFriend.DataTextField = dt.Columns["nickName"].ToString(); } this.lstFriend.DataBind(); }
public bool SendInfoBLL(Tz888.Model.InnerInfo model, bool isChecked) { bool result = false; if (isChecked) { dal.SaveInfoIDAL(model); result = dal.SendInfoIDAL(model); } else { result = dal.SendInfoIDAL(model); } return(result); }
/// <summary> /// 发送站内短信 /// </summary> /// <param name="LoginName"></param> /// <param name="Title"></param> /// <param name="Body"></param> /// <returns></returns> public bool SendSiteMsg(string LoginName, string Title, string Body) { bool result; Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); model.SendName = "tz888admin"; model.Topic = Title; model.ReceiveName = LoginName; model.Context = Body; model.InfoTime = DateTime.Now; model.ChangeBy = "tz888admin"; result = infoBLL.SendInfoBLL(model, false); return(result); }
protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "") { Response.Redirect("../Login.aspx"); } Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); if (Request.QueryString["wasterId"] != null && Request.QueryString["wasterId"] != "") { //int waster = 29; model = infoBLL.GetInfoContext(Convert.ToInt32(Request.QueryString["wasterId"]), 2); //model = infoBLL.GetInfoContext(waster, 2); this.HlpTopic.Text = model.Topic; this.HplSendman.Text = model.SendName; this.HplReceiveman.Text = model.ReceiveName; this.TBoxInfoText.Text = model.Context; } }
protected void BtnInfoResponse_Click(object sender, EventArgs e) { bool result = false; Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); Tz888.Model.InnerInfo infoModel = new Tz888.Model.InnerInfo(); //设置Model字段成员 infoModel.Topic = this.TBoxResponseTopic.Text; infoModel.Context = this.TBoxResponseText.Text; infoModel.ReceiveName = this.TboxReceiveName.Text; infoModel.SendName = Page.User.Identity.Name; infoModel.ChangeBy = Page.User.Identity.Name; //infoModel.SendName = "sunray"; //infoModel.ChangeBy = "sunray"; infoModel.SendId = 0; result = infoBLL.SendInfoBLL(infoModel, this.CheckBoxSaveOther.Checked); Response.Redirect("inbox2.aspx?"); }
private void bind() { Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); Tz888.Model.InnerInfo infomodel = new Tz888.Model.InnerInfo(); Tz888.Model.SubscribeSet model = new Tz888.Model.SubscribeSet(); model = bll.GetModels(id, out infotypeid, out htmlFile); InfoID = model.InfoID; title = model.Title; bll.GetDescript(InfoID, infotypeid.Trim(), out descript); long CurrPage = Convert.ToInt64(ViewState["CurrPage"]); long TotalCount = 0; string[] countryCode = model.CountryCode.Split(new char[] { ',' }); string[] provinceID = model.ProvinceID.Split(new char[] { ',' }); string[] cityid = model.CityID.Split(new char[] { ',' }); string[] countyId = model.CountyID.Split(new char[] { ',' }); string[] objectGradeID = model.objectGradeID.Split(new char[] { ',' }); string[] ManageTypeId = model.ManageTypeId.Split(new char[] { ',' }); string[] Promotioncount = model.Promotioncount.Split(new char[] { ',' }); //推广条数 SubscribeType = model.SubscribeType.Split(new char[] { ',' }); //推广类型 SubType = model.SubscribeType; ViewState["SubType"] = SubType; string strWhere = ""; int countTatol = 0; for (int i = 0; i < countryCode.Length - 1; i++) { if (objectGradeID[i] != "") { strWhere += " memberGradeId='" + objectGradeID[i] + "'";//'1001'"; } if (ManageTypeId[i] != "") { strWhere += " and ManageTypeId='" + ManageTypeId[i] + "'";//'2003'" } ViewState["strWhere"] = strWhere; if (provinceID[i] != "") { if (countyId[i] != "" && cityid[i] != "") //区 { strWhere += " and countyId='" + countyId[i] + "'"; SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol); } if (!site || !email || !phone) { if (cityid[i] != "")//市 { strWhere += " and CityId='" + cityid[i] + "'"; SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol); } } } if (!site || !email || !phone) { if (provinceID[i] != "")//省 { strWhere += " and provinceID='" + provinceID[i] + "'"; SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol); } } if (!site || !email || !phone) { if (countryCode[i] != "") { strWhere += " countryCode='" + countryCode[i] + "'";//国家 SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol); } } if (!site || !email || !phone) { SendSummey(dal, descript, htmlFile, ref CurrPage, ref TotalCount, Promotioncount, SubscribeType, ref strWhere, ref countTatol); } break; } }
public bool SendInfoWithGroupCheck(Tz888.Model.InnerInfo model, int MessageID) { return(dal.SendInfoWithGroupCheck(model, MessageID)); }
public Tz888.Model.InnerInfo GetInfoContext(int InfoId, int infoTable) //ReceiveId 查询条件 , infoTable 查询表号 { Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); model = dal.GetInfoContext(InfoId, infoTable); return(model); }
protected void butSend_Click(object sender, EventArgs e) {//发送消息 if (txtReceivedMan.Text.Trim() == "") { return; } if (txtTopic.Text.Trim() == "") { return; } if (txtContext.Text.Trim() == "") { return; } bool result = false; Tz888.Model.InnerInfo model = new Tz888.Model.InnerInfo(); Tz888.BLL.InnerInfo infoBLL = new Tz888.BLL.InnerInfo(); string[] s = this.txtReceivedMan.Text.Split(','); model.SendName = Page.User.Identity.Name; //model.SendName = "kiki"; model.Topic = this.txtTopic.Text; model.Context = this.txtContext.Text; model.InfoTime = DateTime.Now; model.ChangeBy = Page.User.Identity.Name; for (int i = 0; i < s.Length; i++) { if (s[i].Trim() != "") { Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); long m = 0; long k = 0; long j = 0; string name = s[i].Trim(); string strWhere = "nickName='" + name + "'"; DataTable dt = dal.GetList("loginInfoTab", "loginName", "loginName", strWhere, "loginName", ref m, k, ref j); if (dt == null) { Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!"); return; } else { if (dt.Rows.Count == 0) { Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!"); return; } } if (dt != null && dt.Rows.Count > 0) { model.ReceiveName = dt.Rows[0][0].ToString().Trim(); } //else //{ // Tz888.Common.MessageBox.Show(this.Page, "收件人用户[" + name + "]不存在!"); // return; //} //model.ReceiveName = s[i]; //SendId 自动生成 Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); bool bl = friendBll.IsSpecies(model.ReceiveName, Page.User.Identity.Name, 3); if (!bl) { result = infoBLL.SendInfoBLL(model, this.cbIsSave.Checked); Tz888.Common.MessageBox.ShowAndHref("短消息发送成功", "SendBox2.aspx"); } else { Response.Write("<script>alert('短消息发送失败!您被" + name + "加入黑名单')</script>"); } } } }