예제 #1
0
 public void IsInvalid_NoDrug()
 {
     var item = new PrescriptionDto()
     {
         Notes = Guid.NewGuid().ToString(),
     };
     Assert.IsFalse(item.IsValid());
 }
예제 #2
0
 public void IsInvalid_NoNotes()
 {
     var item = new PrescriptionDto()
     {
         Drug = new DrugDto(),
         Notes = string.Empty,
     };
     Assert.IsFalse(item.IsValid());
 }
예제 #3
0
 public void IsValid()
 {
     var item = new PrescriptionDto()
     {
         Drug = new DrugDto(),
         Notes = Guid.NewGuid().ToString(),
         Tag = new TagDto(TagCategory.Appointment) { Id = 14 },
     };
     Assert.IsTrue(item.IsValid());
 }
예제 #4
0
 public static void SetPrescription(DependencyObject target, PrescriptionDto value)
 {
     target.SetValue(PrescriptionProperty, value);
 }
 public void Remove(PrescriptionDto prescription)
 {
     this.Prescriptions.Remove(prescription);
 }
예제 #6
0
 /// <summary>
 /// Updates the specified prescription.
 /// </summary>
 /// <param name="item">The item.</param>
 public void Update(PrescriptionDto item)
 {
     new Updator(this.Session).Update(item);
 }
예제 #7
0
 /// <summary>
 /// Removes the specified prescription.
 /// </summary>
 /// <param name="item">The item.</param>
 public void Remove(PrescriptionDto item)
 {
     new Remover(this.Session).Remove(item);
 }