Пример #1
0
 public PriceProductEntity Contrast(DataRow dr)
 {
     try
     {
         PriceProductEntity priceProductentity = new PriceProductEntity();
         priceProductentity.ProductId = dr[0].ToString();
         priceProductentity.BusinessNature = dr[1].ToString();
         priceProductentity.Price = Convert.ToDouble(dr[2].ToString());
         PriceProductEntity priceProductReturn = logic.priceProduct.pricecontrast(priceProductentity);
         return priceProductReturn;
     }
     catch (Exception)
     {
         return null;
     }
 }
Пример #2
0
        public static PriceProductEntity pricecontrast(PriceProductEntity priceproductentity)
        {
            DataRow dr = DbHelper.ExecuteDataRow("P_PriceContrast", priceproductentity.ProductId, priceproductentity.BusinessNature, priceproductentity.Price);
            PriceProductEntity ppentity = new PriceProductEntity();
            ppentity.ProductId = priceproductentity.ProductId;
            ppentity.BusinessNature = priceproductentity.BusinessNature;
            ppentity.Price = priceproductentity.Price;
            if (dr != null)
            {
                ppentity.ProductName = dr["productname"].ToString();
                ppentity.PriceDifference = Convert.ToDouble(dr["pricedifference"].ToString());
                ppentity.BusinessNatureName = dr["name"].ToString();
                ppentity.ContrastPrice = Convert.ToDouble(dr["contrastprice"].ToString());
                ppentity.SellerPrice = Convert.ToDouble(dr["sellerprice"].ToString());

            }
            else
            {
                ppentity.ProductName = null;
            }

            return ppentity;
        }
Пример #3
0
 public static PriceProductEntity pricecontrast(PriceProductEntity priceproductentity)
 {
     return PriceProduct.pricecontrast(priceproductentity);
 }