Exemplo n.º 1
0
        public Result AduitUpdatePdProductStockInDetail(PdProductStockInDetail model, SyUser user)
        {
            Result r = new Result()
            {
                Status = false
            };

            if (model.SysNo > 0)
            {
                //修改数据d
                PdProductStockInDetailList entity = IPdProductStockInDetailDao.Instance.GetEntity(model.SysNo);
                model.ProductStockInSysNo = entity.ProductStockInSysNo;
                model.WarehouseSysNo      = entity.WarehouseSysNo;
                model.PdProductSysNo      = entity.PdProductSysNo;
                model.StorageQuantity     = entity.StorageQuantity;
                model.DoStorageQuantity   = model.DoStorageQuantity + entity.DoStorageQuantity;
                model.CreatedDate         = entity.CreatedDate;
                model.CreatedBy           = entity.CreatedBy;
                model.LastUpdateBy        = user.SysNo;
                model.LastUpdateDate      = DateTime.Now;
                IPdProductStockInDetailDao.Instance.Update(model);
                r.StatusCode = model.SysNo;
                r.Status     = true;
            }
            return(r);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 保存入库商品
        /// </summary>
        /// <param name="model">入库商品</param>
        /// <param name="user">操作人</param>
        /// <returns></returns>
        /// <remarks>2015-08-06 王耀发 创建</remarks>
        public Result SavePdProductStockInDetail(PdProductStockInDetail model, SyUser user)
        {
            Result r = new Result()
            {
                Status = false
            };

            if (model.SysNo > 0)
            {
                //修改数据
                PdProductStockInDetailList entity = IPdProductStockInDetailDao.Instance.GetEntity(model.SysNo);
                model.DoStorageQuantity = entity.DoStorageQuantity;
                model.CreatedDate       = entity.CreatedDate;
                model.CreatedBy         = entity.CreatedBy;
                model.LastUpdateBy      = user.SysNo;
                model.LastUpdateDate    = DateTime.Now;
                IPdProductStockInDetailDao.Instance.Update(model);
                r.StatusCode = model.SysNo;
                r.Status     = true;
            }
            else
            {
                //新增数据
                model.DoStorageQuantity = 0;
                model.CreatedDate       = DateTime.Now;
                model.CreatedBy         = user.SysNo;
                model.LastUpdateBy      = user.SysNo;
                model.LastUpdateDate    = DateTime.Now;
                r.StatusCode            = IPdProductStockInDetailDao.Instance.Insert(model);
                r.Status = true;
            }
            return(r);
        }