public void AddNewPerson() { if (Officer.Checked) { sqlcommand.CommandText = "INSERT INTO [dbo].[PERSONS] VALUES ('O',N'" + PersonName.Text + "')"; } else if (SubOfficer.Checked) { sqlcommand.CommandText = "INSERT INTO [dbo].[PERSONS] VALUES ('R',N'" + PersonName.Text + "')"; } else if (Solider.Checked) { sqlcommand.CommandText = "INSERT INTO [dbo].[PERSONS] VALUES ('S',N'" + PersonName.Text + "')"; } sqlcommand.ExecuteNonQuery(); MessageBox.Show("تمت اضافة " + PersonName.Text + " قاعدة البيانات"); PersonName.Clear(); UpDateAllPersons(); }
private void ClearTextBoxes() { PersonName.Clear(); ProviderName.Clear(); CatalogName.Clear(); }