private void LoadData(string strType) { if (strType == "1") { string strID = Request.QueryString["value"];//操作ID zlzw.BLL.BannerListBLL bannerListBLL = new zlzw.BLL.BannerListBLL(); zlzw.Model.BannerListModel bannerListModel = bannerListBLL.GetModel(int.Parse(Get_BannerID(strID))); txbBannerTitle.Text = bannerListModel.BannerTitle; //焦点图名称 txbBannerContent.Text = bannerListModel.BannerContent; //焦点图简介 txbBannerLinks.Text = bannerListModel.BannerLinks; //焦点图链接地址 if (bannerListModel.IsHot == 1) { ckbIsHot.Checked = true; } else { ckbIsHot.Checked = false; } labPreviweImg.ImageUrl = bannerListModel.BannerImage.Split('~')[1]; ViewState["BannerImage"] = bannerListModel.BannerImage;//焦点图路径 ViewState["PublishDate"] = bannerListModel.PublishDate.ToString(); ViewState["BannerGUID"] = bannerListModel.BannerGUID.ToString(); ToolbarText2.Text = "编辑一个焦点图"; } btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference(); }
protected void btnDel_Click(object sender, EventArgs e) { if (grid1.SelectedRowIndexArray != null && grid1.SelectedRowIndexArray.Length > 0) { string strSelectID = "0"; for (int i = 0, count = grid1.SelectedRowIndexArray.Length; i < count; i++) { int rowIndex = grid1.SelectedRowIndexArray[i]; foreach (object key in grid1.DataKeys[rowIndex]) { strSelectID = key.ToString(); } } #region 删除逻辑 zlzw.BLL.BannerListBLL BannerListBLL = new zlzw.BLL.BannerListBLL(); zlzw.Model.BannerListModel bannerListModel = BannerListBLL.GetModel(int.Parse(Get_BannerID(strSelectID))); bannerListModel.IsEnable = 0; BannerListBLL.Update(bannerListModel); BannerList_BindGrid(); #endregion } else { return; } }