private Card FillCard (Schedule currentSchedule, string cardText)
 {
     Card newCard = new Card();
     newCard.Date = currentSchedule.Date;
     newCard.Disease = cardText;
     newCard.Pet = currentSchedule.Pet;
     return newCard;
 }
 partial void DeleteSchedule(Schedule instance);
 partial void UpdateSchedule(Schedule instance);
 partial void InsertSchedule(Schedule instance);
		private void detach_Schedule(Schedule entity)
		{
			this.SendPropertyChanging();
			entity.Procedure = null;
		}
		private void attach_Schedule(Schedule entity)
		{
			this.SendPropertyChanging();
			entity.Procedure = this;
		}
 private void SavePet(Schedule currentSchedule)
 {
     _repository.AddSchedule(currentSchedule);
 }
        private void FillDataBase()
        {
            
            Client firstClient = new Client();
            firstClient.Name = "Митрон П.Е.";
            firstClient.Email = "*****@*****.**";

            _repository.AddClient(firstClient);

            firstClient = _repository.GetClientByName(firstClient.Name);


            Pet firstPet = new Pet();
            firstPet.Name = "Шарик";
            firstPet.Kind = "Собака";
            firstPet.Master = firstClient.ID;
            _repository.AddPet(firstPet);

            Pet secondPet = new Pet();
            secondPet.Name = "Борис";
            secondPet.Kind = "Кот";
            secondPet.Master = firstClient.ID;
            _repository.AddPet(secondPet);

            Doctor firstDoctor = new Doctor();
            firstDoctor = new Doctor();
            firstDoctor.Email = "[email protected]";
            firstDoctor.Password = PasswordHasher.GetHashPassword("123");
            firstDoctor.Name = "Викторов П.М.";
            firstDoctor.ConfirmAdmin = true;
            firstDoctor.ConfirmEmail = true;
            _repository.AddDoctor(firstDoctor);


            Procedure firstProcedure = new Procedure();
            firstProcedure.Title = "Прививка";
            firstProcedure.Cost = 15000;
            _repository.AddProcedure(firstProcedure);

            Schedule firstSchedule = new Schedule();
            firstSchedule.Date = DateTime.Now.AddDays(1).Date;
            firstSchedule.Doctor = _repository.GetDoctorByName("Викторов П.М.").ID;
            firstSchedule.Pet = _repository.GetPetnByName("Борис").ToList()[0].ID;
            //firstSchedule.Procedure = 1;
            firstSchedule.Title = "Плановый прием";
            firstSchedule.Text = "Сделать прививку";
            firstSchedule.Time = "10:30";
            _repository.AddSchedule(firstSchedule);




        }
 private void DeleteSchedule(Schedule oldScedule)
 {
     _repository.DeleteSchedule(oldScedule);
 }
 private void ChangeSchedule(Schedule currentSchedule)
 {
     _repository.ChangeSchedule(currentSchedule);
 }