Example #1
0
		private void newCustomerCompanyButton_Click( 
			object sender, 
			EventArgs e )
		{
			DBObjects.CustomerCompany company = new DBObjects.CustomerCompany();

			CustomerCompanyEditForm form = new CustomerCompanyEditForm( company );
			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				FillCustomerCompanyList();
				SelectCustomerCompany( company );
			}
		}
Example #2
0
		private void editCustomerCompanyButton_Click( 
			object sender, 
			EventArgs e )
		{
			DBObjects.CustomerCompany item = 
				customerCompanyComboBox.SelectedItem as 
				DBObjects.CustomerCompany;

			CustomerCompanyEditForm form = new CustomerCompanyEditForm( item );
			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				int index = customerCompanyComboBox.SelectedIndex;
				FillCustomerCompanyList();
				customerCompanyComboBox.SelectedIndex = index;
				UpdateUI();
			}
		}