示例#1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Update(SupplierEntity entity)
        {
            entity.Include(a => new { a.ID, a.SupNum, a.SupName, a.SupType, a.Email, a.Phone, a.Fax, a.ContactName, a.Address, a.Description });
            entity.Where(a => a.SupNum == entity.SupNum);
            int line = this.Supplier.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(CacheKey.JOOSHOW_SUPPLIER_CACHE);
            }
            return(line);
        }
示例#2
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Update(SupplierEntity entity)
        {
            string key = string.Format(CacheKey.JOOSHOW_SUPPLIER_CACHE, this.CompanyID);

            entity.Include(a => new { a.SupNum, a.SupName, a.SupType, a.Email, a.Phone, a.Fax, a.ContactName, a.Address, a.Description });
            entity.Where(a => a.SnNum == entity.SnNum)
            .And(a => a.CompanyID == entity.CompanyID);
            int line = this.Supplier.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(key);
            }
            return(line);
        }