示例#1
0
 public void Delete(PatientViewModel patientModel)
 {
     using (var repo = new PatientRepository())
     {
         var dis = new Patient();
         dis = repo.GetById(patientModel.PatientId);
         repo.Delete(dis);
     }
 }
示例#2
0
        public void Update(PatientViewModel patientModel)
        {
            using (var repo = new PatientRepository())
            {
                var dis = new Patient();
                dis = repo.GetById(patientModel.PatientId);
                if (true)
                {
                    dis.UserName = patientModel.UserName;
                    dis.FirstName = patientModel.FirstName;
                    dis.LastName = patientModel.LastName;
                    dis.IdentificationNumber = patientModel.IdentificationNumber;
                    dis.Cellphone = patientModel.Cellphone;
                    dis.Email = patientModel.Email;
                    dis.Occupation = patientModel.Occupation;
                    dis.SecurityAnswer = patientModel.SecurityAnswer;
                    dis.Address = patientModel.Address;
                    dis.Telephone = patientModel.Telephone;
                    dis.City = patientModel.City;
                    dis.State = patientModel.State;
                    dis.Country = patientModel.Country;
                    dis.ZipCode = patientModel.ZipCode;

                }
                repo.Update(dis);

            }
        }