Пример #1
0
 /// <summary>
 /// Create a new MedicalEventAlert object.
 /// </summary>
 /// <param name="alertId">Initial value of the AlertId property.</param>
 /// <param name="medicalEventId">Initial value of the MedicalEventId property.</param>
 /// <param name="creationDate">Initial value of the CreationDate property.</param>
 /// <param name="alertType">Initial value of the AlertType property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="enabled">Initial value of the Enabled property.</param>
 public static MedicalEventAlert CreateMedicalEventAlert(global::System.Int32 alertId, global::System.Int32 medicalEventId, global::System.DateTime creationDate, global::System.Int32 alertType, global::System.String description, global::System.Boolean enabled)
 {
     MedicalEventAlert medicalEventAlert = new MedicalEventAlert();
     medicalEventAlert.AlertId = alertId;
     medicalEventAlert.MedicalEventId = medicalEventId;
     medicalEventAlert.CreationDate = creationDate;
     medicalEventAlert.AlertType = alertType;
     medicalEventAlert.Description = description;
     medicalEventAlert.Enabled = enabled;
     return medicalEventAlert;
 }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MedicalEventAlerts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMedicalEventAlerts(MedicalEventAlert medicalEventAlert)
 {
     base.AddObject("MedicalEventAlerts", medicalEventAlert);
 }
Пример #3
0
        public static void Create_MedicalEventAlert(int medicalEventId, string description, AlertTypeEnum alertType, int referenceId)
        {

            using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities))
            {
                MedicalEventAlert wMedicalEventAlert = new MedicalEventAlert();

                wMedicalEventAlert.CreationDate = DateTime.Now;
                
                wMedicalEventAlert.Enabled = true;
                wMedicalEventAlert.ReferenceId = referenceId;
                wMedicalEventAlert.MedicalEventId = medicalEventId;
                wMedicalEventAlert.Description = description;
                wMedicalEventAlert.AlertType = (int)alertType;
                dc.MedicalEventAlerts.AddObject(wMedicalEventAlert);
                dc.SaveChanges();
            }
        }