using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
///
/// SendMainAndSms 的摘要说明
///
public class SendMainAndSms
{
public SendMainAndSms()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
///
/// 发送内部短信和手机短信
///
/// 内部短信选择框
/// 手机短信选择框
/// 发送消息内容
/// 接收人列表
public static void SendMessage(CheckBox MailChk,CheckBox SmsChk,string ContentStr,string ToUserList)
{
if (SmsChk.Checked == true)
{
//发送手机信息
//Mobile.SendSMS("系统消息", ToUserList, ContentStr);
string WrongUser = Mobile.UserToTel(ToUserList, ContentStr); //发送人名,发送内容
}
string[] UserListStr = ToUserList.Split(',');
for (int i = 0; i < UserListStr.Length; i++)
{
if (MailChk.Checked == true)
{
//发送内部信息
ZWL.BLL.ERPLanEmail MyMail = new ZWL.BLL.ERPLanEmail();
MyMail.EmailContent = ContentStr;
MyMail.EmailState = "未读";
MyMail.EmailTitle = ContentStr;
MyMail.FromUser = "系统消息";
MyMail.FuJian = "";
MyMail.TimeStr = DateTime.Now;
MyMail.ToUser = UserListStr[i].ToString();
MyMail.Add();
}
}
}
public static void SendMobileMessage(string ContentStr, string ToUserList)
{
//发送手机信息
//Mobile.SendSMS("系统消息", ToUserList, ContentStr);
string WrongUser = Mobile.UserToTel(ToUserList, ContentStr); //发送人名,发送内容
}
}