private void button4_Click(object sender, EventArgs e) { if (DataStorage.currentOrder.orderNo != "") { using (ChangeDateForm chDate = new ChangeDateForm(DataStorage.currentOrder.orderNo, DataStorage.currentOrder.kittingDate)) { if (chDate.ShowDialog() == DialogResult.OK) { DataStorage.currentOrder.plannedEnd = chDate.selectedDate; labelOrderPlannedEnd.Text = DataStorage.currentOrder.plannedEnd.ToShortDateString(); } } } }
private void lvSelectedOrder_ButtonClick(object sender, CellClickEventArgs e) { if (e.Item.Text == "Plan wysyłki:") { using (ChangeDateForm changeForm = new ChangeDateForm()) { if (changeForm.ShowDialog() == DialogResult.OK) { MST.MES.SqlOperations.Kitting.UpdateOrderPlannedEndDate(SelectedOrder.selectedOrder.orderNo, changeForm.selectedDate); SelectedOrder.selectedOrder.plannedEnd = changeForm.selectedDate; dgvOrdersList.SelectedRows[0].Cells["ColPlannedEnd"].Value = changeForm.selectedDate; SelectedOrder.UpdateSelectedOrderListView(); } } } if (e.Item.Text == "Ilość do produkcji:") { using (ChangeProductionQtyForm changeForm = new ChangeProductionQtyForm()) { if (changeForm.ShowDialog() == DialogResult.OK) { MST.MES.SqlOperations.Kitting.UpdateOrderQty(SelectedOrder.selectedOrder.orderNo, changeForm.newQty); SelectedOrder.selectedOrder.orderedQty = changeForm.newQty; dgvOrdersList.SelectedRows[0].Cells["ColProductionQty"].Value = changeForm.newQty; SelectedOrder.UpdateSelectedOrderListView(); } } } if (e.Item.Text == "Linia SMT:") { using (ChooseLineOrTester changeForm = new ChooseLineOrTester(ChooseLineOrTester.Type.SmtLines, OrdersList.testerIdDict)) { if (changeForm.ShowDialog() == DialogResult.OK) { MST.MES.SqlOperations.Kitting.UpdateSmtLine(SelectedOrder.selectedOrder.orderNo, changeForm.result); SelectedOrder.selectedOrder.smtLine = changeForm.result; SelectedOrder.UpdateSelectedOrderListView(); } } } if (e.Item.Text == "Tester:") { using (ChooseLineOrTester changeForm = new ChooseLineOrTester(ChooseLineOrTester.Type.Testers, OrdersList.testerIdDict)) { if (changeForm.ShowDialog() == DialogResult.OK) { MST.MES.SqlOperations.Kitting.UpdateTesterId(SelectedOrder.selectedOrder.orderNo, changeForm.result); SelectedOrder.selectedOrder.testerId = changeForm.result; SelectedOrder.UpdateSelectedOrderListView(); } } } if (e.Item.Text == "Zlecenie powiązane:") { using (EditConnectedOrder conOrderForm = new EditConnectedOrder()) { if (conOrderForm.ShowDialog() == DialogResult.OK) { SelectedOrder.UpdateSelectedOrderListView(); } } } }