/// <summary>
 /// 返回栏目名称
 /// </summary>
 protected string GetChannel_Title(int _classId)
 {
     DtCms.BLL.Channel bll = new DtCms.BLL.Channel();
     if (bll.Exists(_classId))
     {
         DtCms.Model.Channel model = bll.GetModel(_classId);
         return(model.Title);
     }
     return("");
 }
Example #2
0
 //输出栏目名称
 public static string ViewChannelTitle(int classId)
 {
     DtCms.BLL.Channel bll = new DtCms.BLL.Channel();
     if (bll.Exists(classId))
     {
         DtCms.Model.Channel model = bll.GetModel(classId);
         return(model.Title);
     }
     return("所有列表");
 }
Example #3
0
        //删除操作
        protected void rptClassList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            HiddenField txtClassId = (HiddenField)e.Item.FindControl("txtClassId");

            switch (e.CommandName.ToLower())
            {
            case "btndel":
                //保存日志
                SaveLogs("[栏目类别]删除类别:" + bll.GetModel(Convert.ToInt32(txtClassId.Value)));
                //删除记录
                bll.Delete(Convert.ToInt32(txtClassId.Value));
                BindData();
                JscriptPrint("批量删除成功啦!", "", "Success");
                break;
            }
        }
Example #4
0
 public int classId; //ID
 protected void Page_Load(object sender, EventArgs e)
 {
     chkLoginLevel("editChannel");
     //取得栏目传参
     if (int.TryParse(Request.Params["kindId"], out kindId) && int.TryParse(Request.Params["classId"], out classId))
     {
         model = bll.GetModel(classId);
         if (!Page.IsPostBack)
         {
             ShowInfo();
         }
     }
     else
     {
         JscriptMsg(350, 230, "错误提示", "<b>出现错误啦!</b>您要修改类别的种类不明确或参数不正确。", "back", "Error");
     }
 }