public CustomerNew GetCustomerBySql(string telNum) { var sql = @"select c_num,c_identity from h_CustomerNew where 1=1"; if (!string.IsNullOrEmpty(telNum)) { sql += "and c_Num='" + telNum + "'"; } DataSet ds = SqlHelper.ExecuteDataSet(CommandType.Text, sql); CustomerNew info = EntityObject.DT2SimpleEntity <CustomerNew>(ds.Tables[0]); return(info); }
public CustomerNewSelect GetCustomerNewBySql(string vipNum) { var sql = @"select c_num,c_Name,c_sex,c_address,c_birthday,c_identity,c_DisCount,c_QQ,c_Mail,c_Company from h_CustomerNew where 1=1"; if (!string.IsNullOrEmpty(vipNum)) { sql += "and c_Num='" + vipNum + "'or c_openid='" + vipNum + "'"; } DataSet ds = SqlHelper.ExecuteDataSet(CommandType.Text, sql); CustomerNewSelect info = EntityObject.DT2SimpleEntity <CustomerNewSelect>(ds.Tables[0]); return(info); }
public bool sendOrder(string orderId) { SqlHelper helper = new SqlHelper(); string sql = @"select c_chdh as orderId, a.c_total as price, c_totalVIP as vipPrice, c_quantity as num, c_ShopName as shopName, c_date as orderTime, c_openid as openid from h_chtj as a inner join h_customerNew as b on a.c_vipId = b.c_identity where a.c_chdh='" + orderId + "'"; DataSet ds = SqlHelper.ExecuteDataSet(CommandType.Text, sql); OrderInfo info = EntityObject.DT2SimpleEntity <OrderInfo>(ds.Tables[0]); if (true) { } var result = WebUtils.Send <OrderInfo>("http://www.xmwanlixin.cn/api/WlxApi/SendOrderNotice", info); if (result) { SqlParameter[] prams = new SqlParameter[1]; prams[0] = new SqlParameter("@c_chdh", orderId); var count = helper.ExecuteNonQuery(@"update dbo.h_chtj set c_wxts='0' where c_chdh=@c_chdh", prams); } return(result); }