Exemplo n.º 1
0
 protected string getImgUrl()
 {
     if (!String.IsNullOrEmpty(strid))
     {
         int Id = (Convert.ToInt32(strid));
         Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
         Cms.Model.ProductInfo model = dal.GetModel(Id);
         if (model != null)
             return model.ImgUrl;
         else
             return "";
     }
     return "";
 }
Exemplo n.º 2
0
        //赋值
        private void ShowInfo(int Id)
        {
            Cms.DAL.ProductInfo   dal    = new Cms.DAL.ProductInfo();
            Cms.Model.ProductInfo model  = dal.GetModel(Id);
            Cms.DAL.Channel       chnDal = new Cms.DAL.Channel();

            this.lblId.Text      = model.SpecId.ToString();
            this.lblType.Text    = chnDal.GetProductTypeTitle(model.TypeId);
            this.lblBrand.Text   = chnDal.GetProductBrandTitle(model.BrandId);
            this.lblName.Text    = chnDal.GetProductNameTitle(model.NameId);
            this.lblSpec.Text    = model.Specifications;
            this.lblContent.Text = Cms.Common.Utils.ToTxt(model.Description);
            this.lblClick.Text   = model.Click.ToString();
            this.lblIsTop.Text   = model.IsTop.ToString();
            this.lblPubTime.Text = model.PubTime.ToString();
        }
Exemplo n.º 3
0
        //赋值
        private void ShowInfo(int Id)
        {
            Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
            Cms.Model.ProductInfo model = dal.GetModel(Id);
            Cms.DAL.Channel chnDal = new Cms.DAL.Channel();

            this.lblId.Text = model.SpecId.ToString();
            this.lblType.Text = chnDal.GetProductTypeTitle(model.TypeId);
            this.lblBrand.Text = chnDal.GetProductBrandTitle(model.BrandId);
            this.lblName.Text = chnDal.GetProductNameTitle(model.NameId);
            this.lblSpec.Text = model.Specifications;
            this.lblContent.Text =Cms.Common.Utils.ToTxt(model.Description);
            this.lblClick.Text = model.Click.ToString();
            this.lblIsTop.Text = model.IsTop.ToString();
            this.lblPubTime.Text = model.PubTime.ToString();
        }
Exemplo n.º 4
0
 protected string getImgUrl()
 {
     if (!String.IsNullOrEmpty(strid))
     {
         int Id = (Convert.ToInt32(strid));
         Cms.DAL.ProductInfo   dal   = new Cms.DAL.ProductInfo();
         Cms.Model.ProductInfo model = dal.GetModel(Id);
         if (model != null)
         {
             return(model.ImgUrl);
         }
         else
         {
             return("");
         }
     }
     return("");
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.Params["specId"] as string, out this.specId))
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!'),location.href='ProductList.aspx';</script>");
                return;
            }

            Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
            model = dal.GetModel(this.specId);//获得Id
            if (model == null)
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!'),location.href='ProductList.aspx';</script>");
                return;
            }
            //浏览数+1
            dal.UpdateField(this.specId, "Click=Click+1");
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>menuEnable(2);</script>");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.Params["specId"] as string, out this.specId))
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!'),location.href='ProductList.aspx';</script>");
                return;
            }

            Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
            model = dal.GetModel(this.specId);//获得Id
            if (model == null)
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!'),location.href='ProductList.aspx';</script>");
                return;
            }
            //浏览数+1
            dal.UpdateField(this.specId, "Click=Click+1");
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>menuEnable(2);</script>");
        }
Exemplo n.º 7
0
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int id = Convert.ToInt32(((Label)e.Item.FindControl("lb_id")).Text);

            Cms.DAL.ProductInfo   dal   = new Cms.DAL.ProductInfo();
            Cms.Model.ProductInfo model = dal.GetModel(id);
            switch (e.CommandName.ToLower())
            {
            case "ibtntop":
                if (model.IsTop == 1)
                {
                    dal.UpdateField(id, "IsTop=0");
                }
                else
                {
                    dal.UpdateField(id, "IsTop=1");
                }
                break;
            }
            RptBind();
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.Params["specId"] as string, out this.specId))
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!');history.go(-1);</script>");
                return;
            }

            Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
            model = dal.GetModel(this.specId);//获得Id
            if (model == null)
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!');history.go(-1);</script>");
                return;
            }
            if (!Page.IsPostBack)
            {
                //赋值
                showInfo();
            }
        }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.Params["specId"] as string, out this.specId))
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!');history.go(-1);</script>");
                return;
            }

            Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
            model = dal.GetModel(this.specId);//获得Id
            if (model == null)
            {
                Response.Write("<script>alert('您要查看的信息参数不正确或不存在!');history.go(-1);</script>");
                return;
            }
            if (!Page.IsPostBack)
            {
                //赋值
                showInfo();
            }
        }
Exemplo n.º 10
0
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = Convert.ToInt32(((Label)e.Item.FindControl("lb_id")).Text);
     Cms.DAL.ProductInfo dal = new Cms.DAL.ProductInfo();
     Cms.Model.ProductInfo model = dal.GetModel(id);
     switch (e.CommandName.ToLower())
     {
         case "ibtntop":
             if (model.IsTop == 1)
                 dal.UpdateField(id, "IsTop=0");
             else
                 dal.UpdateField(id, "IsTop=1");
             break;
     }
     RptBind();
 }