private void initAnalysis() { allPatientAnalysis.Rows.Clear(); DataService service = new DataService(); string query = @"Select * from ddt_patient_analysis where dsid_hospitality_session='" + hospitalSession.ObjectId + "' "; List <DdtPatientAnalysis> allHspitalPatients = service.queryObjectsCollection <DdtPatientAnalysis>(query); for (int i = 0; i < allHspitalPatients.Count(); i++) { DdtPatientAnalysis h = allHspitalPatients[i]; allPatientAnalysis.Rows.Add(h.RCreationDate, h.ObjectId, "", ""); } }
private void editBtn_Click(object sender, EventArgs e) { IEnumerator it = allPatientAnalysis.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[1]; string value = cell.Value.ToString(); DataService service = new DataService(); DdtPatientAnalysis ll = service.queryObject <DdtPatientAnalysis>(@"Select * from ddt_patient_analysis where r_object_id ='" + value + "'"); Analizi form = new Analizi(hospitalSession, ll); form.ShowDialog(); } }
private void saveBtn_Click(object sender, EventArgs e) { if (patientAnalysis == null) { patientAnalysis = new DdtPatientAnalysis(); patientAnalysis.DsidHospitalitySession = hospitalitySession.ObjectId; } DataService service = new DataService(); saveUziTab(service); saveSpecialistConslusionTab(service); saveHolterTab(service); saveXRayTab(service); updateObject <DdtPatientAnalysis>(service, patientAnalysis, DdtPatientAnalysis.TABLE_NAME, patientAnalysis.ObjectId); Close(); }
public Analizi(DdtHospital hospitalitySession, DdtPatientAnalysis analysis) { this.hospitalitySession = hospitalitySession; this.patientAnalysis = analysis; InitializeComponent(); if (patientAnalysis != null) { DataService service = new DataService(); uziObj = service.queryObject <DdtUzi>(@"select * from " + DdtUzi.TABLE_NAME + " WHERE r_object_id ='" + patientAnalysis.DsisUzi + "'"); specialistConclusion = service.queryObject <DdtSpecialistConclusion>(@"select * from " + DdtSpecialistConclusion.TABLE_NAME + " WHERE r_object_id ='" + patientAnalysis.DsidSpecialistConclusion + "'"); holter = service.queryObject <DdtHolter>(@"select * from " + DdtHolter.TABLE_NAME + " WHERE r_object_id ='" + patientAnalysis.DsidHolter + "'"); xRay = service.queryObject <DdtXRay>(@"select * from " + DdtXRay.TABLE_NAME + " WHERE r_object_id ='" + patientAnalysis.DsidXray + "'"); urineAnalysis = service.queryObject <DdtUrineAnalysis>(@"select * from " + DdtUrineAnalysis.TABLE_NAME + " WHERE r_object_id ='" + patientAnalysis.DsisUrineAnalysis + "'"); initUziTab(); intSpecialistConslusionTab(); initHolterTab(); initXRay(); initUrineAnalysis(); } }