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();
        }
Exemple #2
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();
    }
 partial void DeletePackSideEffect(PackSideEffect instance);
 partial void UpdatePackSideEffect(PackSideEffect instance);
 partial void InsertPackSideEffect(PackSideEffect instance);
	private void detach_PackSideEffects3(PackSideEffect entity)
	{
		this.SendPropertyChanging();
		entity.SideEffect3 = null;
	}
	private void attach_PackSideEffects2(PackSideEffect entity)
	{
		this.SendPropertyChanging();
		entity.SideEffect2 = this;
	}