Ejemplo n.º 1
0
        public List <Project> searchById(int id)
        {
            if (id != 0)
            {
                List <Project> projectList = BLProject.GetProjectListById(APCContext, id);

                if (projectList != null)
                {
                    tbId.Text   = projectList[0].Id.ToString();
                    tbName.Text = projectList[0].Name;
                    Client currentClient = BLClient.GetClientByName(APCContext, projectList[0].Client.Name)[0];
                    cbClient.SelectedValue = currentClient.Id;
                    return(projectList);
                }
                else
                {
                    MessageBox.Show("Project Id not found");
                }
            }
            else
            {
                MessageBox.Show("Project Id not found");
            }
            return(null);
        }