using System;
using System.IO;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MyApp.DBTable.dbo;
using NickLee.Common.Providers;
using NickLee.Common;

namespace MYAPP.Manage.Accessories
{
    public partial class View_Accessories_Info : MyApp.Web.UI.PublicPage
    {
        string _Root_Dir = "/Accessories/";
        public string _File_Dir = "";

        int _Info_ID = 0;
        int _Type_ID = 0;
        Dictionary_Info di;
        override protected void AppInit()//程序基本信息初始化
        {
            try
            {

                _Type_ID = Convert.ToInt32(Request.QueryString["Type_ID"]);
                _Info_ID = Convert.ToInt32(Request.QueryString["Info_ID"]);
            }
            catch (Exception)
            {

            }
            di = new Dictionary_Info(db);
            if (di.Select("DI_Frame,DI_Value", String.Format("Dictionary_Class_ID={0} and Dictionary_Info_ID={1}", 102, _Type_ID)))
            {
                _File_Dir = String.Format("{0}{1}/{2}/{3}/", _Root_Dir, di.DI_Frame, di.DI_Value, _Info_ID);
            }
            db.Dispose();

        }

        override protected void DataInit()//数据初始化
        {
            MyApp.Components.Accessories acc = new MyApp.Components.Accessories();
            DataTable dt = acc.GetFiles(Server.MapPath(_File_Dir));
            rp_list.DataSource = dt;
            rp_list.DataBind();
        }
    }
}