예제 #1
0
        //
        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);
            }
        }
예제 #2
0
 partial void UpdatePatient_info(Patient_info instance);
예제 #3
0
 partial void DeletePatient_info(Patient_info instance);
예제 #4
0
 partial void InsertPatient_info(Patient_info instance);