示例#1
0
        /// <summary>
        /// 更新账单下的客户和商品(会存在新增和更新二种状态的数据,通过ID来区分)
        /// </summary>
        /// <returns>The bill.</returns>
        /// <param name="item">Item.</param>
        public int UpdateBillCustomerGoods(Passport passport, Bill item)
        {
            List <string> sqlList = new List <string>();

            sqlList.Add(GenerateSql.ReturnUpdateBillSql(item));
            if (item.CustomerList != null && item.CustomerList.Count > 0)
            {
                item.CustomerList.ForEach(customer =>
                {
                    sqlList.AddRange(UpdateBillCustomer(customer, passport));
                });
            }
            return(DbHelper.ExecuteSqlTran(sqlList));
        }
示例#2
0
 /// <summary>
 /// 更新账单
 /// </summary>
 /// <returns>The bill.</returns>
 /// <param name="item">Item.</param>
 public int UpdateBill(Bill item)
 {
     return(DbHelper.ExecuteSql(GenerateSql.ReturnUpdateBillSql(item)));
 }