private void LoadProjects() { try { ProjectsViewList.Items.Clear(); ClientTasksController.GetProjectsItemList(Unit, MyClient.Id).ForEach(item => ProjectsViewList.Items.Add(item)); } catch (Exception) { MessageBox.Show("Error loading the projects, please try again later: "); } }
private void LoadTasks() { try { TasksViewList.Items.Clear(); ClientTasksController.GetTasksItemList(Unit, SelectedProject.Project_ID).ForEach(item => TasksViewList.Items.Add(item)); } catch (Exception) { MessageBox.Show("Error loading tasks, please select a project"); } }
private void ProjectName_Click(object sender, EventArgs e) { ProjectsViewList.Items.Clear(); try { ClientTasksController.GetProjectsByInput(Unit, InputTextBox.Text, MyClient.Id).ForEach(item => ProjectsViewList.Items.Add(item)); } catch (Exception) { MessageBox.Show("Error loading projects from Database"); } }