// ---- Button for editing orders, for EXPEDITOR - START private void order_status_change_Click(object sender, RoutedEventArgs e) { Order_Form order_form = new Order_Form(); order_form.Show(); }
// ---- Button for editing orders, for EXPEDITOR - START private void order_status_change_Click(object sender, RoutedEventArgs e) { Items item = (Items)datagrid_orderstatus.SelectedItem; if (!item.reader6.Equals("Нова")) { MessageBox.Show("You can modify orders with 'Нова' status only!"); return; } Order_Form order_form = new Order_Form(); Order_Form.instance.textBox_Order_id.Text = item.reader0; Order_Form.instance.textBox_Amount.Text = item.reader2; Order_Form.instance.richTextBox_book_name.Text = item.reader1; List<Items> get_warehouse_propery_item = new List<Items>(DBConnect.reader_column_3x("SELECT subquery.warehouse_name, subquery.warehouse_id, subquery.item_id FROM (SELECT warehouse_t.warehouse_name, warehouse_t.warehouse_id, goods_t.book_name, avaliable_t.warehouse_amount, goods_t.item_id FROM sbs.warehouse warehouse_t LEFT JOIN sbs.avaliable avaliable_t ON avaliable_t.warehouse_id = warehouse_t.warehouse_id LEFT JOIN sbs.goods goods_t ON avaliable_t.item_id = goods_t.item_id) subquery WHERE subquery.book_name LIKE '" + item.reader1 + "' AND subquery.warehouse_amount >= '" + item.reader2 + "' ORDER BY warehouse_name")); for (int i = 0; i < get_warehouse_propery_item.Count; i++) Global.get_warehouse_propery_string.Add(string.Format("{0}", get_warehouse_propery_item[i].reader1)); Global.get_bookID_propery_string = get_warehouse_propery_item[0].reader2; Order_Form.instance.comboBox_warehouse.DataSource = get_warehouse_propery_item; order_form.Show(); }
public Order_Form() { InitializeComponent(); instance = this; }