I connected windowsform with sql with ado and recive data in datagridview
for insert data i put textbox in my form but i tested it and put text but instead of set data into sql with sqlconnection(ado(connectionstring)) my boolean return false
private void btnsubmit_Click(object sender, EventArgs e) {
if (ValidateInputs()) {
bool isSuccess = repository.insert(
txtname.Text,
txtfamily.Text,
txtemail.Text,
txtmobile.Text,
(int)txtage.Value,
txtadress.Text) ;
if (isSuccess == true)
{
MessageBox.Show("Insert succeeded", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
DialogResult = DialogResult.OK;
}
else {
MessageBox.Show("Something went wrong","Error",MessageBoxButtons.OK);
}
}
}