// public void InsertToDB(string name, int age, string gender, string contact, string category, string status, string description, DateTime date, TimeSpan time, int apId) { try { DataClasses1DataContext dt = new DataClasses1DataContext(); Patient_info patient = new Patient_info(); patient.Name = name; patient.Age = age; patient.Gender = gender; patient.ContactNo = contact; patient.Category = category; patient.MaritalSatus = status; patient.Description = description; patient.AppointmentDate = date; patient.AppointmentTime = time; patient.DoctorId = docId; patient.AppointmentId = apId; dt.Patient_infos.InsertOnSubmit(patient); dt.SubmitChanges(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
partial void UpdatePatient_info(Patient_info instance);
partial void DeletePatient_info(Patient_info instance);
partial void InsertPatient_info(Patient_info instance);