Example #1
0
        public static void Add(string DIN, string productCode, string fullSideEffects, string note)
        {
            Pack p = PackBLL.Get4ReportSideEffects(DIN, productCode);

            if (string.IsNullOrEmpty(fullSideEffects))
            {
                throw new Exception("Phản ứng phụ trống.");
            }

            PackSideEffect se = new PackSideEffect();

            se.PackID = p.ID;
            se.SetSideEffect(fullSideEffects);

            se.Actor = RedBloodSystem.CurrentActor;
            se.Date  = DateTime.Now;
            se.Note  = note;

            RedBloodDataContext db = new RedBloodDataContext();

            db.PackSideEffects.InsertOnSubmit(se);

            db.SubmitChanges();
        }
Example #2
0
 public static List <PackSideEffect> Get(string DIN, string productCode)
 {
     return(PackBLL.Get4ReportSideEffects(DIN, productCode).PackSideEffects.ToList());
 }