public static string Get(string hanzichuan) { DbBase db = new DbBase(); db.ChangeShop(); return((string)db.ExecuteScalar(string.Format("select dbo.fun_getPY('{0}')", hanzichuan))); }
/// <summary> /// 订单成交后累计计分 /// </summary> /// <param name="orderid"></param> public void OrderSucceed(string orderid) { MemberIntegralLock ml = new MemberIntegralLock(); if (ml.isAllow(orderid)) { string sql = string.Format("SELECT TotalPrice,ReceiverId FROM dbo.Orders WHERE OrderId='{0}'", orderid); SOSOshop.BLL.DbBase bll = new DbBase(); bll.ChangeShop(); DataTable dt = bll.ExecuteTable(sql); decimal TotalPrice = decimal.Parse(bll.ExecuteScalar(string.Format("SELECT ISNULL(SUM(ProNum*ProPrice),0) FROM dbo.OrderProduct WHERE OrderId='{0}' AND Status IN (8,9,10)", orderid)).ToString()); AddIntegral((int)dt.Rows[0]["ReceiverId"], TotalPrice, MemberIntegralTemplateEnum.成交订单, orderid, orderid); } }
/// <summary> /// 建档成功 /// </summary> /// <param name="code"></param> public void FilingStatus(string code) { string sql = string.Format("SELECT UID FROM dbo.memberinfo WHERE uid='{0}'", code); SOSOshop.BLL.DbBase bll = new DbBase(); bll.ChangeShop(); foreach (System.Data.DataRow item in bll.ExecuteTable(sql).Rows) { MemberIntegralLock ml = new MemberIntegralLock(); if (ml.isAllow((int)item["UID"], MemberIntegralTemplateEnum.建档通过)) { //注册送积分(建档成功才开始送会员积分) AddIntegral((int)item["UID"], 0, SOSOshop.BLL.Integral.MemberIntegralTemplateEnum.会员注册, ""); AddIntegral((int)item["UID"], 0, MemberIntegralTemplateEnum.建档通过, ""); } } }