示例#1
0
 public static void insert(PriceEntity price)
 {
     DbHelper.ExecuteNonQuery("p_Price_insert",
       price.CompanyId,
       price.AdminId,
       price.ProductId,
       price.Price,
       price.SellerPrice,
       price.Unit
        );
 }
示例#2
0
 public static PriceEntity getByProduct(int productId, string businessnature)
 {
     DataRow dr = DbHelper.ExecuteDataRow("[p_Price_getByProductIdBusinessNature]", productId, businessnature);
     PriceEntity price = new PriceEntity();
     if (dr != null)
     {
         price.PriceId = Convert.ToInt32(dr["priceId"]);
         price.CompanyId = Convert.ToInt32(dr["companyId"]);
         price.AdminId = Convert.ToInt32(dr["adminId"]);
         price.ProductId = productId;
         price.Price = Convert.ToDecimal(dr["price"]);
         price.SellerPrice = Convert.ToDecimal(dr["sellerPrice"]);
         price.Unit = dr["unit"].ToString();
         price.InputDt = Convert.ToDateTime(dr["inputDt"]);
     }
     return price;
 }
示例#3
0
 public static void updateByProduct(PriceEntity pr)
 {
     Price.updateByProduct(pr);
 }
示例#4
0
 public static void updateByAdmin(PriceEntity pr)
 {
     Price.updateByAdmin(pr);
 }
示例#5
0
 public static void insert(PriceEntity pr)
 {
     Price.insert(pr);
 }
示例#6
0
 public static void updateByAdmin(PriceEntity price)
 {
     DbHelper.ExecuteNonQuery("p_Price_updateByAdmin",
       price.ProductId,
       price.Price,
       price.BusinessNature,
       price.AdminId
        );
 }
示例#7
0
 public static void updateByProduct(PriceEntity price)
 {
     DbHelper.ExecuteNonQuery("p_Price_updateByProduct",
       price.CompanyId,
       price.ProductId,
       price.Price,
       price.SellerPrice,
       price.Unit
        );
 }
        //非自动加价商品,管理员修改价格
        void updatePrice(int productId, string nature)
        {
            decimal price=0;
            foreach(RepeaterItem row in rpt_list.Items)
            {
                if (row.ItemType == ListItemType.AlternatingItem || row.ItemType == ListItemType.Item)
                {
                    HiddenField hd = row.FindControl("hd_ItemProductId") as HiddenField;
                    HiddenField hdNature = row.FindControl("hd_busNature") as HiddenField;

                    if (hd.Value == productId.ToString() && hdNature.Value == nature)
                    {
                        TextBox txt_price = row.FindControl("txt_Price") as TextBox;
                        price = Convert.ToDecimal(txt_price.Text);
                        break;
                    }
                }

            }

            PriceEntity pr = new PriceEntity();
            pr.Price = price;
            pr.ProductId = productId;
            pr.BusinessNature = nature;
            pr.AdminId = logic.sysAdmin.AdminID;
            logic.price.updateByAdmin(pr);

            logic.buyerPriceHistory.insertByUpdateProduct(productId); //增加采购商历史价格
            rptBind();
        }