Example #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            foreach (var em in EDPCheckHelper.ems)
            {
                EDPCheckHelper.EDPMsg nem = new EDPCheckHelper.EDPMsg();
                nem = EDPCheck.Helper.CheckHelper.PingMachiAsync(em.Key, em.Value).Result;
                string key = em.Key;
                EDPCheckHelper.ems.Remove(key);
                EDPCheckHelper.ems.Add(key, nem);
                switch (nem.Type)
                {
                case 0:
                    break;

                case 1:
                    break;

                case 2:
                    break;

                case 3:
                    break;

                default:
                    break;
                }
            }
        }
Example #2
0
        //回复时提示
        public static void ReBack(EDPCheckHelper.EDPMsg edpm)
        {
            EDPDataDataContext db = new EDPDataDataContext();
            var er = from e in db.T_Err where e.ST == EDPCheckHelper.st.STID && e.MacName == edpm.MacName && e.ReTime == null select e;

            er.LastOrDefault().ReTime = edpm.MsgTime;
            db.SubmitChanges();
        }
Example #3
0
        public static void OK(EDPCheckHelper.EDPMsg edpm)
        {
            T_ErrMsg em = new T_ErrMsg();

            em.ST      = EDPCheckHelper.st.STID;
            em.ErrTime = DateTime.Now;
            em.ErrMsg  = edpm.MacName + ":" + edpm.IP + "的机器报警:网络连接已恢复。恢复时间:" + DateTime.Now.ToString();
            EDPDataDataContext db = new EDPDataDataContext();

            db.T_ErrMsg.InsertOnSubmit(em);
            db.SubmitChanges();
        }
Example #4
0
        //断线时提示
        public static void Back(EDPCheckHelper.EDPMsg edpm)
        {
            T_Err er = new T_Err();

            er.ST      = EDPCheckHelper.st.STID;
            er.MacName = edpm.MacName;
            er.MacIP   = edpm.IP;
            er.ErrTime = edpm.MsgTime;
            EDPDataDataContext db = new EDPDataDataContext();

            db.T_Err.InsertOnSubmit(er);
            db.SubmitChanges();
        }