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"; }
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); }