Example #1
0
        public bool UpdateInfo(string fields, long id)
        {
            PackageInboundDetailInfo info = dal.GetInfo(id);

            if (info == null)
            {
                throw new Exception("MC:0x00000084");///数据有误
            }
            List <PackageInboundInfo> inboundInfo = new PackageInboundDAL().GetList(" [FID] = N'" + info.OrderFid + "'", string.Empty);

            if (inboundInfo == null)
            {
                throw new Exception("MC:0x00000084");///数据有误
            }
            if (inboundInfo.FirstOrDefault().Status != (int)PackageInboundStatusConstants.Created)
            {
                throw new Exception("MC:0x00000441");///状态为10.已创建时可以进行修改或删除
            }
            return(dal.UpdateInfo(fields, id) > 0 ? true : false);
        }