コード例 #1
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     Entity.Items item = new Entity.Items();
     item.setProductID(int.Parse(ddlProductID.SelectedValue));
     item.setProductID(int.Parse(ddlBrandID.SelectedValue));
     item.setName(txtName.Text.Trim());
     item.setAgoraPrice(txtAgoraPrice.Text.Trim());
     item.setVipPrice(txtVipPrice.Text.Trim());
     item.setMemberPrice(txtMemberPrice.Text.Trim());
     item.setSeckillPrice(txtSeckillPrice.Text.Trim());
     item.setArea(txtArea.Text.Trim());
     item.setDetails(Textarea1.Value.Trim());
     item.setDays(txtDays.Text.Trim());
     item.setHours(txtHours.Text.Trim());
     item.setMinutes(txtMinutes.Text.Trim());
     item.setSeconds(txtSeconds.Text.Trim());
     //if (items.AddItemsInfo(int.Parse(ddlProductID.SelectedValue), int.Parse(ddlBrandID.SelectedValue), txtName.Text.Trim(), txtAgoraPrice.Text.Trim(), txtMemberPrice.Text.Trim(), txtVipPrice.Text.Trim(), txtSeckillPrice.Text.Trim(), txtArea.Text.Trim(), Textarea1.Value.Trim(), txtDays.Text.Trim(), txtHours.Text.Trim(), txtMinutes.Text.Trim(), txtSeconds.Text.Trim()))
     if (items.AddItemsInfo(item))
     {
         panelSuccess.Visible = true;
         lbSuccess.Text       = "新增成功!";
         txtAgoraPrice.Text   = txtArea.Text = txtDays.Text = txtHours.Text = txtMemberPrice.Text = txtMinutes.Text = txtName.Text = txtSeckillPrice.Text = txtSeconds.Text = txtVipPrice.Text = Textarea1.Value = "";
     }
     else
     {
         panelError.Visible = true;
         lbError.Text       = "新增失败";
     }
 }
コード例 #2
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     Entity.Items item = new Entity.Items();
     item.setProductID(int.Parse(ddlProductID.SelectedValue));
     item.setProductID(int.Parse(ddlBrandID.SelectedValue));
     item.setName(txtName.Text.Trim());
     item.setAgoraPrice(txtAgoraPrice.Text.Trim());
     item.setVipPrice( txtVipPrice.Text.Trim());
     item.setMemberPrice(txtMemberPrice.Text.Trim());
     item.setSeckillPrice(txtSeckillPrice.Text.Trim());
     item.setArea(txtArea.Text.Trim());
     item.setDetails(Textarea1.Value.Trim());
     item.setDays(txtDays.Text.Trim());
     item.setHours(txtHours.Text.Trim());
     item.setMinutes(txtMinutes.Text.Trim());
     item.setSeconds(txtSeconds.Text.Trim()); 
     //if (items.AddItemsInfo(int.Parse(ddlProductID.SelectedValue), int.Parse(ddlBrandID.SelectedValue), txtName.Text.Trim(), txtAgoraPrice.Text.Trim(), txtMemberPrice.Text.Trim(), txtVipPrice.Text.Trim(), txtSeckillPrice.Text.Trim(), txtArea.Text.Trim(), Textarea1.Value.Trim(), txtDays.Text.Trim(), txtHours.Text.Trim(), txtMinutes.Text.Trim(), txtSeconds.Text.Trim()))
     if (items.AddItemsInfo(item))
     {
         panelSuccess.Visible = true;
         lbSuccess.Text = "新增成功!";
         txtAgoraPrice.Text = txtArea.Text = txtDays.Text = txtHours.Text = txtMemberPrice.Text = txtMinutes.Text = txtName.Text = txtSeckillPrice.Text = txtSeconds.Text = txtVipPrice.Text = Textarea1.Value = "";
     }
     else
     {
         panelError.Visible = true;
         lbError.Text = "新增失败";
     }
 }
コード例 #3
0
    protected void lbtnModify_Click(object sender, EventArgs e)
    {
        if (lbItemID.Text == "" || txtAgoraPrice.Text == "" || txtMemberPrice.Text == "" || txtSeckillPrice.Text == "" || txtVipPrice.Text == "")
        {
            panelAttention.Visible = true;
            lbAttention.Text = "请先选择修改项目!";
        }
        else
        {
            Entity.Items item = new Entity.Items();
            item.setItemID(int.Parse(lbItemID.Text));
            item.setAgoraPrice(txtAgoraPrice.Text);
            item.setMemberPrice(txtMemberPrice.Text);
            item.setVipPrice( txtVipPrice.Text);
            item.setSeckillPrice(txtSeckillPrice.Text);
            if (items.UpdateSinglePrice(item))
            {
                panelSuccess.Visible = true;
                lbSuccess.Text = "价格更新成功!";
                txtAgoraPrice.Text = txtMemberPrice.Text = ""; txtSeckillPrice.Text = ""; txtVipPrice.Text = "";
            }
            else {
                panelError.Visible = true;
                lbError.Text = "更新出错!";
            }
        }

    }
コード例 #4
0
 protected void lbtnModify_Click(object sender, EventArgs e)
 {
     if (lbItemID.Text == "" || txtAgoraPrice.Text == "" || txtMemberPrice.Text == "" || txtSeckillPrice.Text == "" || txtVipPrice.Text == "")
     {
         panelAttention.Visible = true;
         lbAttention.Text       = "请先选择修改项目!";
     }
     else
     {
         Entity.Items item = new Entity.Items();
         item.setItemID(int.Parse(lbItemID.Text));
         item.setAgoraPrice(txtAgoraPrice.Text);
         item.setMemberPrice(txtMemberPrice.Text);
         item.setVipPrice(txtVipPrice.Text);
         item.setSeckillPrice(txtSeckillPrice.Text);
         if (items.UpdateSinglePrice(item))
         {
             panelSuccess.Visible = true;
             lbSuccess.Text       = "价格更新成功!";
             txtAgoraPrice.Text   = txtMemberPrice.Text = ""; txtSeckillPrice.Text = ""; txtVipPrice.Text = "";
         }
         else
         {
             panelError.Visible = true;
             lbError.Text       = "更新出错!";
         }
     }
 }