public override void LoadSettings()
        {
            base.LoadSettings();

            int _tabfw = TabId;
            if (Settings["TabForward"] != null)
            {
                if (!int.TryParse(Settings["TabForward"].ToString(), out _tabfw))
                {
                    _tabfw = TabId;
                }
            }

            int _size = new V_Base().PageSize;
            if (Settings["PageSize"] != null)
            {
                if (!int.TryParse(Settings["PageSize"].ToString(), out _size) || _size < 1)
                {
                    _size = new V_Base().PageSize;
                }
            }

            int _cat = -1;
            if (Settings["CatProduct"] != null)
            {
                if (!int.TryParse(Settings["CatProduct"].ToString(), out _cat))
                {
                    _cat = -1;
                }
            }

            if (Settings["NoPrice"] != null)
            {
                txtNoPrice.Text = Settings["NoPrice"].ToString();
            }
            else
            {
                txtNoPrice.Text = "Call";
            }

            //string _listType = Settings["filenamelist"] == null ? "default" : Settings["filenamelist"].ToString();

            TempService tsService = new TempService(this);

            //List
            List<string> lt = tsService.GetFileLists(TypeTemp.List, "gif");
            List<ItemTemp> itemTemps = new List<ItemTemp>();
            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp { NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm") });
            }
            rptList.DataSource = itemTemps;
            rptList.DataBind();
            txtList.Text = tsService.GetContentTempFromDB(TypeTemp.List);

            //detail
            lt = tsService.GetFileLists(TypeTemp.Detail, "gif");
            itemTemps.Clear();
            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp { NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm") });
            }
            rptDetail.DataSource = itemTemps;
            rptDetail.DataBind();
            txtDetail.Text = tsService.GetContentTempFromDB(TypeTemp.Detail);

            //Relative
            lt = tsService.GetFileLists(TypeTemp.Relative, "gif");
            itemTemps.Clear();
            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp { NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm") });
            }
            rptRelative.DataSource = itemTemps;
            rptRelative.DataBind();
            txtRelative.Text = tsService.GetContentTempFromDB(TypeTemp.Relative);

            //tao cat
            LoadCat(_cat);
            this.txtSize.Text = _size.ToString();
            LoadTab(_tabfw);
        }
        public override void LoadSettings()
        {
            base.LoadSettings();

            int _tabfw = TabId;

            if (Settings["TabForward"] != null)
            {
                if (!int.TryParse(Settings["TabForward"].ToString(), out _tabfw))
                {
                    _tabfw = TabId;
                }
            }

            int _size = new V_Base().PageSize;

            if (Settings["PageSize"] != null)
            {
                if (!int.TryParse(Settings["PageSize"].ToString(), out _size) || _size < 1)
                {
                    _size = new V_Base().PageSize;
                }
            }

            int _cat = -1;

            if (Settings["CatProduct"] != null)
            {
                if (!int.TryParse(Settings["CatProduct"].ToString(), out _cat))
                {
                    _cat = -1;
                }
            }

            if (Settings["NoPrice"] != null)
            {
                txtNoPrice.Text = Settings["NoPrice"].ToString();
            }
            else
            {
                txtNoPrice.Text = "Call";
            }


            //string _listType = Settings["filenamelist"] == null ? "default" : Settings["filenamelist"].ToString();

            TempService tsService = new TempService(this);

            //List
            List <string>   lt        = tsService.GetFileLists(TypeTemp.List, "gif");
            List <ItemTemp> itemTemps = new List <ItemTemp>();

            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp {
                    NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm")
                });
            }
            rptList.DataSource = itemTemps;
            rptList.DataBind();
            txtList.Text = tsService.GetContentTempFromDB(TypeTemp.List);

            //detail
            lt = tsService.GetFileLists(TypeTemp.Detail, "gif");
            itemTemps.Clear();
            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp {
                    NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm")
                });
            }
            rptDetail.DataSource = itemTemps;
            rptDetail.DataBind();
            txtDetail.Text = tsService.GetContentTempFromDB(TypeTemp.Detail);

            //Relative
            lt = tsService.GetFileLists(TypeTemp.Relative, "gif");
            itemTemps.Clear();
            for (int i = 0; i < lt.Count; i++)
            {
                itemTemps.Add(new ItemTemp {
                    NameImage = lt[i], NameTemp = lt[i].Replace(".gif", ".htm")
                });
            }
            rptRelative.DataSource = itemTemps;
            rptRelative.DataBind();
            txtRelative.Text = tsService.GetContentTempFromDB(TypeTemp.Relative);

            //tao cat
            LoadCat(_cat);
            this.txtSize.Text = _size.ToString();
            LoadTab(_tabfw);
        }