private void simpleButton1_Click(object sender, EventArgs e) { try { string Update = "dbo.Rent_Update_v1 '" + UserAID + "','" + dateTimePicker1.Value.Date.ToString() + "','" + textEdit1.Text.Trim() + "'," + comboBox1.SelectedValue.ToString() + "," + SelectedID; DbConnection.DBConnect(Update); Rent_Brodcast_Car main = this.Owner as Rent_Brodcast_Car; main.simpleButton1_Click(null, null); this.Close(); } catch (Exception exp) { MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void simpleButton1_Click(object sender, EventArgs e) { try { string update = "exec dbo.Update_Rent_Status '" + id + "','" + carnum + "','" + textEdit1.Text + "'"; DbConnection.DBConnect(update); Rent_Brodcast_Car main = this.Owner as Rent_Brodcast_Car; main.gridView2_RowCellClick(null, null); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }