﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CraneAlert.Service;

namespace CraneAlert.message
{
    public partial class SmsSend : System.Web.UI.Page
    {
        private SmsNoticeService service = new SmsNoticeService();
        protected void Page_Load(object sender, EventArgs e)
        {
         

        }

        protected void sendSms(object sender, EventArgs e)
        {
            SmsNotice notice = new SmsNotice();
            notice.SendTime = DateTime.Now;
            notice.SmsContent = this.SmsContent.Text;
            notice.SmsType = this.SmsType.Text;
            notice.SimReceiver = Convert.ToInt32(this.SimReceiver.Text);
            notice.SimCardNo = Convert.ToInt32(this.SimReceiver.Text);
            service.SaveNotice(notice);
            Response.Write("<script>alert('发送成功');window.top.closeDialog();</script>");
        }
    }
}