private void Button_Click(object sender, RoutedEventArgs e) { supplierTable selected_supplier = (supplierTable)SupllierSelectionComboBox.SelectedItem; SupplierBL.UpdateBL(selected_supplier, firstName_txb.Text, lastName_txb.Text, country_txb.Text, phone_txb.Text, Email_txb.Text, Notes_txb.Text, address_txb.Text, active_txb.Text); this.Close(); }
private void supplierChangingComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { supplierTable selectedItem = (supplierTable)supplierChangingComboBox.SelectedItem; if (selectedItem.full_Name != supplierName.Text) { supplierName.Text = selectedItem.full_Name; } }
private void Button_Click(object sender, RoutedEventArgs e) { orderFromSupplierDetailTable selectedOrder = (orderFromSupplierDetailTable)IdNumberComboBox.SelectedItem; supplierTable selectedItem = (supplierTable)supplierChangingComboBox.SelectedItem; OrderFromSupplierBL.UpdateBL(materialName.Text, materialType.Text, Convert.ToInt32(amount.Text), Convert.ToInt32(price.Text), selectedItem, selectedOrder, Convert.ToInt32(activity.Text), notes.Text) ; this.Close(); }
public static void UpdateSupplierDL(supplierTable st, string FirstName, string LastName, string Country, string PhoneNumber, string Email, string Notes, string Address, string active) { supplierTable selected_supplier = st; selected_supplier.firstName = FirstName; selected_supplier.lastName = LastName; selected_supplier.country = Country; selected_supplier.phoneNumber = PhoneNumber; selected_supplier.E_mail = Email; selected_supplier.notes = Notes; selected_supplier.address = Address; selected_supplier.active = Convert.ToInt32(active); db.SaveChanges(); }
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(); }
public static orderFromSupplierDetailTable AddOrderFromSupplier(string name, string type, int amount, int price, supplierTable selectedSupplier, string notes) { orderFromSupplierDetailTable ofsdt = db.orderFromSupplierDetailTable.Add(new orderFromSupplierDetailTable() { amount = amount, notes = notes, active = 0, name = name, materialType = type, price = price, supplier_id = selectedSupplier.Id, supplierTable = selectedSupplier }); db.SaveChanges(); return(ofsdt); }
public static void UpdateOrderFromSupplierDetail(string materialName, string materialType, int amount, int price, supplierTable selectedItem, orderFromSupplierDetailTable selectedOrder, int activity, string notes) { orderFromSupplierDetailTable ofsdt = selectedOrder; ofsdt.name = materialName; ofsdt.materialType = materialType; ofsdt.amount = amount; ofsdt.price = price; if (selectedItem != null) { ofsdt.supplierTable = selectedItem; ofsdt.supplierTable.Id = selectedItem.Id; } ofsdt.orderFromSupplier_id = selectedOrder.Id; ofsdt.active = activity; ofsdt.notes = notes; db.SaveChanges(); }
public static void UpdateBL(supplierTable st, string FirstName, string LastName, string Country, string PhoneNumber, string Email, string Notes, string Address, string active) { DataLayer.UpdateSupplierDL(st, FirstName, LastName, Country, PhoneNumber, Email, Notes, Address, active); }
public static void UpdateBL(string materialName, string materialType, int amount, int price, supplierTable selectedItem, orderFromSupplierDetailTable selectedOrder, int activity, string notes) { DataLayer.UpdateOrderFromSupplierDetail(materialName, materialType, amount, price, selectedItem, selectedOrder, activity, notes); }
public static orderFromSupplierDetailTable AddOrderFromSupllier(string name, string type, int amount, int price, supplierTable selectedSupplier, string notes) { orderFromSupplierDetailTable ofsdt = DataLayer.AddOrderFromSupplier(name, type, amount, price, selectedSupplier, notes); return(ofsdt); }
private void supplierEmailSendingComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { selected_supplier = (supplierTable)supplierEmailSendingComboBox.SelectedItem; toLabel.Content = selected_supplier.E_mail; }