private void GetMsgInfo() { decimal MsgId = ReDecimal("MsgId", 0); string DeviceId = ReStr("DeviceId", ""); if (DeviceId == "") { throw new Exception("DeviceId不能为空!"); } bool read = ReBool("read", true); if (MsgId == 0) { throw new Exception("编号不能为空!"); } BLL.MsgBLL bll = new BLL.MsgBLL(); StringBuilder s = new StringBuilder(); if (read) { bll.ReadOneMsg(MsgId, DeviceId); } s.Append(" SELECT * FROM DBMSG.dbo.MsgView WITH(NOLOCK) where MsgId=" + MsgId + " "); DataSet ds = DAL.DalComm.BackData(s.ToString()); DataTable dt = ds.Tables[0]; ReDict.Add("info", JsonHelper.ToJsonNo1(dt)); ReTrue(); }
private void ReadOneMsg() { BLL.MsgBLL bll = new BLL.MsgBLL(); string DeviceId = ReStr("DeviceId", ""); decimal MsgId = ReDecimal("MsgId", 0); bll.ReadOneMsg(MsgId, DeviceId); //BLL.MsgBLL bll = new BLL.MsgBLL(); //DataSet ds = bll.CountMsg(DeviceId); //DataTable dt = ds.Tables[0]; //ReDict.Add("Count", JsonHelper.ToJsonNo1(dt)); //ReDict.Add("ClassCount", JsonHelper.ToJson(ds.Tables[1])); ReTrue(); }
private void CountMsg() { string DeviceId = ReStr("DeviceId", ""); if (DeviceId == "") { throw new Exception("编号不能为空!"); } BLL.MsgBLL bll = new BLL.MsgBLL(); DataSet ds = bll.CountMsg(DeviceId); DataTable dt = ds.Tables[0]; ReDict.Add("Count", JsonHelper.ToJsonNo1(dt)); ReDict.Add("ClassCount", JsonHelper.ToJson(ds.Tables[1])); ReTrue(); }
protected void Page_Load(object sender, EventArgs e) { BLL.MsgBLL bll = new BLL.MsgBLL(); bll.SendMsgToDevice(10, "111111", "CheckOrderToWork", "1", "messager"); }