private void treeServices_AfterSelect(object sender, TreeViewEventArgs e) { var node = (TreeView)sender; var selected = (SdServiceCategoryDto)node.SelectedNode.Tag; if (selected != null) { lstJobs.Items.Clear(); var jobList = jobView.LoadServiceJobs(selected.ServiceCatId); lstJobs.Items.AddRange(jobList.ToArray()); lstJobs.DisplayMember = AssemblyReflector.GetMemberName((SdServiceJobDto c) => c.Title); } }
private void treeServices_AfterSelect(object sender, TreeViewEventArgs e) { var node = (TreeView)sender; ServiceJobView jobView = new ServiceJobView(); var selected = (SdServiceCategoryDto)node.SelectedNode.Tag; if (selected != null) { var jobList = jobView.LoadServiceJobs(selected.ServiceCatId); lstJobs.DataSource = jobList; lstJobs.DisplayMember = AssemblyReflector.GetMemberName((SdServiceJobDto c) => c.Title); } }
private void treeServices_AfterSelect(object sender, TreeViewEventArgs e) { string s = ""; try { grpOwner.Enabled = false; var node = (TreeView)sender; if (node != null) { var selected = (SdServiceCategoryDto)node.SelectedNode.Tag; if (selected != null) { var jobList = jobView.LoadServiceJobs(selected.ServiceCatId, true); lstJobs.DataSource = jobList; lstJobs.DisplayMember = AssemblyReflector.GetMemberName((SdServiceJobDto c) => c.Title); grpDeviceList.Enabled = selected.HasDevices; btnSelectMenu.Enabled = selected.HasMenus; txtMenu.Enabled = selected.HasMenus; var filter = myView.baseDataPresenter.GetFilter(selected.ServiceCatId); var job = (SdServiceJobDto)lstJobs.SelectedItem; if (job != null) { var catJob = myView.cjPresenter.GetServiceCategoryJob(job.ServiceJobId, selected.ServiceCatId); if (selected.HasDevices) { int objTypeId = -1; if (filter != null) { objTypeId = filter.Objecttypeid ?? -1; } //if (userInfo.ActionId == (int)RequestAction.All) //{ // LoadChartDevice(person.IndependentId.Value, objTypeId); //} //else //{ // LoadPersonDevice(userInfo.PerId, objTypeId); //} LoadPersonDevice(userInfo.PerId, objTypeId); } else { grpDeviceList.Visible = false; } if (!(catJob.IsInserter > 0)) { grpDeviceList.Visible = false; } } } } } catch (Exception ex) { throw ex; } }