Esempio n. 1
0
 public PurchaseCostumer(List <orderDetailsTable> Idlist, ContinueOrderCostumer coc)
 {
     InitializeComponent();
     this.Idlist = Idlist;
     this.coc    = coc;
     EmployeeSelectionComboBox.ItemsSource       = employeeBL.GetAll();
     EmployeeSelectionComboBox.DisplayMemberPath = "full_Name";
     OrderIdSelectionComboBox.ItemsSource        = Idlist;
     OrderIdSelectionComboBox.DisplayMemberPath  = "Id";
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            CostumersTable    selectedCostumer = (CostumersTable)CostumerSelectionComboBox.SelectedItem;
            orderDetailsTable odt = CostumerOrderBL.AddCostumerOrder(Convert.ToInt32(discount_txb.Text), Convert.ToInt32(amount_txb.Text), notes_txb.Text, 0, productName_txb.Text,
                                                                     productType_txb.Text, typeOfTree_txb.Text, color_txb.Text, shoeing_txb.Text, Convert.ToInt32(cost_txb.Text),
                                                                     Convert.ToInt32(costPrice_txb.Text), selectedCostumer);

            discount_txb.Text    = "";
            amount_txb.Text      = "";
            notes_txb.Text       = "";
            productName_txb.Text = "";
            productType_txb.Text = "";
            typeOfTree_txb.Text  = "";
            color_txb.Text       = "";
            shoeing_txb.Text     = "";
            cost_txb.Text        = "";
            costPrice_txb.Text   = "";
            idlist.Add(odt);

            ContinueOrderCostumer coc = new ContinueOrderCostumer(this, this.idlist);

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