コード例 #1
0
		private void newCustomerPersonButton_Click( 
			object sender, 
			EventArgs e )
		{
			DBObjects.CustomerPerson item =
				customerPersonComboBox.SelectedItem as
				DBObjects.CustomerPerson;

			DBObjects.CustomerCompany selectedCompany =
				customerCompanyComboBox.SelectedItem as
				DBObjects.CustomerCompany;

			DBObjects.CustomerCompany company = item==null?selectedCompany:item.Company;
			DBObjects.CustomerPerson person = new DBObjects.CustomerPerson();

			CustomerPersonEditForm form = new CustomerPersonEditForm( 
				company,
				person );
			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				FillCustomerPersonList( company );
				FillGroupList( company );
				SelectCustomerPerson( person );
			}
		}
コード例 #2
0
		private void editCustomerPersonButton_Click( 
			object sender, 
			EventArgs e )
		{
			DBObjects.CustomerPerson item =
				customerPersonComboBox.SelectedItem as
				DBObjects.CustomerPerson;

			DBObjects.CustomerCompany company = item.Company;

			CustomerPersonEditForm form = 
				new CustomerPersonEditForm( company, item );
			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				int index = customerPersonComboBox.SelectedIndex;
				FillCustomerPersonList( company );
				FillGroupList( company );
				customerPersonComboBox.SelectedIndex = index;
				UpdateUI();
			}
		}
コード例 #3
0
ファイル: MainForm.cs プロジェクト: mariamorillo02/Zeta2.0
		void newItem_Click( object sender, EventArgs e )
		{
			ToolStripMenuItem item = sender as ToolStripMenuItem;
			DBObjects.CustomerPerson person = item.Tag as DBObjects.CustomerPerson;

			DBObjects.CustomerCompany company = person.Company;

			CustomerPersonEditForm form =
				new CustomerPersonEditForm(
				company,
				person );

			form.ShowDialog( this );
		}
コード例 #4
0
ファイル: MainForm.cs プロジェクト: mariamorillo02/Zeta2.0
		private void newpersonToolStripMenuItem_Click(
			object sender,
			EventArgs e )
		{
			DBObjects.CustomerCompany company =
				customerCompanyTreeView.SelectedNode.Tag as
				DBObjects.CustomerCompany;

			DBObjects.CustomerPerson person =
				new DBObjects.CustomerPerson();

			CustomerPersonEditForm form =
				new CustomerPersonEditForm(
				company,
				person );

			form.ShowDialog( this );
		}
コード例 #5
0
		private void personsListView_DoubleClick( 
			object sender, 
			EventArgs e )
		{
			DBObjects.CustomerPerson person =
				personsListView.SelectedItems[0].Tag as
				DBObjects.CustomerPerson;

			CustomerPersonEditForm form = 
				new CustomerPersonEditForm( item, person );

			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				FillPersonsList();
			}
		}
コード例 #6
0
		private void newToolStripMenuItem_Click( 
			object sender, 
			EventArgs e )
		{
			// Must store parent before adding child.
			Store();

			DBObjects.CustomerPerson person = 
				new DBObjects.CustomerPerson();

			CustomerPersonEditForm form = 
				new CustomerPersonEditForm( item, person );

			if ( form.ShowDialog( this ) == DialogResult.OK )
			{
				FillPersonsList();
			}
		}