private void Query(string hphm, string hpzl) { if (!string.IsNullOrEmpty(hphm) && !string.IsNullOrEmpty(hpzl)) { WindowEditor1.SetVehicleText(hphm.Substring(0, 1)); TxtplateId.Text = hphm.Substring(1); CmbPlateType.Value = hpzl; string plateHead = settingManager.GetConfigInfo("00", "06").Rows[0]["col3"].ToString(); if (hphm.Substring(0, 1).Equals(plateHead.Substring(0, 1))) { url = client.Url; vehicle = new Vehicle(url); VehicleInfo vehicleInfo = vehicle.GetVehicleInfo(hpzl, hphm.Substring(1)); if (vehicleInfo != null) { txtClpp.Text = vehicleInfo.Clpp1; txtCsys.Text = vehicleInfo.Csys; txtCllx.Text = vehicleInfo.Cllx; txtSyxz.Text = vehicleInfo.Syxzms; txtClzt.Text = vehicleInfo.Zt; txtFzjg.Text = vehicleInfo.Fzjg; txtSyr.Text = vehicleInfo.Syr; txtLxdh.Text = vehicleInfo.Lxdh; txtYxqz.Text = vehicleInfo.Yxqz; txtXxdz.Text = vehicleInfo.Zsxxdz; if (vehicleInfo.Ztbh.Equals("A")) { txtClzt.StyleSpec = "color:blue"; } else if (vehicleInfo.Ztbh.Equals("B")) { } else { txtClzt.StyleSpec = "color:red"; } } } else { Notice("信息提示", "该车牌不是本省车牌,无法获取车驾管信息"); } panelChart.AutoLoad.Url = "../Template/WebComplexPieData.aspx?hphm=" + hphm + "&hpzl=" + hpzl; panelChart.Reload(); } else { Notice("信息提示", "不存在号牌信息,无法获取车驾管信息"); } }
/// <summary> /// 重置按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ButResetClick(object sender, DirectEventArgs e) { try { starttime = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); endtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string timeJs = "clearTime('" + starttime + "','" + endtime + "');";//js方法后面的分号一定要加上 this.ResourceManager1.RegisterAfterClientInitScript(timeJs); this.CmbPlateType.Reset(); this.CmbStartStation.Reset(); this.CmbEndStation.Reset(); this.CmbPecType.Reset(); this.TxtplateId.Reset(); this.ChkLike.Reset(); this.CmbDealType.Reset(); this.TxtMinSpeed.Text = ""; this.TxtMaxSpeed.Text = ""; WindowEditor1.SetVehicleText(""); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("PeccancyArea.aspx-ButResetClick", ex.Message + ";" + ex.StackTrace, "ButResetClick has an exception"); } }