public static void updatePhysicalExamination(int idExamination, string exam_code, string result) { DataClassesDataContext db = new DataClassesDataContext(); Examination_Physical update = db.Examination_Physical.Single(row => row.Id_Examination == idExamination); update.Exam_Code = exam_code; update.Result = result; db.SubmitChanges(); }
public static void insertPhysicalExamination(int idAppointment, string exam_code, string result) { DataClassesDataContext db = new DataClassesDataContext(); Examination_Physical addPhysicalExamination = new Examination_Physical(); addPhysicalExamination.Id_Appointment = idAppointment; addPhysicalExamination.Result = result; addPhysicalExamination.Exam_Code = exam_code; db.Examination_Physical.InsertOnSubmit(addPhysicalExamination); db.SubmitChanges(); }