private void SaveBtn_Click(object sender, EventArgs e) { //using (MySQLConnector msc = new MySQLConnector()) MySQLConnector msc = MySQLConnector.GetInstance(); { try { if (msc.IfExists(Info[0], Info[1], Info[2]) == false && msc.IfExistsPassport(Info[6], Info[7]) == false) { msc.AddInformation(Info); this.Close(); //msc.UpdateInfo(id, CheckDifferences(), Info); } else { MessageBox.Show("Already Exists"); } //msc.AddInformation(Info); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } //this.Close(); }
private void confirmBtn_Click(object sender, EventArgs e) { mySQLconnect.AddInformation(numTBox.Text, info.Rows[currIndex].ItemArray[0].ToString(), info.Rows[currIndex].ItemArray[3].ToString(), label5.Text.Substring(15), label8.Text.Substring(13), summTBox.Text, client.Cells[0].Value.ToString(), dateRebuild(dateTimePicker2.Value.ToString())); this.Close(); }