Example #1
0
        /// <summary>
        /// 保存会员的订单
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateCustWeChatPay(CustWxPayModel model)
        {
            var sqlStr = new StringBuilder("update cust_wxpay_info set ");
            sqlStr.Append(Helper.CreateField(model).Trim().TrimEnd(','));
            sqlStr.Append(" where [email protected]");

            using (var conn = Helper.GetConnection())
            {
                try
                {
                    conn.Execute(sqlStr.ToString(), model);
                    return 1;
                }
                catch (Exception ex)
                {
                    LoggerFactories.CreateLogger().Write("C用户修改会员信息:", TraceEventType.Error, ex);
                    return 0;
                }
            }
        }
Example #2
0
 /// <summary>
 /// 保存会员的订单
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddCustWeChatPay(CustWxPayModel model)
 {
     const string sqlI = "insert into cust_wxpay_info (innerid, orderno, orderinfo, custid, status,type, remark, createdtime, modifiedtime) values (@innerid, @orderno, @orderinfo, @custid, @status,@type, @remark, @createdtime, @modifiedtime);";
     using (var conn = Helper.GetConnection())
     {
         try
         {
             return conn.Execute(sqlI, model);
         }
         catch (Exception)
         {
             return 0;
         }
     }
 }