Example #1
0
 public purchaseFromSupllier(List <orderFromSupplierDetailTable> Idlist, ContinueOrderingMessage com)
 {
     InitializeComponent();
     this.Idlist = Idlist;
     this.com    = com;
     EmployeeSelectionComboBox.ItemsSource       = employeeBL.GetAll();
     EmployeeSelectionComboBox.DisplayMemberPath = "full_Name";
     OrderIdSelectionComboBox.ItemsSource        = Idlist;
     OrderIdSelectionComboBox.DisplayMemberPath  = "Id";
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            supplierTable selectedSupplier  = (supplierTable)supplierSelectionComboBox.SelectedItem;
            orderFromSupplierDetailTable id = OrderFromSupplierBL.AddOrderFromSupllier(name_txb.Text, type_txb.Text, Convert.ToInt32(amount_txb.Text), Convert.ToInt32(price_txb.Text),
                                                                                       selectedSupplier, notes_txb.Text);

            name_txb.Text   = "";
            type_txb.Text   = "";
            price_txb.Text  = "";
            notes_txb.Text  = "";
            amount_txb.Text = "";
            IdList.Add(id);
            ContinueOrderingMessage com = new ContinueOrderingMessage(this, this.IdList);

            this.Hide();
            com.ShowDialog();
        }