/// <summary> /// 扫描二维码后给PurchaseReceipt类属性赋值 /// </summary> /// <param name="list">二维码中的信息集合</param> public void SetQrcodeStrBll(List <string> list) { List <PurchaseReceipt> listPR = new List <PurchaseReceipt>(); try { listPR.Add(new PurchaseReceipt() { PurchaseNo = list[0], SupplierName = list[1], BatchNo = list[2], MaterialCode = list[3], MaterialName = list[4], MaterialSpecifications = list[5], ProductQuantity = Convert.ToInt32(list[6]), CheckAudit = "未审核", CheckQualified = "未检测", CheckSpecialMining = "未检测", note = "" }); PurchaseReceiptDal prd = new PurchaseReceiptDal(); prd.SetQrcodeStrDal(listPR); } catch (Exception e) { MessageBox.Show(e.Message + "\t\n" + "格式不对,请输入正确二维码信息格式!"); } }
/// <summary> /// 删除一条采购入库数据 /// </summary> /// <param name="list"></param> public void DeletePurchaseReceiptRowBll(List <string> list) { PurchaseReceiptDal prd = new PurchaseReceiptDal(); prd.DeletePurchaseReceiptRowDal(list); }