コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the PatientAllergies EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPatientAllergies(PatientAllergy patientAllergy)
 {
     base.AddObject("PatientAllergies", patientAllergy);
 }
コード例 #2
0
ファイル: PacientesDAC.cs プロジェクト: spzenk/sfdocsamples
        public static void CreatePatientAllergy(PatientAllergyBE patientAllergyBE, Guid lastAccessUserId)
        {
            using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities))
            {
                PatientAllergy patientAllergy_db = new PatientAllergy();
                patientAllergy_db.PatientId = patientAllergyBE.PatientId;

                patientAllergy_db.AnimalAllergy = patientAllergyBE.AnimalAllergy;
                patientAllergy_db.ChemicalAllergy = patientAllergyBE.ChemicalAllergy;
                patientAllergy_db.FoodAllergy = patientAllergyBE.FoodAllergy;
                patientAllergy_db.InsectAllergy = patientAllergyBE.InsectAllergy;
                patientAllergy_db.MedicamentsAllergy = patientAllergyBE.MedicamentsAllergy;
                patientAllergy_db.MiteAllergy = patientAllergyBE.MiteAllergy;
                patientAllergy_db.PollenAllergy = patientAllergyBE.PollenAllergy;
                patientAllergy_db.SunAllergy = patientAllergyBE.SunAllergy;

                patientAllergy_db.Observation = patientAllergyBE.Observation;
                patientAllergy_db.OtherAllergy = patientAllergyBE.OtherAllergy;


                patientAllergy_db.GeneralDetails = patientAllergyBE.GeneralDetails;
                patientAllergy_db.MedicalEventId = patientAllergyBE.MedicalEventId;
                patientAllergy_db.Enabled = true;
                patientAllergy_db.LastAccessTime = System.DateTime.Now;
                patientAllergy_db.LastAccessUserId = lastAccessUserId;

                dc.PatientAllergies.AddObject(patientAllergy_db);
                dc.SaveChanges();
            }
        }
コード例 #3
0
 /// <summary>
 /// Create a new PatientAllergy object.
 /// </summary>
 /// <param name="allergyId">Initial value of the AllergyId property.</param>
 /// <param name="patientId">Initial value of the PatientId property.</param>
 /// <param name="foodAllergy">Initial value of the FoodAllergy property.</param>
 /// <param name="medicamentsAllergy">Initial value of the MedicamentsAllergy property.</param>
 /// <param name="miteAllergy">Initial value of the MiteAllergy property.</param>
 /// <param name="insectAllergy">Initial value of the InsectAllergy property.</param>
 /// <param name="pollenAllergy">Initial value of the PollenAllergy property.</param>
 /// <param name="observation">Initial value of the Observation property.</param>
 /// <param name="lastAccessTime">Initial value of the LastAccessTime property.</param>
 /// <param name="lastAccessUserId">Initial value of the LastAccessUserId property.</param>
 /// <param name="animalAllergy">Initial value of the AnimalAllergy property.</param>
 /// <param name="chemicalAllergy">Initial value of the ChemicalAllergy property.</param>
 /// <param name="sunAllergy">Initial value of the SunAllergy property.</param>
 /// <param name="enabled">Initial value of the Enabled property.</param>
 public static PatientAllergy CreatePatientAllergy(global::System.Int32 allergyId, global::System.Int32 patientId, global::System.Boolean foodAllergy, global::System.Boolean medicamentsAllergy, global::System.Boolean miteAllergy, global::System.Boolean insectAllergy, global::System.Boolean pollenAllergy, global::System.String observation, global::System.DateTime lastAccessTime, global::System.Guid lastAccessUserId, global::System.Boolean animalAllergy, global::System.Boolean chemicalAllergy, global::System.Boolean sunAllergy, global::System.Boolean enabled)
 {
     PatientAllergy patientAllergy = new PatientAllergy();
     patientAllergy.AllergyId = allergyId;
     patientAllergy.PatientId = patientId;
     patientAllergy.FoodAllergy = foodAllergy;
     patientAllergy.MedicamentsAllergy = medicamentsAllergy;
     patientAllergy.MiteAllergy = miteAllergy;
     patientAllergy.InsectAllergy = insectAllergy;
     patientAllergy.PollenAllergy = pollenAllergy;
     patientAllergy.Observation = observation;
     patientAllergy.LastAccessTime = lastAccessTime;
     patientAllergy.LastAccessUserId = lastAccessUserId;
     patientAllergy.AnimalAllergy = animalAllergy;
     patientAllergy.ChemicalAllergy = chemicalAllergy;
     patientAllergy.SunAllergy = sunAllergy;
     patientAllergy.Enabled = enabled;
     return patientAllergy;
 }