예제 #1
0
        private void ShowSpeedingDetail(CardInvalidEventReport info)
        {
            ClearDetail();

            CardBll  cbll = new CardBll(AppSettings.CurrentSetting.ParkConnect);
            CardInfo card = cbll.GetCardByID(info.CardID).QueryObject;

            if (card == null)
            {
                return;              //没找到卡片,返回
            }
            this.lblCardID.Text     = card.CardID;
            this.lblCarPlate.Text   = card.CarPlate;
            this.lblOwner.Text      = card.OwnerName;
            this.lblDepartment.Text = card.Department;

            if (!string.IsNullOrEmpty(card.CarPlate))
            {
                SpeedingRecordBll     sbll    = new SpeedingRecordBll(AppSettings.CurrentSetting.ParkConnect);
                List <SpeedingRecord> records = sbll.GetRecordsByCarPlate(card.CarPlate).QueryObjects;
                ShowSpeedingRecords(records);
            }

            ucVideoes.ShowVideoes(ParkBuffer.Current.GetEntrance(info.EntranceID).VideoSources);
        }
예제 #2
0
        private int SpeedingProcess()
        {
            int           processCount    = 0;
            CommandResult result          = null;
            OperatorInfo  processOperator = OperatorInfo.CurrentOperator;
            string        processMemo     = this.txtDealMemo.Text.Trim();

            SpeedingRecordBll bll = new SpeedingRecordBll(AppSettings.CurrentSetting.ParkConnect);

            DataGridViewRow[] rows = new DataGridViewRow[this.dgvSpeedingRecord.Rows.Count];
            this.dgvSpeedingRecord.Rows.CopyTo(rows, 0);
            foreach (DataGridViewRow row in rows)
            {
                SpeedingRecord record = row.Tag as SpeedingRecord;
                if (record != null)
                {
                    result = bll.SpeedingProcessing(record, processOperator, DateTime.Now, processMemo);
                    if (result.Result == ResultCode.Successful)
                    {
                        processCount++;
                        this.dgvSpeedingRecord.Rows.Remove(row);
                    }
                }
            }
            return(processCount);
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            SpeedingRecord info = new SpeedingRecord();

            info.SpeedingID       = Guid.NewGuid();
            info.SpeedingDateTime = DateTime.Now;
            info.PlateNumber      = "粤A123ab";
            info.Place            = "A区监测点";
            info.Speed            = "100";
            info.Photo            = @"http://wenwen.soso.com/p/20101016/20101016200301-1077351978.jpg";
            info.Memo             = "逆行";


            SpeedingRecord info1 = new SpeedingRecord();

            info1.SpeedingID       = Guid.NewGuid();
            info1.SpeedingDateTime = DateTime.Now;
            info1.PlateNumber      = "粤A456ab";
            info1.Place            = "B区测速点";
            info1.Speed            = "150";
            info1.Photo            = @"http://img2.duitang.com/uploads/item/201209/20/20120920165508_EuenZ.jpeg";
            info1.Memo             = "超速";

            SpeedingRecordBll bll    = new SpeedingRecordBll(AppSettings.CurrentSetting.ParkConnect);
            CommandResult     result = bll.Insert(info);

            if (result.Result != ResultCode.Successful)
            {
                MessageBox.Show(result.Message);
            }
            else
            {
                MessageBox.Show(result.Result.ToString());
            }
            result = bll.Insert(info1);
            if (result.Result != ResultCode.Successful)
            {
                MessageBox.Show(result.Message);
            }
            else
            {
                MessageBox.Show(result.Result.ToString());
            }
        }
예제 #4
0
        private bool SpeedingRecordSearching(RecordSearchCondition con)
        {
            SpeedingRecordBll bll = new SpeedingRecordBll(AppSettings.CurrentSetting.ParkConnect);
            QueryResultList <SpeedingRecord> result = bll.GetRecords(con);

            if (result.Result == ResultCode.Successful)
            {
                List <SpeedingRecord> items = result.QueryObjects;
                foreach (SpeedingRecord item in items)
                {
                    int row = this.dgvSpeedingRecord.Rows.Add();
                    ShowSpeedingRecordOnRow(this.dgvSpeedingRecord.Rows[row], item);
                }
                return(true);
            }
            else
            {
                MessageBox.Show(result.Message);
            }
            return(false);
        }