YongHu_UI/form.aspx.cs

(完整代码) 1KB

using Clothes.BLL;
using Clothes.IBLL;
using Clothes.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace YongHu_UI
{
    public partial class form : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CLClassifyIBLL cLClassify = new CLClassifyBLL();
                List<CLClassify> list = cLClassify.select();
                ddl_lei.DataSource = list;
                ddl_lei.DataValueField = "Id";
                ddl_lei.DataTextField = "Category";
                ddl_lei.DataBind();
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //var a = Session["aa"];
            CLDressIBLL dressIBLL = new CLDressBLL();
            CLDress dress = new CLDress()
            {
                Avatar = Session["aa"].ToString(),
                Summary = txt_jian.Text,
                TypeId = Convert.ToInt32(ddl_lei.SelectedValue),
                Surplus = Convert.ToInt32(txt_shu.Text),
                Price = Convert.ToInt32(txt_shou.Text),
                Money=Convert.ToInt32(txt_jin.Text)
            };
            if (dressIBLL.CLDressInsert(dress))
            {
                ClientScript.RegisterStartupScript(GetType(),"aa","alert('成功')",true);
            } 
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。