Ejemplo n.º 1
0
 public void Update(Patient model)
 {
     using (var db = new DbManager())
     {
         var query = new SqlQuery<Patient>();
         query.Update(model);
     }
 }
Ejemplo n.º 2
0
 public void Insert(Patient model)
 {
     using (var db = new DbManager())
     {
         var query = new SqlQuery<Patient>();
         query.Insert(model);
     }
 }
Ejemplo n.º 3
0
        public void InsertOrUpdate(Patient model)
        {
            var modelInDb = this.FindById(model.ID);

            if (modelInDb == null)
                this.Insert(model);
            else
                this.Update(model);
        }
Ejemplo n.º 4
0
        public static bool AddPatient(Patient patient)
        {
            ServicePatientClient servicePatient = new ServicePatientClient();

            try
            {
                return servicePatient.AddPatient(patient);
            }
            catch (Exception)
            {
                return false;
            }
        }
		private void detach_Patients(Patient entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
		private void attach_Patients(Patient entity)
		{
			this.SendPropertyChanging();
			entity.Contact = this;
		}
 partial void DeletePatient(Patient instance);
 partial void UpdatePatient(Patient instance);
 partial void InsertPatient(Patient instance);