public void ThreadPort5200() { while (true) { bool res = false; //检测后台端口,充值端口5200 try { GL.ProtocolBack.Bind tbind = MWeb.protobuf.SCmd.Cmd.runClient(new GL.ProtocolBack.Bind(ProtoCmd.Service.ServiceCmd.SC_SELECT_REDEVENLOPE_Q, new byte[0] { })); switch ((ProtoCmd.Service.CenterCmd)tbind.header.CommandID) { case ProtoCmd.Service.CenterCmd.CS_SELECT_REDEVENLOPE_P: res = true; break; case ProtoCmd.Service.CenterCmd.CS_CONNECT_ERROR: res = false; break; } } catch { res = false; } if (!res)//报警 充值端口5500 { TimerBLL.AddTMonitorLog(26); } Thread.Sleep(TMonitorSingle.ExecType * 60 * 1000); } }
public ActionResult DataControlLog() { try { int id = Convert.ToInt32(Request["id"]); int userid = Convert.ToInt32(Request["userid"]); int i = TimerBLL.AddTMonitorLog(id, userid); return(Content(i.ToString())); } catch { return(Content("0")); } }
public void ThreadPort5500() { while (true) { bool res = false; //检测后台端口,充值端口5500 try { ProtoCmd.BackRecharge.normal ServiceNormalS = ProtoCmd.BackRecharge.normal.CreateBuilder() .SetUserID((uint)0) .SetList("") .SetRmb(0) .SetRmbActual(0) .SetFirstGif(false) .SetBillNo("JK001") .Build(); Bind tbind = Cmd.runClient(new Bind(ProtoCmd.BackRecharge.BR_Cmd.BR_NORMAL, ServiceNormalS.ToByteArray())); switch ((CenterCmd)tbind.header.CommandID) { case CenterCmd.CS_NORMAL: res = true; break; case CenterCmd.CS_CONNECT_ERROR: res = false; break; } } catch { res = false; } if (!res)//报警 充值端口5500 { TimerBLL.AddTMonitorLog(25); } Thread.Sleep(TMonitorSingle.ExecType * 60 * 1000); } }