Exemplo n.º 1
0
 public override bool Delete(We7.Model.Core.PanelContext data)
 {
     try
     {
         string adviceid = data.DataKey["ID"] as string;
         AdviceHelper.DeleteAdvice(adviceid);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(true);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 删除反馈信息事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DeleteBtn_Click(object sender, EventArgs e)
        {
            List <string> list = GetIDs();

            if (list.Count < 1)
            {
                Messages.ShowMessage("您没有选择任何一条记录!");
                return;
            }
            AdviceHelper.DeleteAdvice(list);
            Messages.ShowMessage(string.Format("您已经成功删除了{0}条反馈信息", list.Count.ToString()));
            //记录日志
            string atContent = string.Format("删除了{0}个留言反馈", list.Count.ToString());

            AddLog("留言反馈管理", atContent);
            LoadAdvices();
        }
Exemplo n.º 3
0
        void DeleteTypeList(string[] ids)
        {
            List <Advice> list   = new List <Advice>();
            string        aTitle = "";

            foreach (string id in ids)
            {
                list = AdviceHelper.GetAdvices(id);
                foreach (Advice a in list)
                {
                    AdviceHelper.DeleteAdvice(a.ID);
                    aTitle += String.Format("{0};", a.Title);
                }
            }
            //记录日志
            string content = string.Format("删除了{0}个反馈模型:“{1}”", ids.Length.ToString(), aTitle);

            AddLog("反馈模型管理", content);
            string        titles     = "";
            List <string> listString = new List <string>();

            foreach (string id in ids)
            {
                AdviceType at = AdviceTypeHelper.GetAdviceType(id);
                AdviceTypeHelper.DeleteAdviceType(id);
                titles += String.Format("{0};", at.Title);
                string menuName = at.Title + "管理";
                We7.CMS.Common.MenuItem menuItem = MenuHelper.GetMenuItemByTitle(menuName);
                if (menuItem != null)
                {
                    listString.Add(menuItem.ID);
                }
            }
            if (listString != null)
            {
                MenuHelper.DeleteMenuItem(listString);
            }
            //记录日志
            string atContent = string.Format("删除了{0}个反馈模型:“{1}”", ids.Length.ToString(), titles);

            AddLog("反馈模型管理", atContent);
        }