private void QueryEquInspectionStatisticDetail(EquInspectionQueryCondition loadcondition) { //List<EquipmentInspection> equs = StatisticHelper.QueryEquipmentInspections(loadcondition); //EquipmentInspectionListControl equInsplstcontrol = new EquipmentInspectionListControl(); //equInsplstcontrol.DataContext = equs; //SetStatisticDetailControl(equInsplstcontrol); }
/// <summary> /// 查询设备检测 /// </summary> /// <param name="loadcondition"></param> /// <returns></returns> internal static List <EquipmentInspection> GetEquipmentInspections(EquInspectionQueryCondition loadcondition) { return(PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA_FreqStation, List <EquipmentInspection> >(channel => { return channel.GetEquipmentInspections(loadcondition); })); }
/// <summary> /// 初始化查询条件 /// </summary> private void InitCondition(EquInspectionQueryCondition queryCondition) { lstboxCheckState.UnSelectAll(); if (queryCondition.CheckState.Count > 0) { List <CheckStateEnum> checkstate = queryCondition.CheckState; foreach (KeyValuePair <CheckStateEnum, string> item in lstboxCheckState.ItemsSource as Dictionary <CheckStateEnum, string> ) { if (checkstate.Contains(item.Key)) { lstboxCheckState.SelectedItems.Add(item); } } } lstboxSendlicense.UnSelectAll(); if (queryCondition.SendLicense.Count > 0) { List <SendLicenseEnum> sendlicense = queryCondition.SendLicense; foreach (KeyValuePair <SendLicenseEnum, string> item in lstboxSendlicense.ItemsSource as Dictionary <SendLicenseEnum, string> ) { if (sendlicense.Contains(item.Key)) { lstboxSendlicense.SelectedItems.Add(item); } } } }
/// <summary> /// 查询设备 /// </summary> /// <param name="condition"></param> private void GetEquInspections(EquInspectionQueryCondition condition) { condition.ActivityGuid = this.CurrentActivityPlace.ActivityGuid; condition.PlaceGuid = this.CurrentActivityPlace.Guid; List <EquipmentInspection> sources = FreqStationHelper.GetEquipmentInspections(condition); equipmentInspectionListControl.DataContext = sources; }
public EquipmentInspectionQueryDialog(EquInspectionQueryCondition condition) { InitializeComponent(); QueryCondition = condition; this.DataContext = QueryCondition; InidData(); InitCondition(QueryCondition); }
private void BtnQuery_Click(object sender, RoutedEventArgs e) { if (OnQueryEvent != null) { EquInspectionQueryCondition condition = GetEquInspectionQueryCondition(); OnQueryEvent(condition); this.Close(); } }
/// <summary> /// 查询设备检测 /// </summary> /// <param name="loadcondition"></param> /// <returns></returns> public static List <EquipmentInspection> QueryEquipmentInspections(EquInspectionQueryCondition loadcondition) { //return PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke<I_CO_IA_FreqStation, List<EquipmentInspection>>(channel => //{ // return channel.GetEquipmentInspections(loadcondition); //}); return(null); }
public StationPlanViewNew() { InitializeComponent(); EquInspectionQueryCondition condition = new EquInspectionQueryCondition() { ActivityGuid = SystemLoginService.CurrentActivity.Guid, PlaceGuid = SystemLoginService.CurrentActivityPlace.Guid }; this.DataContext = DataOperator.GetEquipmentInspections(condition); this.DataContextChanged += EquipmentInspectionListControl_DataContextChanged; }
private ActivityEquipment[] GetActivityEquipmentByFreqRange(double p_freqStart, double p_freqEnd) { EquInspectionQueryCondition condition = new EquInspectionQueryCondition(); condition.CheckState = (new CheckStateEnum[] { CheckStateEnum.Qualified }).ToList(); condition.ActivityGuid = SystemLoginService.CurrentActivity.Guid; condition.PlaceGuid = SystemLoginService.CurrentActivityPlace.Guid; condition.SendFreqLittle = p_freqStart; condition.SendFreqGreat = p_freqEnd; return(DataOperator.GetEquipmentInspections(condition).Select(p => p.ActivityEquipment).ToArray()); //EquipmentLoadStrategy strategy = GetEquipmentLoadStrategy(p_freqStart, p_freqEnd); //return DataOperator.GetEquipments(strategy); }
private void LoadEquipmentsForOrg() { var item = xDataGrid.SelectedItem; Organization organization = item as Organization; //EquipmentLoadStrategy eququerycondition = new EquipmentLoadStrategy(); //eququerycondition.OrgName = organization.Name; //eququerycondition.ActivityGuid = SystemLoginService.CurrentActivity.Guid; //eququerycondition.PlaceGuid = SystemLoginService.CurrentActivityPlace.Guid; //Equipments = DataOperator.GetActivityEquipments(eququerycondition); EquInspectionQueryCondition condition = new EquInspectionQueryCondition(); condition.CheckState = (new CheckStateEnum[] { CheckStateEnum.Qualified }).ToList(); condition.ORGName = organization.Name; condition.ActivityGuid = SystemLoginService.CurrentActivity.Guid; condition.PlaceGuid = SystemLoginService.CurrentActivityPlace.Guid; Equipments = DataOperator.GetEquipmentInspections(condition).Select(p => p.ActivityEquipment).ToArray(); xTestDataGrid.ItemsSource = Equipments; this.UpdateLayout(); }
private EquInspectionQueryCondition GetEquInspectionQueryCondition() { EquInspectionQueryCondition condition = this.DataContext as EquInspectionQueryCondition; List <CheckStateEnum> checkstates = new List <CheckStateEnum>(); foreach (KeyValuePair <CheckStateEnum, string> checkstate in this.lstboxCheckState.SelectedItems) { checkstates.Add(checkstate.Key); } condition.CheckState = checkstates; List <SendLicenseEnum> sendlicenses = new List <SendLicenseEnum>(); foreach (KeyValuePair <SendLicenseEnum, string> sendlicense in this.lstboxSendlicense.SelectedItems) { sendlicenses.Add(sendlicense.Key); } condition.SendLicense = sendlicenses; return(condition); }
private void querydialog_OnQueryEvent(EquInspectionQueryCondition obj) { this.QueryCondition = obj; GetEquInspections(obj); }
/// <summary> /// 单元格单击事件 /// </summary> /// <param name="condition"></param> /// <param name="placeguid"></param> private void statisticListControl_OnCellClick(StatisticDataSource datasource, string placeguid) { string activityguid = CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid; EquipmentLoadStrategy equloadstrategy; string condition = datasource.Group; switch (StatisticType) { #region 设备和台站 case StatisticTypes.ORGAndEQUStatisticType: equloadstrategy = new EquipmentLoadStrategy(); equloadstrategy.ActivityGuid = activityguid; equloadstrategy.PlaceGuid = placeguid; equloadstrategy.OrgName = condition; QueryEQUStatisticDetail(equloadstrategy); break; #endregion #region 周围台站 case StatisticTypes.SurroundStatStatisticType: QuerySurroundStatStatisticDetail(activityguid, placeguid, condition); break; #endregion #region 频率指配 case StatisticTypes.FreqAssignStatisticType: equloadstrategy = new EquipmentLoadStrategy(); equloadstrategy.ActivityGuid = activityguid; equloadstrategy.PlaceGuid = placeguid; QueryFreqAssignStatisticDetail(equloadstrategy, condition); break; #endregion #region 设备检测 case StatisticTypes.EquInspectionSticType: EquInspectionQueryCondition loadcondition = new EquInspectionQueryCondition(); loadcondition.ActivityGuid = activityguid; loadcondition.PlaceGuid = placeguid; InspectionStateEnum state; if (Enum.TryParse(condition, out state)) { switch (state) { case InspectionStateEnum.总数: loadcondition.CheckState = new List <CheckStateEnum>() { }; break; case InspectionStateEnum.检测通过: loadcondition.CheckState = new List <CheckStateEnum>() { CheckStateEnum.Qualified }; break; case InspectionStateEnum.检测未通过: loadcondition.CheckState = new List <CheckStateEnum>() { CheckStateEnum.UnQualified }; break; case InspectionStateEnum.未检测: loadcondition.CheckState = new List <CheckStateEnum>() { CheckStateEnum.UnCheck }; break; } QueryEquInspectionStatisticDetail(loadcondition); } break; #endregion #region 人员预案 case StatisticTypes.PersonPlanStatisticType: string orgguid = datasource.GroupGuid; if (orgguid == "total") { orgguid = string.Empty; } string type = placeguid; switch (type) { //case "设备": // EquList equlst = new EquList(); // equlst.OrgID = orgguid; // SetStatisticDetailControl(equlst); // break; //case "人员": // PersonList personlist = new PersonList(); // personlist.OrgID = orgguid; // SetStatisticDetailControl(personlist); // break; //case "车辆": // VehicleList vehiclelst = new VehicleList(); // vehiclelst.OrgID = orgguid; // SetStatisticDetailControl(vehiclelst); // break; } break; #endregion } }