Ejemplo n.º 1
0
        private void FillProjectData()
        {
            if (project == null)
            {
                project    = new project();
                project.id = Guid.NewGuid();
            }

            txtID.Text         = project.id.ToString();
            txtName.Text       = project.name;
            txtHourlyRate.Text = project.hourlyrate.ToString();

            IEnumerable <client> clientList = entities.clients.ToList();

            cmbClient.DataSource    = clientList;
            cmbClient.DisplayMember = "clientname";
            cmbClient.SelectedItem  = project.client;

            if (entities.projects.Find(project.id) == null)
            {
                entities.projects.Add(project);
            }
        }
Ejemplo n.º 2
0
 public frmProject()
 {
     InitializeComponent();
     project = new project();
     FillProjectData();
 }