예제 #1
0
    protected void btn_OnClickAddGoods(object sender, EventArgs e)
    {
        string GoodName      = this.goodName.Text;
        string GoodInfo      = this.goodInfo.Text;
        string GoodUrl       = this.ImageMapPhoto.ImageUrl;
        string GoodClass     = this.goodClass.Text;
        string GoodBrand     = this.goodBrand.Text;
        bool   GoodIsTuijian = Boolean.Parse(this.isDropDownList.SelectedValue.ToString());
        float  marketPrice   = float.Parse(this.marketPrice.Text);
        float  DisPrice      = float.Parse(this.DisPrice.Text);
        float  InPrice       = float.Parse(this.inPrice.Text);
        int    InNum         = int.Parse(this.inNum.Text);
        int    spareNum      = InNum;
        float  ShipFee       = float.Parse(this.Fee.Text);
        //将用户输入的信息插入到用户表tb_User中
        int IntReturnValue = gc.AddGoodsInfo(GoodClass, GoodName, GoodInfo, GoodUrl, marketPrice, DisPrice, InPrice, GoodIsTuijian, 0, InNum, spareNum, DateTime.Now, GoodBrand, ShipFee, true);

        if (IntReturnValue != -1)
        {
            Response.Write(cc.MessageBox("插入商品信息成功!", "ManagerGoods.aspx"));
        }
        else
        {
            Response.Write(cc.MessageBox("插入商品信息失败!"));
        }
    }
예제 #2
0
    protected void btn_OnClickAddGoods(object sender, EventArgs e)
    {
        string GoodName      = this.goodName.Text;
        string GoodInfo      = this.goodInfo.Text;
        string GoodUrl       = this.ImageMapPhoto.ImageUrl;
        string GoodClass     = this.goodClass.SelectedValue.ToString();
        string GoodBrand     = this.goodBrand.Text;
        bool   GoodIsTuijian = Boolean.Parse(this.isDropDownList.SelectedValue.ToString());
        float  marketPrice   = float.Parse(this.marketPrice.Text);
        float  DisPrice      = float.Parse(this.DisPrice.Text);
        float  InPrice       = float.Parse(this.RPrice.Text);
        int    InNum         = int.Parse(this.RNum.Text);
        int    spareNum      = InNum;
        float  ShipFee       = float.Parse(this.Fee.Text);
        //将用户输入的信息插入到用户表tb_User中
        int IntReturnValue = gc.AddGoodsInfo(GoodClass, GoodName, GoodInfo, GoodUrl, marketPrice, DisPrice, InPrice, GoodIsTuijian, 0, InNum, spareNum, DateTime.Now, GoodBrand, ShipFee, true);

        if (IntReturnValue != -1)
        {
            //Response.Write(cc.MessageBox(IntReturnValue + ":" + Id.Count));
            for (int i = 0; i < Id.Count; i++)
            {
                //Response.Write(cc.MessageBox(IntReturnValue + ":" + IntReturnValue + ":" + Num[i]));
                gpc.AddGiftPacks(IntReturnValue, Id[i], Num[i]);
            }
            Response.Write(cc.MessageBox("插入大礼包信息成功!", "ManagerGoods.aspx"));
            for (int i = 0; i < Id.Count; i++)
            {
                //Response.Write(cc.MessageBox(IntReturnValue + ":" + IntReturnValue + ":" + Num[i]))
                Id.Remove(i);
                Num.Remove(i);
            }
        }
        else
        {
            Response.Write(cc.MessageBox("插入大礼包信息失败!"));
        }
    }