private void gcApplyQuery_MouseDoubleClick(object sender, MouseEventArgs e) { ColumnView cv = (ColumnView)gcApplyQuery.FocusedView; FuelDataModel.VehicleBasicInfo vbi = (FuelDataModel.VehicleBasicInfo)cv.GetFocusedRow(); if (vbi == null) { return; } // 弹出详细信息窗口 JbxxViewForm jvf = new JbxxViewForm(); setControlValue(jvf, "tbvin", vbi.App_Vin, false); setControlValue(jvf, "tbQcscqy", vbi.Qcscqy, false); setControlValue(jvf, "tbJkqczjxs", vbi.Jkqczjxs, false); setControlValue(jvf, "tbClxh", vbi.Clxh, false); setControlValue(jvf, "tbClzl", vbi.Clzl, false); setControlValue(jvf, "tbRllx", vbi.Rllx, false); setControlValue(jvf, "tbZczbzl", vbi.Zczbzl.ToString(), false); setControlValue(jvf, "tbZgcs", vbi.Zgcs.ToString(), false); setControlValue(jvf, "tbLtgg", vbi.Ltgg, false); setControlValue(jvf, "tbZj", vbi.Zj.ToString(), false); setControlValue(jvf, "tbClzzrq", vbi.Clzzrq.ToString(), false); setControlValue(jvf, "tbTymc", vbi.Tymc, false); setControlValue(jvf, "tbYyc", vbi.Yyc, false); setControlValue(jvf, "tbZwps", vbi.Zwps.ToString(), false); setControlValue(jvf, "tbZdsjzzl", vbi.Zdsjzzl.ToString(), false); setControlValue(jvf, "tbEdzk", vbi.Edzk.ToString(), false); setControlValue(jvf, "tbLj", vbi.Lj.ToString(), false); setControlValue(jvf, "tbQdxs", vbi.Qdxs, false); setControlValue(jvf, "tbJyjgmc", vbi.Jyjgmc, false); setControlValue(jvf, "tbJybgbh", vbi.Jybgbh, false); // 获取燃料信息 FuelDataModel.RllxParamEntity[] rpelist = this.rpeht[vbi.App_Vin]; for (int i = 0; rpelist != null && i < rpelist.Length; i++) { FuelDataModel.RllxParamEntity rpe = rpelist[i]; setControlValue(jvf, rpe.Param_Code, rpe.Param_Value, false); } (jvf.Controls.Find("tc", true)[0] as XtraTabControl).SelectedTabPageIndex = 0; jvf.MaximizeBox = false; jvf.MinimizeBox = false; Utils.SetFormMid(jvf); jvf.setVisible("btnbaocun", false); jvf.setVisible("btnbaocunshangbao", false); jvf.setVisible("btnPrint", false); jvf.ShowDialog(); }
private int GetDataFromService(int pageNum) { if (!Utils.CheckUser()) { return(-1); } // 验证查询时间:结束时间不能小于开始时间 if (!this.VerifyStartEndTime()) { MessageBox.Show("结束时间不能小于开始时间", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(-1); } try { SplashScreenManager.ShowForm(typeof(DevWaitForm)); FuelDataService.VehicleBasicInfo[] queryInfoArr = service.QueryApplyUpdateInfo(Utils.userId, Utils.password, pageNum, 20, tbVin.Text, tbClxh.Text, tbClzl.Text, cbRllx.Text, dtStartTime.Text, dtEndTime.Text, this.GetTimeType()); if (queryInfoArr != null && queryInfoArr.Length > 0) { List <FuelDataModel.VehicleBasicInfo> vbis = Utils.FuelInfoS2C(queryInfoArr); for (int i = 0; i < vbis.Count; i++) { FuelDataModel.VehicleBasicInfo vbi = vbis[i]; if (rpeht.ContainsKey(vbi.App_Vin)) { rpeht.Remove(vbi.App_Vin); } rpeht.Add(vbi.App_Vin, vbi.EntityList); vbi.EntityList = null; } dataCount = queryInfoArr.Length; this.gcApplyQuery.DataSource = vbis; this.gvApplyQuery.BestFitColumns(); return(vbis.Count); } else { this.gcApplyQuery.DataSource = null; return(0); } } catch (Exception ex) { MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { SplashScreenManager.CloseForm(); } return(-1); }