コード例 #1
0
ファイル: AddCustomerView.xaml.cs プロジェクト: qq5013/TMS-1
        private void btnAddCustomer_Click(object sender, RoutedEventArgs e)
        {

            if (txtCustomerFullName.Text != string.Empty && txtCustomerAddress.Text != string.Empty && cmbCustomerTaluk.Text != string.Empty && cmbCustomerVillage.Text != string.Empty)
            {
                CUSTOMER customer = new CUSTOMER();
                customer.CUSTOMER_NAME = txtCustomerFullName.Text;
                customer.CONTACT_NO_1 = Convert.ToInt64(txtCustomerContactNo1.Text);
                customer.CUSTOMER_ADDRESS = txtCustomerAddress.Text;
                customer.VILLAGE_ID = Convert.ToInt32(cmbCustomerVillage.SelectedValue);
                customer.STATUS_ID = Convert.ToInt32(cmbCustomerStatus.SelectedValue);
                data.Insert<CUSTOMER>(customer);
                MessageBox.Show("Customer Added Sucessfully");

                Common.ClearAllControls<TextBox>(addCustomer, 1);
                Common.ClearAllControls<ComboBox>(addCustomer);

                BindCustomers();
            }
            else
            {
                MessageBox.Show("Please enter the mandatory fields");
            }

        }
コード例 #2
0
		private void detach_CUSTOMERs(CUSTOMER entity)
		{
			this.SendPropertyChanging();
			entity.VILLAGE = null;
		}
コード例 #3
0
		private void attach_CUSTOMERs(CUSTOMER entity)
		{
			this.SendPropertyChanging();
			entity.VILLAGE = this;
		}
コード例 #4
0
 partial void DeleteCUSTOMER(CUSTOMER instance);
コード例 #5
0
 partial void UpdateCUSTOMER(CUSTOMER instance);
コード例 #6
0
 partial void InsertCUSTOMER(CUSTOMER instance);