private void button1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(lblProductDetailsID.Text)) { MessageBox.Show("Please select contract you want to cancel.", "Cancellation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { ClientProducts.CancelProduct(clientNr, Convert.ToInt32(lblProductDetailsID.Text)); dgvClientProductDetails.Refresh(); } }
private void btnAddOrder_Click_1(object sender, EventArgs e) { Dictionary <string, int> compIdQuantity = new Dictionary <string, int>(); foreach (DataGridViewRow row in dgvAddComps.Rows) { compIdQuantity.Add(row.Cells[0].Value.ToString(), Convert.ToInt32(row.Cells[1].Value)); } Orders.AddOrder(clientNr, comboBox1.Text, compIdQuantity, monthCmboBox.Text, serviceComboBox.Text, personnelID); ServiceTicket.AddServiceTicket(clientNr); bool clientIDFound = ClientProducts.CheckClientProducts1(clientNr); if (clientIDFound == true) { InvoiceForm invf = new InvoiceForm(); invf.Show(); } }