private void EditCompany(Company company)
        {
            CustomerDetailsControl details = new CustomerDetailsControl(company.CompanyType.Type);
            details.DataContext = company;

            if (details.ShowDialog() == true)
            {
                DBResources.Instance.Save();
            }
        }
Exemplo n.º 2
0
        private Company NewCompany(string type, string companyName)
        {

            CustomerDetailsControl details = new CustomerDetailsControl(type);
            Company newCompany = new Company();
            newCompany.Name = companyName;
            details.DataContext = newCompany;
            if (details.ShowDialog() == true)
            {
                return DBResources.Instance.SaveNewCompany(newCompany, type);
            }
           
            return null;
        }
 private bool EditSupplier(Company company)
 {
     CustomerDetailsControl details = new CustomerDetailsControl("Supplier");
     details.DataContext = company;
     if (details.ShowDialog() == true)
     {
         DBResources.Instance.Save();
         return true;
     }
     return false;
 }