Esempio n. 1
0
 protected void gridView_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     Cultural.Model.Link link = new Cultural.Model.Link();
     if (e.CommandName == "LinkDelete")
     {
         link        = bll.GetModel(int.Parse(e.CommandArgument.ToString()));
         link.Status = "0";
         bll.Update(link);
         BindData();
     }
     if (e.CommandName == "LinkShow")
     {
         link        = bll.GetModel(int.Parse(e.CommandArgument.ToString()));
         link.Status = link.Status == "2"?"1":"2";
         bll.Update(link);
         BindData();
     }
 }
Esempio n. 2
0
 public void TextBoxBind(int id)
 {
     Cultural.Model.Link link = new Cultural.Model.Link();
     link                      = linkBll.GetModel(id);
     txtLinkName.Text          = link.LinkName;
     txtURL.Text               = link.URL;
     ddlLinkType.SelectedIndex = int.Parse(link.URLType);
     LaodImgPath.Value         = "../../Image/LinkPhoto/" + link.PicURL;
     hidFilePath.Value         = link.PicURL;
 }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Cultural.BLL.Link linkBLL = new Cultural.BLL.Link();
            string            id      = Request.QueryString["id"];

            if (id != null && id.ToString() != "")
            {
                Cultural.Model.Link link = new Cultural.Model.Link();
                link             = linkBLL.GetModel(int.Parse(id));
                lblName.Text     = link.LinkName;
                lblURL.Text      = link.URL;
                LinkImg.ImageUrl = "../../Image/LinkPhoto/" + link.PicURL;
                URL = link.URL;
            }
        }