Order payOrder(object obj) { Order order = (Order)obj; List <Product> productLst = SQLProduct.GetProducts(p => p.MerchantCode == order.MerchantCode); if (productLst == null || productLst.Count == 0) { WriteLog.Write("payOrder: productLst is null, 订单号:" + order.OrderInsideID, LogPathFile.Recharge.ToString()); return(order); } List <ChargeClass> chargeClassLst = SQLChargeClass.GetChargeClasss(p => p.ChargeClassID > 0); if (chargeClassLst == null || chargeClassLst.Count == 0) { WriteLog.Write("payOrder: chargeClassLst is null, 订单号:" + order.OrderInsideID, LogPathFile.Recharge.ToString()); return(order); } foreach (Product item in productLst) { if (order.ProductID.Equals(item.ProductCode) && item.IsActive) { var result = chargeClassLst.SingleOrDefault(p => p.ChargeClassID == item.ChargeClassID); order = (Order)ReflectChargeClasss(order, result.ChargeClassName); break; } } return(order); }
/// <summary> /// 是否属于等待充值的商品 /// </summary> /// <param name="order"></param> /// <returns></returns> static bool BelongPoProduct(Order order) { try { List <Product> productLst = SQLProduct.GetProducts(p => p.MerchantCode == MerchantCodeType.SUP); if (productLst == null || productLst.Count == 0) { return(false); } foreach (Product item in productLst) { if (order != null && order.ProductID != null) { var result = productLst.Count(p => p.ProductCode == order.ProductID && p.IsActive); if (result != null && result > 0) { return(true); } } } return(false); } catch (Exception ex) { WriteLog.Write("方法:BelongPoProduct_Sup异常,信息:" + ex.Message + ex.StackTrace, LogPathFile.Exception); throw; } }
List <string> GetNotifyProduct() { List <Product> productLst = SQLProduct.GetProducts(p => p.ProductID > 0); List <ChargeClass> chargeClassLst = SQLChargeClass.GetChargeClasss(p => p.ChargeClassID > 0); List <string> productIDList = new List <string>(); foreach (Control c in this.pannelCheckbox.Controls) { if (c is CheckBox && (c as CheckBox).Checked) { string checkTxt = (c as CheckBox).Text; foreach (ChargeClass chargeClass in chargeClassLst) { if (checkTxt.Equals(chargeClass.Descrtion)) { foreach (Product product in productLst) { if (product.ChargeClassID.Equals(chargeClass.ChargeClassID)) { productIDList.Add(product.ProductCode); } } } } } } return(productIDList); }
/// <summary> /// 是否属于等待充值的商品 /// </summary> /// <param name="order"></param> /// <returns></returns> static bool BelongPoProduct(Order order) { try { List <Product> productLst = SQLProduct.GetProducts(p => p.MerchantCode == MerchantCodeType.SW); if (productLst == null || productLst.Count == 0) { return(false); } foreach (Product item in productLst) { if (order != null && order.ProductID != null) { var result = productLst.Count(p => p.ProductCode == order.ProductID && p.IsActive); if (result != null && result > 0) { return(true); } } } return(false); //if (order != null && order.ProductID != null) //{ // if (order.ProductID.Equals("70623") || order.ProductID.Equals("70893") || order.ProductID.Equals("70927") || order.ProductID.Equals("71014") // || order.ProductID.Equals("71015") || order.ProductID.Equals("71016") || order.ProductID.Equals("71017") || order.ProductID.Equals("71018")) // return true; // if (order.ProductID.Equals("70948")) // return true; // if (order.ProductID.Equals("70949") || order.ProductID.Equals("70950") || order.ProductID.Equals("70951") || order.ProductID.Equals("70952") // || order.ProductID.Equals("70953") || order.ProductID.Equals("70954") || order.ProductID.Equals("71324") || order.ProductID.Equals("72161")) // return true; // if (order.ProductID.Equals("71195") || order.ProductID.Equals("70921")) // return true; //} //return false; } catch (Exception ex) { WriteLog.Write("方法:BelongPoProduct异常,信息:" + ex.Message + ex.StackTrace, LogPathFile.Exception); throw; } }