| | |
| | | List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas) |
| | | { |
| | | var decimals = mesSalesDeliveryDatas.Select(s => s.Id).ToArray(); |
| | | var XS_OUT_COUNT = |
| | | Db.Ado.SqlQuery<decimal>("SELECT count(*) FROM MES_INV_ITEM_OUTS A where A.WORK_NO = '"+ mesSalesDelivery.BillNo+ "' and A.BILL_TYPE_ID = 200 AND A.TRANSACTION_NO = 250") |
| | | .First(); |
| | | |
| | | if (XS_OUT_COUNT > 0) |
| | | { |
| | | throw new NotImplementedException("该销售交付通知单已生成出库单,不能修改!"); |
| | | } |
| | | |
| | | var update = base.DeleteById(mesSalesDelivery.Id); |
| | | var insertOrUpdate = db |
| | | .Deleteable<SalesDeliveryNoticeDetail>().In(decimals) |
| | |
| | | SalesDeliveryNotice mesSalesDelivery, |
| | | List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas, string type) |
| | | { |
| | | |
| | | var XS_OUT_COUNT = |
| | | Db.Ado.SqlQuery<decimal>("SELECT count(*) FROM MES_INV_ITEM_OUTS A where A.WORK_NO = '" + mesSalesDelivery.BillNo + "' and A.BILL_TYPE_ID = 200 AND A.TRANSACTION_NO = 250") |
| | | .First(); |
| | | |
| | | if (XS_OUT_COUNT > 0) |
| | | { |
| | | throw new NotImplementedException("该销售交付通知单已生成出库单,不能修改!"); |
| | | } |
| | | if (mesSalesDelivery.Id != null) base.DeleteById(mesSalesDelivery.Id); |
| | | |
| | | if (mesSalesDeliveryDatas.Count > 0) |