示例#1
0
        /// <summary>
        /// 新增历史备注
        /// </summary>
        /// <param name="entity"></param>
        public static void InsertProductBatchManagementLog(ProductBatchManagementInfoLog entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("InsertProductBatchManagementLog");

            command.SetParameterValue("@BatchManagementSysNo", entity.BatchManagementSysNo);
            command.SetParameterValue("@Note", entity.Note);
            command.SetParameterValue("@InUser", entity.InUser);
            command.ExecuteNonQuery();
        }
示例#2
0
        public ProductBatchManagementInfo UpdateIsBatch(ProductBatchManagementInfo batchManagementInfo)
        {
            using (var scope = TransactionScopeFactory.CreateTransactionScope())
            {
                productExtDA.UpdateIsBatch(batchManagementInfo);

                var batch = productExtDA.GetProductBatchManagementInfo(batchManagementInfo.ProductSysNo.Value);

                if (!string.IsNullOrEmpty(batchManagementInfo.Note) && batchManagementInfo.IsBatch.Value)
                {
                    var log = new ProductBatchManagementInfoLog {
                        Note = batchManagementInfo.Note, BatchManagementSysNo = batch.SysNo
                    };
                    productExtDA.InsertProductBatchManagementLog(log);
                }

                scope.Complete();
            }

            return(productExtDA.GetProductBatchManagementInfo(batchManagementInfo.ProductSysNo.Value));
        }