public int Insert(Patient aPatient) { string query = "insert into patient_tbl values ('" + aPatient.VoterId + "','" + aPatient.Name + "','" + aPatient.Adress + "','" + aPatient.Age + "')"; SqlConnection aConnection = new SqlConnection(conncetionStr); SqlCommand aCommand = new SqlCommand(query, aConnection); aConnection.Open(); int rowAffect = aCommand.ExecuteNonQuery(); aConnection.Close(); return rowAffect; }
public void Insert(Patient aPatient) { aPatientGateway.Insert(aPatient); }