using System;
using TopWinCMS.BLL;
using TopWinCMS.Model.Enum;
using TopWinCMS.Common;
namespace TopWinCMS.WebUI.Admin.Shop
{
    public partial class SelectClass : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                new ClassManage().BindDDL(ListBox1, Class_BindOption.NoLink, "<请选择栏目>",int.Parse( Request["ModelID"] ));
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (ListBox1.SelectedIndex == 0)
            {
                MsgBox.Alert("请选择栏目！");
                return;
            }
            if (Session["SelectClassID"] != null)
            {
                ListBox1.SelectedValue = Session["SelectClassID"].ToString();
            }
            Response.Redirect("Shop_Add.aspx?ModelID=" + Request["ModelID"] + "&ClassID=" + ListBox1.SelectedValue);
        }
    }
}