Example #1
0
        private void AddC(object obj)
        {
            var hour = new DentistAppointment
            {
                Note = this.note,
            };

            if (patientId >= 1)
            {
                hour.PatientId = patientId;
            }
            else if (this.unknownPatient != null)
            {
                hour.UnknowPatientName = this.unknownPatient;
            }

            hour.DateTime = new DateTime(this.date.Year, this.date.Month, this.date.Day, this.hour, this.minutes, 0);

            this.dentistAppointmentsService.Add(hour);
        }
 public void Add(DentistAppointment model)
 {
     this.context.DentistAppontments.Add(model);
     this.context.SaveChanges();
 }