/// <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); } } }
private void PromotionType() { Tz888.Model.SubscribeSet model = new Tz888.Model.SubscribeSet(); Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); model = bll.GetModels(id, out infotypeid, out htmlFile); SubscribeType = model.SubscribeType.Split(new char[] { ',' }); //推广类型 }
protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "") { Response.Redirect("../Login.aspx"); } if (Request.QueryString["id"] != null && Request.QueryString["id"].Trim() != "") { //推广 id = Convert.ToInt32(Request.QueryString["id"].Trim().ToString()); } if (Request.QueryString["recId"] != null && Request.QueryString["recId"].Trim() != "") { //订单详情 recId = Convert.ToInt32(Request.QueryString["recId"].Trim().ToString()); } loginname = Page.User.Identity.Name; if (!Page.IsPostBack) { Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); ViewState["CurrPage"] = 1; bind(); bll.Update(id, ViewState["SubType"].ToString()); bool statu = bll.UpdateSmsConsumeRecTab(recId); if (statu) { Response.Write("<script>alert('恭喜您!推广成功!');location.href='myPromotion.aspx';</script>"); } } }
public void VipVali() { SubscribeSet dalSend = new SubscribeSet(); DataTable dt = dalSend.GetMemberExpiredList(); Tz888.BLL.SendNotice objSend = new SendNotice(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { string loginname = dt.Rows[i]["LoginName"].ToString(); string expireddate = Convert.ToDateTime(dt.Rows[i]["VipInvalidDate"].ToString()).ToShortDateString(); string email = dt.Rows[i]["NoticeEmail"].ToString().Trim(); string mobile = dt.Rows[i]["NoticeMobile"].ToString().Trim(); string mobileContet = "您的拓富通会员资格即将在" + expireddate + "过期,为了保证您的特权,请及时续费!www.topfo.com[此条信息免费]"; objSend.Send(loginname, mobileContet, "您的拓富通即将到期", mobileContet, mobileContet, "VipExpiredNotice"); } } }
/// <summary> /// 发送手机短信 /// </summary> private void SendPhoneShort(string descript, DataTable dt) { foreach (DataRow dataRow in dt.Rows) { StringBuilder str = new StringBuilder(); string MialAddress = dataRow["tel"].ToString().Trim();//"13537706502"; string MailMessage = descript; int a = send.SendSms(MialAddress, MailMessage); if (a > 0) { 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); } } }
public void bind() { Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); Tz888.Model.SubscribeGetSet model = bll.GetModel(loginname); if (model == null) { return; } string[] type = model.ReveiveType.ToString().Split(new char[] { ',' }); for (int i = 0; i < type.Length; i++) { switch (type[i].Trim()) { case "1": cbkEmail.Checked = true; break; case "3": cbkMobile.Checked = true; break; default: break; } } Tz888.BLL.Conn dalConn = new Tz888.BLL.Conn(); DataTable dt = dalConn.GetList("UserParametersTab", "NoticeEmail,NoticeMobile,infocheckNotice", "ParID", 1, 1, 0, 1, "LoginName='" + loginname + "'"); if (dt.Rows.Count > 0) { ViewState["Email"] = dt.Rows[0]["NoticeEmail"].ToString(); txtMobile.Value = dt.Rows[0]["NoticeMobile"].ToString(); } int isget = model.IsGet; if (isget == 1) { isShow.Style.Add("display", ""); } else { isShow.Style.Add("display", "none"); } //rabIsGet.SelectedValue = model.IsGet.ToString(); rabGradeID.SelectedValue = model.objectGradeID.Trim(); string need = model.objectNeed.Trim(); string strneed; for (int i = 0; i < chkNeed.Items.Count; i++) { strneed = chkNeed.Items[i].Value; if (need.IndexOf(strneed) != -1) { chkNeed.Items[i].Selected = true; } } //地区 List <Tz888.Model.Info.CapitalInfoAreaModel> lists = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); string[] countrycode = model.CountryCode.Trim().Split(','); string[] province = model.ProvinceID.Split(','); string[] city = model.CityID.Trim().Split(','); string[] county = model.CountyID.Trim().Split(','); for (int i = 0; i < countrycode.Length - 1; i++) { Tz888.Model.Info.CapitalInfoAreaModel Areamodel = new Tz888.Model.Info.CapitalInfoAreaModel(); Areamodel.CountryCode = countrycode[i].Trim(); try { Areamodel.ProvinceID = province[i].Trim(); } catch { Areamodel.ProvinceID = ""; }; try { Areamodel.CityID = city[i].Trim(); } catch { Areamodel.CityID = ""; } try { Areamodel.CountyID = county[i].Trim(); } catch { Areamodel.CountyID = ""; } lists.Add(Areamodel); this.ZoneControl.CapitalInfoAreaModels = lists; } //行业 //this.IndustryControl.IndustryString = model.Industry.Trim(); //接收方式 string gettype = model.ReveiveType.Trim(); string str; //for (int i = 0; i < chkGetType.Items.Count; i++) //{ // str = chkGetType.Items[i].Value; // if (gettype.IndexOf(str) != -1) // chkGetType.Items[i].Selected = true; //} }
protected void btnEnter_ServerClick(object sender, EventArgs e) { Tz888.Model.SubscribeGetSet model = new Tz888.Model.SubscribeGetSet(); Tz888.BLL.SubscribeSet dal = new Tz888.BLL.SubscribeSet(); List <Tz888.Model.Common.IndustryModel> industryModel = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表 List <Tz888.Model.Info.CapitalInfoAreaModel> AreaModel = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); //投资区域信息实体列表 bool b = false; //if (isGet.Checked) //{ if (chkNeed.SelectedValue == "") { lblMsg.Text = "请至少选择一个受众对象"; return; } if (cbkMobile.Checked && txtMobile.Value == "") { Label1.Text = "手机号不能为空"; return; } model.IsGet = 1; model.LoginName = loginname; model.objectGradeID = rabGradeID.SelectedValue; string needtype = ""; for (int i = 0; i < chkNeed.Items.Count; i++) { if (chkNeed.Items[i].Selected) { needtype += chkNeed.Items[i].Value.ToString() + ","; } } model.objectNeed = needtype; AreaModel = this.ZoneControl.CapitalInfoAreaModels; //industryModel = this.IndustryControl.IndustryModels; //区域 for (int i = 0; i < AreaModel.Count; i++) { model.CountryCode += AreaModel[i].CountryCode + ","; model.ProvinceID += AreaModel[i].ProvinceID + ","; model.CityID += AreaModel[i].CityID + ","; model.CountyID += AreaModel[i].CountyID + ","; } string industry = "";//行业 for (int j = 0; j < industryModel.Count; j++) { industry += industryModel[j].IndustryBID + ","; } model.Industry = industry; string reveivetype = ""; #region //for (int i = 0; i < chkGetType.Items.Count; i++) //{ // if (chkGetType.Items[i].Selected) // { // reveivetype += chkGetType.Items[i].Value.ToString() + ","; // } //} #endregion if (cbkEmail.Checked) { reveivetype += "1,2,"; } if (cbkMobile.Checked) { reveivetype += "3"; } model.ReveiveType = reveivetype;//接收方式 b = dal.ReceivedSet(model); if (b) { Tz888.BLL.UserParameters noticenNO = new Tz888.BLL.UserParameters(); bool notice = noticenNO.NoticeSet(loginname, ViewState["Email"].ToString(), txtMobile.Value.Trim()); Tz888.Common.MessageBox.ShowAndHref("设置成功!", Request.Url.ToString()); } }
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; } }
/// <summary> /// 发送Email短信 /// </summary> private void SendEmailShort(string descript, string htmlFile, DataTable dt) { foreach (DataRow dataRow in dt.Rows) { #region 构建发邮件的格式 StringBuilder str = new StringBuilder(); str.Append("<html>"); str.Append("<heat>"); str.Append("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312>"); str.Append("<title>邮件推广信息</title>"); str.Append("<body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"); str.Append("<table width=\"668\" height=\"705\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"); str.Append("<tr>"); str.Append("<td colspan=\"3\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_01.jpg\" width=\"668\" height=\"1\" alt=\"\"></td>"); str.Append("</tr>"); str.Append("</tr><tr><td colspan=\"3\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_02.jpg\" alt=\"\" width=\"668\" height=\"146\" border=\"0\" usemap=\"#Map\"></td>"); str.Append("</tr>"); str.Append("<tr><td colspan=\"3\" valign=\"top\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_03.jpg\" width=\"668\" height=\"188\" alt=\"\"></td>"); str.Append("</tr><tr valign=\"middle\">"); str.Append("<td width=\"25\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_04.jpg\" width=\"25\" height=\"82\" alt=\"\"></td>"); str.Append("<td width=\"614\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr>"); str.Append("<td height=\"25\" colspan=\"2\" style=\"color:#333333; font-size: 13px; font-weight:bolder;\">"); str.Append("尊敬的用户:中国招商投资网(Http://www.topfo.com)提醒您:您收到推荐资源。</td></tr> <tr>"); str.Append("<td width=\"76%\" height=\"25\" style=\"color:#333333; font-size: 13px; font-weight:bolder;\">"); str.Append("推荐的资源与您的需求非常匹配,请及时把握商机。</td>"); str.Append(" <td width=\"24%\"><a href=\"http://member.topfo.com/Login.aspx?ReturnUrl=%2fPublish%2fpublishNavigate.aspx\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/tt_08.jpg\" width=\"100\" border=\"0\" height=\"25\"></a></td>"); str.Append("</tr></table></td><td>"); str.Append("<div align=\"right\"><img src=\"http://www.topfo.com/ADPage/yjtg/index_06.jpg\" width=\"29\" height=\"82\" alt=\"\">"); str.Append("</div></td>"); str.Append("</tr><tr>"); str.Append("<td colspan=\"3\" valign=\"top\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_07.jpg\" width=\"668\" height=\"21\" alt=\"\">"); str.Append("</td></tr><tr><td colspan=\"3\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_08.jpg\" width=\"668\" height=\"38\" alt=\"\">"); str.Append("</td></tr><tr><td>"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_09.jpg\" width=\"25\" height=\"124\" alt=\"\">"); str.Append("<td background=\"http://www.topfo.com/ADPage/yjtg/index_10.jpg\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); str.Append("<tr><td style=\"color:#b40000; font-size:16px; font-weight:bolder;\">" + title + "</td></tr>"); str.Append("<tr><td style=\"font-size:12px; line-height:18px; padding-top:5px;\">"); str.Append("<strong>项目摘要:</strong>"); str.Append(descript); str.Append("<span style=\"padding-left:30px;\"><a href=\"http://www.topfo.com/" + htmlFile + "\"><img src=\"http://www.topfo.com/ADPage/yjtg/tt_17.jpg\" width=\"74\" height=\"21\"></a></span>"); str.Append("</td></tr> </table></td>"); str.Append("<td><div align=\"right\"><img src=\"http://www.topfo.com/ADPage/yjtg/index_17.jpg\" width=\"29\" height=\"124\" alt=\"\">"); str.Append("</div></td></tr><tr><td colspan=\"3\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_13.jpg\" width=\"668\" height=\"28\" alt=\"\">"); str.Append("</td></tr><tr><td colspan=\"3\">"); str.Append("<img src=\"http://www.topfo.com/ADPage/yjtg/index_19.jpg\" width=\"668\" height=\"80\" alt=\"\">"); str.Append("</td></tr></table><map name=\"Map\">"); str.Append("<area shape=\"rect\" coords=\"10,9,209,68\" href=\"www.topfo.com\"><area shape=\"rect\" coords=\"170,72,527,153\" href=\"www.topfo.com\">"); str.Append("</map></body></html>"); str.Append("</body>"); str.Append("</heat>"); str.Append("</html>"); #endregion string MialAddress = dataRow["email"].ToString().Trim(); //"*****@*****.**"; string Mailtitle = title; string MailMessage = str.ToString(); bool statu = send.SendEmailMsg(MialAddress, Mailtitle, MailMessage); 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 = "email短信"; model.Sid = id; bll.Insert(model); } str.Remove(0, str.Length); } }
/// <summary> /// 判断发送消息的类型 /// </summary> /// <param name="dal">业务层</param> /// <param name="descript">发送内容</param> /// <param name="htmlFile">显示的地址</param> /// <param name="CurrPage">当前页</param> /// <param name="TotalCount">总记录数</param> /// <param name="Promotioncount">推广的数量</param> /// <param name="SubscribeType">推广的类型</param> /// <param name="strWhere">推广的条件</param> /// <param name="countTatol">推广提取的条数</param> private void SendSummey(Tz888.BLL.Conn dal, string descript, string htmlFile, ref long CurrPage, ref long TotalCount, string[] Promotioncount, string[] SubscribeType, ref string strWhere, ref int countTatol) { string type = ""; Tz888.BLL.SubscribeSet bll = new Tz888.BLL.SubscribeSet(); for (int j = 0; j < SubscribeType.Length - 1; j++) { if (SubscribeType[j].Equals("1") && SubscribeType[j] != "") //判断是属于哪个类型(站内短信) { if (Promotioncount[j] != "") { countTatol = Convert.ToInt32(Promotioncount[j]); //得到哪种类型下的推广数量 DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount); if (dt != null) { if (dt.Rows.Count > 0) { if (countTatol <= dt.Rows.Count) { SendLoginNameShort(descript, dt); //执行成功之后更改推广类型,是为了避免下次再次发信息 site = true; if (email && phone)//最后一次 { type = ",,,"; } else if (email)//第二次 { type = ",,3,"; } else if (phone) { type = ",2,,"; } else { type = SubType.Substring(SubType.IndexOf(",")); } bll.Update(id, type); type = ""; } } } } } if (SubscribeType[j].Equals("2") && SubscribeType[j] != "") //判断是属于哪个类型(Email) { if (Promotioncount[j] != "") { countTatol = Convert.ToInt32(Promotioncount[j]); //得到哪种类型下的推广数量 DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount); if (dt != null) { if (dt.Rows.Count > 0) { if (countTatol <= dt.Rows.Count) { SendEmailShort(descript, htmlFile, dt); email = true; if (site && phone) //最后一次 { type = ",,,"; } else if (site)//如果是第二次 { type = ",,3,"; } else if (phone) { type = "1,,,"; } else //第一次 { //1,,3, type = SubType.Substring(0, SubType.IndexOf("2")) + SubType.Substring(SubType.IndexOf("2") + 1, 2); } bll.Update(id, type); type = ""; } } } } } if (SubscribeType[j].Equals("3") && SubscribeType[j] != "") //判断是属于哪个类型(phone) { if (Promotioncount[j] != "") { countTatol = Convert.ToInt32(Promotioncount[j]); //得到哪种类型下的推广数量 DataTable dt = dal.GetList("showLoginMember_getList", "loginID", "*", strWhere, "NEWID()", ref CurrPage, countTatol, ref TotalCount); if (dt != null) { if (dt.Rows.Count > 0) { if (countTatol <= dt.Rows.Count) { SendPhoneShort(descript, dt); phone = true; if (site && email) //在本次循环中是最后一次执行 { type = ",,,"; } else if (site) //在本次循环中是第二次执行 { type = ",2,,"; } else if (email) { type = "1,,,"; } else { type = SubType.Substring(0, SubType.IndexOf("3")) + ","; } bll.Update(id, type); type = ""; } } } } } } PromotionType(); strWhere = ""; strWhere = ViewState["strWhere"].ToString(); }
protected void Button1_Click(object sender, EventArgs e) { #region int phone = 0; int email = 0; if (Zone.CapitalInfoAreaModels.Count == 0) { lblMsg.Text = "你选择你要推广的区域"; Zone.CapitalInfoAreaModels.Clear(); return; } if (chkType.SelectedValue == "") { lblMsg.Text = "请至少选择一个受众需求"; return; } if (!cbkPhone.Checked && !cbkShort.Checked) { lblMsg1.Text = "请至少选择一个推广方式"; return; } if (txtPromotionShortSum.Text.Trim() == "0") { lblMsg1.Text = "推广数量不能为零"; return; } if (cbkShort.Checked && string.IsNullOrEmpty(txtPromotionShortSum.Text.Trim())) { lblMsg1.Text = "请输入你要推广的数量"; return; } if (txtPromotionShortSum.Text.IndexOf("-") != -1) { lblMsg1.Text = "推广的数量只能为整数"; return; } try { email = int.Parse(txtPromotionShortSum.Text.Trim()); } catch (Exception) { lblMsg1.Text = "推广数量只能为整数"; return; } if (txtPromotionPhoneSum.Text.Trim() == "0") { lblMsg1.Text = "推广数量不能为零"; return; } if (txtPromotionPhoneSum.Text.IndexOf("-") != -1) { lblMsg1.Text = "推广的数量只能为整数"; return; } if (cbkPhone.Checked && string.IsNullOrEmpty(txtPromotionPhoneSum.Text.Trim())) { lblMsg1.Text = "请输入你要推广的数量"; return; } if (!cbkPhone.Checked && txtPromotionPhoneSum.Text.Trim() != "") { lblMsg1.Text = "请选中您的推广方式"; return; } try { if (txtPromotionPhoneSum.Text == "") { txtPromotionPhoneSum.Text = "0"; } else { phone = int.Parse(txtPromotionPhoneSum.Text.Trim()); } } catch (Exception) { lblMsg1.Text = "推广数量只能为整数"; return; } #endregion Tz888.BLL.SubscribeSet dal = new Tz888.BLL.SubscribeSet(); Tz888.Model.SubscribeSet model = new Tz888.Model.SubscribeSet(); List <Tz888.Model.Common.IndustryModel> industryModel = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表 List <Tz888.Model.Info.CapitalInfoAreaModel> AreaModel = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); //投资区域信息实体列表 model.LoginName = loginname; model.objectGradeID = rabGradeID.SelectedValue.ToString(); string type = ""; string matype = ""; for (int i = 0; i < chkType.Items.Count; i++) { if (chkType.Items[i].Selected) { switch (chkType.Items[i].Value.ToString()) { case "2001": //政府招商机构 matype += "2001,"; break; case "2002": //投资方 matype += "2002, "; break; case "2003": //项目方 matype += "2003,"; break; case "2004": //中介机构 matype += "2004,"; break; case "2006": //中介机构 matype += "2006,"; break; default: break; } type += chkType.Items[i].Value.ToString() + ","; } } model.ManageTypeId = matype; model.objectNeed = type; AreaModel = this.Zone.CapitalInfoAreaModels; //industryModel = this.Industry.IndustryModels; for (int i = 0; i < AreaModel.Count; i++) { model.CountryCode += AreaModel[i].CountryCode + ","; model.ProvinceID += AreaModel[i].ProvinceID + ","; model.CityID += AreaModel[i].CityID + ","; model.CountyID += AreaModel[i].CountyID + ","; } string industry = ""; for (int j = 0; j < industryModel.Count; j++) { industry += industryModel[j].IndustryBID + ","; } model.Industry = industry; //2010-06-18 if (cbkShort.Checked) { model.SubscribeType += "1,2" + ","; //站内短信 model.Promotioncount += txtPromotionShortSum.Text.Trim() + "," + txtPromotionShortSum.Text.Trim() + ","; } else { model.SubscribeType += ","; //站内短信 model.Promotioncount += ","; } if (cbkPhone.Checked) { model.SubscribeType += "3,"; //手机短信 model.Promotioncount += txtPromotionPhoneSum.Text.Trim() + ","; } else { model.SubscribeType += ","; //手机短信 model.Promotioncount += ","; } model.SubscribeCount = phone + email; int totalPrice = phone * 1 + email * 1; //end bool b = false; int id = 0; for (int i = 0; i < InfoIDArrList.Length; i++) { if (InfoIDArrList[i].ToString() != "") { model.InfoID = Convert.ToInt32(InfoIDArrList[i]); id = 0; b = dal.SendSet1(model, out id); } } if (b) { //2010-06-18新增 Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL(); bll.UpdatePromotionStatu(long.Parse(InfoID), 1); Response.Redirect("order_item_promotion.aspx?smscount=" + Server.UrlEncode(model.SubscribeCount.ToString()) + "&price=" + totalPrice + "&Id=" + id, false); //Response.Redirect("http://union2.topfo.com/IndexUnion.aspx"); //Tz888.Common.MessageBox.ResponseScript(this.Page, "alert('设置成功!'),window.close();"); } }