コード例 #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();
 }