Example #1
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);
        }