Пример #1
0
    void AddPackOrder(string productCode)
    {
        PackOrder po = PackOrderBLL.Get4Return(CurrentDIN, productCode);

        if (PackOrderList.Contains(po.ID))
        {
            throw new Exception("Đã nhập túi máu này.");
        }

        PackOrderList.Add(po.ID);

        GridViewPack.DataBind();

        CurrentDIN             = "";
        imgCurrentDIN.ImageUrl = "none";
    }
Пример #2
0
    public static int Add(List <int> packOrderIDList, string note)
    {
        RedBloodDataContext db = new RedBloodDataContext();

        List <PackOrder> poL = PackOrderBLL.Get4Return(db, packOrderIDList);

        Return re = new Return();

        re.Note = note;

        db.Returns.InsertOnSubmit(re);
        db.SubmitChanges();

        foreach (var item in packOrderIDList)
        {
            PackOrderBLL.Return(re.ID, item, note);
        }

        return(re.ID);
    }