Esempio n. 1
0
        private void btnAddCustomer_Click(object sender, RoutedEventArgs e)
        {
            SUPPLIER supplier = new SUPPLIER();

            if (txtFullName.Text != string.Empty && txtAddress.Text != string.Empty && cboSupplierStatus.Text != string.Empty)
            {
                supplier.SUPPLIER_NAME = txtFullName.Text;
                supplier.SUPPLIER_ADDRESS = txtAddress.Text;
                supplier.SUPPLIER_CONTACT_NO = Convert.ToInt64(txtContactNo1.Text);
                supplier.SUPPLIER_TYPE = Convert.ToInt32(cmbSupplierType.SelectedValue);
                supplier.SUPPLIER_STATUS = Convert.ToInt32(cboSupplierStatus.SelectedValue);

                data.Insert<SUPPLIER>(supplier);

                BindSuppliers();

            }
            else
            {
                MessageBox.Show("Please Fill All the mandatory fields");
                return;
            }

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

            MessageBox.Show("Supplier Added Succesfully");
        }
 partial void DeleteSUPPLIER(SUPPLIER instance);
 partial void UpdateSUPPLIER(SUPPLIER instance);
 partial void InsertSUPPLIER(SUPPLIER instance);
		private void detach_SUPPLIERs1(SUPPLIER entity)
		{
			this.SendPropertyChanging();
			entity.MASTER1 = null;
		}
		private void attach_SUPPLIERs(SUPPLIER entity)
		{
			this.SendPropertyChanging();
			entity.MASTER = this;
		}