The coding on which I am working is::
Now I want to return values transplantDate and iniatial
Code:
private String infoPatient()
{
String initial;
String transplantDate;
openConnection();
SqlDataAdapter adpGender = new SqlDataAdapter("select gender from tblRegistration where pID='"+patientID+"'", con);
DataTable dtGender = new DataTable();
adpGender.Fill(dtGender);
initial = dtGender.Rows[0][0].ToString()=="Male" ? "Mr" : "Mrs";
SqlDataAdapter adpTransplantDate = new SqlDataAdapter("select crossdate from txnpatientEvaluationFirst where patientID='"+patientID+"' and dateOfupdate=(select max(dateOfUpdate) from txnpatientEvaluationFirst where patientID='"+patientID+"')", con);
DataTable dtTransplantDate = new DataTable();
adpTransplantDate.Fill(dtTransplantDate);
transplantDate = (Convert.ToDateTime(dtTransplantDate.Rows[0][0].ToString())).Date.ToLongDateString();
}
Comment