Clothes.UI/WebForm1.aspx.cs

(完整代码) 1KB

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

namespace Clothes.UI
{
    public partial class WebForm1 : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                CLClassifyIBLL cLClassify = new CLClassifyBLL();
                List<CLClassify> list = cLClassify.select();
                DropDownList1.DataSource = list;
                DropDownList1.DataValueField = "Id";
                DropDownList1.DataTextField = "Category";
                DropDownList1.DataBind();
            }
               
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            CLDress cL = new CLDress()
            {
                Avatar = Session["aa"].ToString(),
                Summary = txt_jian.Text,
                TypeId =Convert.ToInt32( DropDownList1.SelectedValue),
                Surplus=Convert.ToInt32( txt_shu.Text),
                Price= Convert.ToInt32(txt_shou.Text),
                Money=Convert.ToInt32(txt_jing.Text),

            };
            CLDressIBLL cLDress = new CLDressBLL();
            var aa= cLDress.CLDressInsert(cL);
            if (aa) {
                Response.Redirect("About");
            }
            //var img= Session["aa"].ToString();
        }
    }
}

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

AI 解读 AI

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

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