//Send data to datasource private void BSubmit_Click(object sender, EventArgs e) { if (TBDKP.Text != null && TBDKP.Text != "" && Err.IsAllDigits(TBDKP.Text) && TBDKP.Text != DGVTest.SelectedRows[0].Cells[2].Value.ToString()) { int tableval = Convert.ToInt32(DGVTest.SelectedRows[0].Cells[2].Value); if (RBAdd.Checked) { tableval += Convert.ToInt32(TBDKP.Text); DGVTest.SelectedRows[0].Cells[2].Value = tableval; } if (RBEdit.Checked) { DGVTest.SelectedRows[0].Cells[2].Value = Convert.ToInt32(TBDKP.Text); } if (RBSubtract.Checked) { tableval -= Convert.ToInt32(TBDKP.Text); DGVTest.SelectedRows[0].Cells[2].Value = tableval; } RefreshDB(); DSend = GetChanges(); DBCall.SetData(); FuncDisable(); } else if (TBDKP.Text == DGVTest.SelectedRows[0].Cells[2].Value.ToString()) { FuncDisable(); } //Verify input value else if (!Err.IsAllDigits(TBDKP.Text) && TBDKP.Text != null && TBDKP.Text != "") { MessageBox.Show("You can only use nubers.", "Input Error"); } else if (TBDKP.Text == null || TBDKP.Text == "") { MessageBox.Show("Input cannot be blank", "Input Error"); } }