Exemplo n.º 1
0
        /// <summary>
        /// 推焦开始信号到达后记录的数据ToPushInfoDB
        /// </summary>
        private void PushDataPart1()
        {
            GetJobCar(Communication.CarsLst[0], Communication.CarsLst[1], Addrs.TRoomNumDic);
            PushTime      = DateTime.Now.ToString("G");
            PushPlanIndex = GetIndexOfPushPlan();
            psInfo        = new PsInfo(PushPlanIndex, PushTime, CarNum == 1 ? (Tjc)Communication.CarsLst[0] : (Tjc)Communication.CarsLst[1]);
            //记录到数据库:需注意工作车或非工作推焦车的Info
            PushInfoHelper push = new PushInfoHelper(new DbAppDataContext(Setting.ConnectionStr), psInfo, true);

            push.RecToDB();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 推焦结束信号到达后记录的数据ToPushInfoDB
        /// </summary>
        private void PushDataPart2()
        {
            if (psInfo == null)
            {
                PushDataPart1();
            }
            psInfo.MaxCur  = PushCurMax;
            psInfo.AvgCur  = PushCurAvg;
            psInfo.CurArr  = Convert.ToBase64String(PushCurLst.ToArray());
            psInfo.PoleArr = Convert.ToBase64String(PushPoleLst.ToArray());
            psInfo.EndTime = DateTime.Now;
            //记录到数据库:需注意工作车或非工作推焦车的Info
            PushInfoHelper push = new PushInfoHelper(new DbAppDataContext(Setting.ConnectionStr), psInfo, false);

            push.RecToDB();
            psInfo = null;
        }