async void setTask(ProjectClient project, ProjectTaskClient projTask) { leProjTask.ItemsSource = project.Tasks ?? await project.LoadTasks(api); leProjTask.SelectedItem = projTask; leProjTask.Focus(); }
public CWCreateOrderFromProject(CrudAPI crudApi, bool createOrder, ProjectClient project, ProjectTaskClient projTask = null) : this(crudApi, createOrder) { if (crudApi.CompanyEntity.ProjectTask && project != null) { setTask(project, projTask); lblProjTask.Visibility = leProjTask.Visibility = Visibility.Visible; } }