/// <summary> /// Opens The Add Company Window /// </summary> private void AddCompany() { Company c = new Company(); CompanyCreation aec = new CompanyCreation(ref c, Enum.EditMode.New); aec.ShowDialog(); if (aec.Exit == Enum.ExitStatus.Ok) { Companies.Instance.AddObject(aec.Company); RefreshListView(); MarkUnsaved(); } }
/// <summary> /// Opens The Edit Company Window /// </summary> private void EditCompany() { Company c = MainWindow.listviewCompanies.SelectedItem as Company; if (c != null) { CompanyCreation aec = new CompanyCreation(ref c, Enum.EditMode.Edit); aec.ShowDialog(); if (aec.Exit == Enum.ExitStatus.Ok) { RefreshListView(); MarkUnsaved(); } } }