protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         breadcrums = tach;
         int cid = CCommon.Get_QueryNumber(Queryparam.Cid);
         int iid = CCommon.Get_QueryNumber(Queryparam.Iid);
         string cate = HttpContext.Current.Request.QueryString["cate"];
         string alias = HttpContext.Current.Request.QueryString[Queryparam.Iid];
         if (cate != null && cate != "index")
         {
             cate = cate.Replace(".aspx", "");
             CCategory DAL = new CCategory();
             CategoryInfo cat = DAL.GetCategoryInfo(cate,61);
             if (cat != null)
             {
                 cid = cat.Id;
                 lk = cat.Id.ToString();
                 //Cidroot = cat.Id;
                 breadcrums += "<a href=\"/tu-dien-thuat-ngu-abc-vn-at-.aspx\">Từ điển thuật ngữ</a>";
                 breadcrums += tach;
                 string linkCat = "<a href=\"/tu-dien-thuat-ngu-" + Langview + "/" + CFunctions.install_urlname(cat.Name) + "\">" + cat.Name + "</a>";
                 breadcrums += linkCat;
             }
         }
         if (iid > 0)
         {
             Load_Info(iid);
         }
         else
         {
             Load_Info(alias);
         }
         Bind_Categoryinfo();
         if (pnlInfo.Visible)
         {
             if (CFunctions.GetViewSetting(Webcmm.Id.News, ViewSetting.ListFollowed))
                 this.Bind_rptListfollow(cid);
             else
                 pnlListfollow.Visible = false;
         }
         else
         {
             this.Bind_rptList();
         }
         if (breadcrums.Equals(tach))
         {
             breadcrums += "<a href=\"/tu-dien-thuat-ngu-abc-vn-at-.aspx\">Từ điển thuật ngữ</a>";
         }
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                /*int cid = CCommon.Get_QueryNumber(Queryparam.Cid);
                int iid = CCommon.Get_QueryNumber(Queryparam.Iid);*/
                int cid = 0;
                string cate = HttpContext.Current.Request.QueryString[Queryparam.Cid];
                string alias = HttpContext.Current.Request.QueryString[Queryparam.Iid];

                this.Load_Info(alias);
                if(cate != null && cate != "index" )
                {
                    cate = cate.Replace(".aspx", "");
                    CCategory DAL = new CCategory();
                    CategoryInfo cat = DAL.GetCategoryInfo(cate);
                    if (cat != null)
                    {
                        cid = cat.Id;
                    }
                }
                this.Cid = cid;
                if (pnlInfo.Visible)
                {
                    this.Bind_rptCategory();
                    if (CFunctions.GetViewSetting(Webcmm.Id.News, ViewSetting.ListVisibled))
                    {
                        this.Bind_rptListByCategory();
                    }
                    else
                    {
                        pnlListByCategory.Visible = false;
                    }
                    if (CFunctions.GetViewSetting(Webcmm.Id.News, ViewSetting.ListFollowed))
                        this.Bind_rptListfollow();
                    else
                        pnlListfollow.Visible = false;
                }
                else
                {
                    if (!CFunctions.GetViewSetting(Webcmm.Id.News, ViewSetting.ListByCategory))
                        this.Bind_rptCategory();
                    this.Bind_rptListByCategory();
                }

            }
        }