예제 #1
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();


            material = MaterialsBll.GetDetailById(Request["meterial_id"].TryToLong());

            if (material == null)
            {
                material = new Material();
            }

            imgs = string.IsNullOrEmpty(material.imgs) ? null : material.imgs.Split('?');

            me = UserBll.GetSessionUser();
            if (me != null)
            {
                var myId = me.user_id;
                me          = UserBll.GetUserById(myId);
                isLogin     = true;
                canExchange = me.bonuses >= material.bonus;
            }
            else
            {
                me          = new User();
                isLogin     = false;
                canExchange = false;
            }

            tdks = SeoBll.GetTDKbyPage("thjc_xq.aspx", Request["meterial_id"]).Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }