예제 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="companiesTabViewModel">Company tab view Model </param>
 /// <param name="companyEditWindow"> Company edit window</param>
 /// <param name="company">Company</param>
 public CompanyEditWindowViewModel(CompaniesTabViewModel companiesTabViewModel,
     CompanyEditWindow companyEditWindow, Company company)
     : base(companiesTabViewModel, companyEditWindow, company)
 {
     using (var con = new BaudiDbContext())
     {
         SpecializationList = con.Specializations.ToList();
         if (Update)
         {
             Company = con.Companies.Find(company.CompanyID);
             Company.Specializations.ForEach(s => s.IsSelected = true);
         }
         else
         {
             Company = new Company();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Edit action
 /// </summary>
 public override void Edit()
 {
     var companyEditWindow = new CompanyEditWindow(this, SelectedCompany);
     companyEditWindow.Show();
 }
예제 #3
0
 /// <summary>
 /// Add action
 /// </summary>
 public override void Add()
 {
     var companyEditWindow = new CompanyEditWindow(this, null);
     companyEditWindow.Show();
 }