public string ToString() { string retStr = ""; retStr += "时间:" + CreateTime.AsDateTime.AddHours(8).ToString("yyyy-MM-dd HH:mm:ss") + " "; retStr += "车型:" + vehicle.Clpp + " "; retStr += "车牌:" + vehicle.Hphm + " "; foreach (var item in VehicleDictList.GetInstance().GetVehicleTypeList()) { if (item.SYSDICT_CODE == vehicle.Cllx) { retStr += "车辆类型:" + item.SYSDICT_NAME + " "; break; } } retStr += "行为特征:"; foreach (var item in VehicleDictList.GetInstance().GetVehicleXwtz()) { if (vehicle.Xwtz.Contains(item.SYSDICT_CODE)) { retStr += item.SYSDICT_NAME + " "; } } return(retStr); }
private void simpleButtonChoosePic_Click(object sender, EventArgs e) { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Title = "请选择要图片"; ofd.Filter = "JPG图片|*.jpg|PNG图片|*.png|BMP图片|*.bmp|Gif图片|*.gif"; ofd.CheckFileExists = true; ofd.CheckPathExists = true; ofd.Multiselect = false; if (ofd.ShowDialog() == DialogResult.OK) { mFileName = ofd.FileName; FrmVehChoosePic frmChoosePic = new FrmVehChoosePic(); frmChoosePic.SetImagePath(mFileName); frmChoosePic.ShowDialog(); if (frmChoosePic.DialogResult == System.Windows.Forms.DialogResult.OK) { this.pictureEdit1.Image = frmChoosePic.cropBmp; //objectInfo = frmChoosePic.mObjectInfo; mVehSearchResult = frmChoosePic.mVehResult; nSelectedIndex = frmChoosePic.nSelectedTarget; mSearchFaceBase64 = mVehSearchResult.Veh[nSelectedIndex].Cltzxx; Veh vehicle = mVehSearchResult.Veh[nSelectedIndex]; if (null != vehicle) { mQueryClpp = vehicle.Clpp.Split('-')[0]; string retStr = "车型:" + vehicle.Clpp + " \n"; retStr += "车牌:" + vehicle.Hphm + " \n"; foreach (var item in VehicleDictList.GetInstance().GetVehicleTypeList()) { if (item.SYSDICT_CODE == vehicle.Cllx) { retStr += "车辆类型:" + item.SYSDICT_NAME + " \n"; break; } } retStr += "行为特征:"; int i = 0; foreach (var item in VehicleDictList.GetInstance().GetVehicleXwtz()) { if (vehicle.Xwtz.Contains(item.SYSDICT_CODE)) { if (i++ == 0) { retStr += "" + item.SYSDICT_NAME + "\n"; } else { retStr += " " + item.SYSDICT_NAME + "\n"; } } } labelControlResult.Text = retStr; } } } } }
//年款 private void lookUpEditClzpp_EditValueChanged(object sender, EventArgs e) { string Clzpp = lookUpEditClzpp.EditValue.ToString(); List <HSysDictInfo> m_Clnk = new List <HSysDictInfo>(); m_Clnk = VehicleDictList.GetInstance().GetVehicleClnk(Clzpp); if (null != m_Clnk) { lookUpEditClnk.Properties.DataSource = m_Clnk; lookUpEditClnk.Properties.ShowHeader = false; lookUpEditClnk.ItemIndex = 0; } }
private void GetControlData() { //List<HSysDictInfo> dictinfo = (List<HSysDictInfo>)GlobalContext.GetInstance()["MBYSLIST"]; //dictListClys = dictinfo; //0-行人;1-自行车;2-摩托车;3-电动摩托车;4-三轮车;5-小型车;6-大车;7-开车;8-拖拉机;9-中巴 dictListMblx = VehicleDictList.GetInstance().GetVehicleTypeList(); dictListMbys = VehicleDictList.GetInstance().GetVehicleColorList(); //dictListClpp = VehicleDictList.GetInstance().GetVehiclePpList(); dictListClpp = VehicleDictList.GetInstance().GetVehicleClpp(); dictListXwtz = VehicleDictList.GetInstance().GetVehicleXwtz(); //mAcqCaseInfoList = AcqCaseManager.LoadAcqCaseInfos(); try { this.Invoke(new ShowDataEventHandler(ShowControlData)); } catch { } }
public void GetVehicleListData() { mVehicleObjList.Clear(); mCardTargetList.Clear(); mTargetQuery.PageNumber = 1; mTargetQuery.PageSize = 30; mTargetQuery.PageNumber = pagerVehicle.CurrentPage; mTargetQuery.PageSize = pagerVehicle.RecordsPerPage; //mVehicleCount = VehicleMongoDAL.GetInstance().GetVehicleCount(); mVehicleCount = VehicleMongoDAL.GetInstance().GetVehicleCount(mTargetQuery); //mVehicleObjList = VehicleMongoDAL.GetInstance().GetVehicleList(pagerVehicle.CurrentPage, pagerVehicle.RecordsPerPage); mVehicleObjList = VehicleMongoDAL.GetInstance().GetVehicleList(mTargetQuery); int i = 0; foreach (var vehicleObj in mVehicleObjList) { CardTargetItem itemInfo = new CardTargetItem(); //Image vehImage =Image.FromFile(vehicleObj.ImagePath); //itemInfo.ShowImage = vehImage; Cell cell = new Cell { FieldName = "ShowImage", RowIndex = i++, FileName = vehicleObj.ImagePath, RectBody = vehicleObj.vehicle.Clwz }; LoadImageAsync(cell); itemInfo.PassTime = "时间:" + Convert.ToDateTime(vehicleObj.CreateTime.AsDateTime.AddHours(8)).ToString("yyyy-MM-dd HH:mm:ss"); itemInfo.PlateNo = "车牌:" + vehicleObj.vehicle.Hphm; itemInfo.CrossName = "车型:" + vehicleObj.vehicle.Clpp; foreach (var item in VehicleDictList.GetInstance().GetVehicleTypeList()) { if (item.SYSDICT_CODE == vehicleObj.vehicle.Cllx) { itemInfo.PlateNo += " 类型:" + item.SYSDICT_NAME + " "; break; } } mCardTargetList.Add(itemInfo); } try { this.Invoke(new DelegateBindHandler(BindDataSource)); } catch { } }