public void Reset() { BasisWeight = false; BurstStrength = false; Caliper = false; FeetPerMin = false; MoistureContent = false; OutTurnForm = false; TensileStrength = false; WaterImmersion = false; ZDT = false; AllDates = false; StartDate = null; EndDate = null; AllDatesChk(); SelectedEmployees.Clear(); EmployeeSelectAll = true; SelectedDepartments.Clear(); DepartmentSelectAll = true; SelectedFunctions.Clear(); FunctionSelectAll = true; NotifyOfPropertyChange(() => CanPrint); NotifyOfPropertyChange(() => CanReset); }
public void RemoveFunction() { AvailableFunctions.Add(SelectedFunctionToRemove); SelectedFunctions.Remove(SelectedFunctionToRemove); NotifyOfPropertyChange(() => SelectedFunctions); NotifyOfPropertyChange(() => CanPrint); NotifyOfPropertyChange(() => CanReset); }
private void AddOperations(HashSet <IEdmAction> allActions, HashSet <IEdmFunction> allFunctions, OperationSegment operationSegment) { foreach (IEdmOperation operation in operationSegment.Operations) { IEdmAction action = operation as IEdmAction; if (action != null && allActions.Contains(action)) { SelectedActions.Add(action); } IEdmFunction function = operation as IEdmFunction; if (function != null && allFunctions.Contains(function)) { SelectedFunctions.Add(function); } } }
//选中 /// <summary> /// 选中 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSelect_Click(object sender, EventArgs e) { if (gridViewUnSel.RowCount <= 0 || gridViewUnSel.SelectedRows.Count <= 0) { return; } var rightFunction = gridViewUnSel.SelectedRows[0].DataBoundItem as RightFunction; if (rightFunction == null) { return; } NotSelectedFunctions.Remove(rightFunction); SelectedFunctions.Add(rightFunction); BindingGridView(); CurrentOperationStatus = OperationStatus.Edit; }
private void gridViewSel_KeyDown(object sender, KeyEventArgs e) { if (gridViewSel.RowCount <= 0) { return; } if (gridViewSel.SelectedRows.Count <= 0) { return; } var rightFunction = gridViewSel.SelectedRows[0].DataBoundItem as RightFunction; if (rightFunction == null) { return; } CurrentOperationStatus = OperationStatus.Edit; var rowIndex = gridViewSel.SelectedRows[0].Index; if (e.KeyCode == Keys.F5) { if (rowIndex <= 0) { return; } SelectedFunctions.Remove(rightFunction); SelectedFunctions.Insert(rowIndex - 1, rightFunction); } if (e.KeyCode == Keys.F6) { if (rowIndex >= gridViewSel.RowCount - 1) { return; } SelectedFunctions.Remove(rightFunction); SelectedFunctions.Insert(rowIndex + 1, rightFunction); } BindingGridView(); }
public void Print() { DateTime?startDate; DateTime?endDate; string empoloyees; string departments; string functions; startDate = StartDate; endDate = EndDate; empoloyees = String.Join(", ", SelectedEmployees.Select(o => o.Id)); departments = String.Join(", ", SelectedDepartments.Select(o => o.Id)); functions = String.Join(", ", SelectedFunctions.Select(o => o.Id)); ReportResults = new BindableCollection <ReportResultsModel>(GlobalConfig.Connection.GetReportResults(startDate, endDate, empoloyees, departments, functions)); //EventAggregationProvider.OutTurnEventAggregator.PublishOnUIThread(ReportResults); GetReportToPrint(); manager.ShowDialog(new ReportShowViewModel(ReportResults, reportName), null, null); }
//构造删除的数据 /// <summary> /// 构造删除的数据 /// </summary> private List <RightLkFunctionGroup> BuildDeleteEntity() { var deleteList = new List <RightLkFunctionGroup>(); var groupSysid = UI.GetValue(ddlFunctionGroup); for (var i = 0; i < _selectedFunctionsInDb.Count; i++) { var rightFunction = _selectedFunctionsInDb[i]; var findInDb = SelectedFunctions.FindAll(p => p.Sysid == rightFunction.Sysid); if (findInDb.Count > 0) { continue; } var rightLKFunctionGroup = new RightLkFunctionGroup { GroupSysid = groupSysid, FunctionSysid = rightFunction.Sysid, Sequence = rightFunction.Sequence }; deleteList.Add(rightLKFunctionGroup); } return(deleteList); }