Esempio n. 1
0
        /// <summary>
        /// 添加文本事件
        /// </summary>
        protected void AddText()
        {
            textMol.EventCate = Request.Form["EventName"];//事件类型  菜单  关注等
            string EventId = Request.Form["EventId"];

            DelEvent();//先删除 后添加
            if (!string.IsNullOrEmpty(EventId))
            {
                eventMol         = eventBll.GetModel(Convert.ToInt32(EventId));
                eventMol.msgType = 1;
                eventMol.flat1   = 1;      //是否存在相应的消息事件 1代表已拥有
                eventBll.Update(eventMol); //更新事假的消息类型
                textMol.EventId    = Convert.ToInt32(EventId);
                textMol.msgContent = CommonMethod.CheckParamThrow(Request.Form["msgContent"]);
                if (textBll.Add(textMol) != 0)
                {
                    CommonMethod.Alert("操作成功!", "wei_MsgConfig.aspx?menuFid=" + Request.Form["fid"]);
                }
                else
                {
                    CommonMethod.Alert("系统正忙,请稍后重试!");
                }
            }
            else
            {
                CommonMethod.Alert("系统正忙,请稍后重试!");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 添加图文事件
        /// </summary>
        protected void AddNews()
        {
            newsMol.EventCate = Request.Form["EventName"];//事件类型  菜单  关注等
            string EventId = Request.Form["EventId"];

            DelEvent();//先删除 后添加
            if (!string.IsNullOrEmpty(EventId))
            {
                eventMol         = eventBll.GetModel(Convert.ToInt32(EventId));
                eventMol.msgType = 2;
                eventMol.flat1   = 1;      //是否存在相应的消息事件 1代表已拥有
                eventBll.Update(eventMol); //更新事假的消息类型

                newsMol.EventId         = Convert.ToInt32(EventId);
                newsMol.newsTitle       = CommonMethod.CheckParamThrow(Request.Form["newsTitle"]);
                newsMol.newsDescription = CommonMethod.CheckParamThrow(Request.Form["newsDescription"]);
                newsMol.newsPicUrl      = CommonMethod.CheckParamThrow(Request.Form["newsPicUrl"]);
                newsMol.newsUrl         = CommonMethod.CheckParamThrow(Request.Form["newsUrl"]);
                if (newsBll.Add(newsMol) != 0)
                {
                    CommonMethod.Alert("操作成功!", "wei_MsgConfig.aspx?menuFid=" + Request.Form["fid"]);
                }
                else
                {
                    CommonMethod.Alert("系统正忙,请稍后重试!");
                }
            }
            else
            {
                CommonMethod.Alert("系统正忙,请稍后重试!");
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 添加文本事件
        /// </summary>
        protected void AddText()
        {
            DelEvent();//先删除原来的事件  再添加新事件
            //
            string EventId = Request.Form["EventId"];

            if (!string.IsNullOrEmpty(EventId))
            {
                menuMol       = menuBll.GetModel(Convert.ToInt32(EventId));
                menuMol.flat1 = 1;       //代表发送文本
                menuBll.Update(menuMol); //更新数据
                textMol.EventId    = Convert.ToInt32(EventId);
                textMol.msgContent = CommonMethod.CheckParamThrow(Request.Form["msgContent"]);
                textMol.EventCate  = "menu";//事件类型 菜单
                if (textBll.Add(textMol) != 0)
                {
                    CommonMethod.Alert("恭喜编辑菜单成功!", "wei_MenusConfig.aspx?menuFid=" + Request.Form["fid"]);
                }
                else
                {
                    CommonMethod.Alert("系统正忙,请稍后重试!");
                }
            }
            else
            {
                CommonMethod.Alert("系统正忙,请稍后重试!");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 添加图文事件
        /// </summary>
        protected void AddNews()
        {
            DelEvent();//先删除原来的事件  再添加新事件
            //
            string EventId = Request.Form["EventId"];

            if (!string.IsNullOrEmpty(EventId))
            {
                menuMol       = menuBll.GetModel(Convert.ToInt32(EventId));
                menuMol.flat1 = 2;       //代表发送图文
                menuBll.Update(menuMol); //更新数据
                newsMol.EventId         = Convert.ToInt32(EventId);
                newsMol.newsTitle       = CommonMethod.CheckParamThrow(Request.Form["newsTitle"]);
                newsMol.newsDescription = CommonMethod.CheckParamThrow(Request.Form["newsDescription"]);
                newsMol.newsPicUrl      = CommonMethod.CheckParamThrow(Request.Form["newsPicUrl"]);
                newsMol.newsUrl         = CommonMethod.CheckParamThrow(Request.Form["newsUrl"]); newsMol.EventCate = "menu";//事件类型 菜单
                if (newsBll.Add(newsMol) != 0)
                {
                    CommonMethod.Alert("恭喜编辑菜单成功!", "wei_MenusConfig.aspx?menuFid=" + Request.Form["fid"]);
                }
                else
                {
                    CommonMethod.Alert("系统正忙,请稍后重试!");
                }
            }
            else
            {
                CommonMethod.Alert("系统正忙,请稍后重试!");
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 添加菜单操作
        /// </summary>
        protected void AddMenus()
        {
            string WX_menuName     = CommonMethod.CheckParamThrow(Request.Form["WX_menuName"]);     //菜单名称
            string WX_MenuType     = CommonMethod.CheckParamThrow(Request.Form["WX_MenuType"]);     //菜单类型
            string WX_MenusKey_URL = CommonMethod.CheckParamThrow(Request.Form["WX_MenusKey_URL"]); //菜单取值
            string WX_Fid          = Request.Form["WX_Fid"];

            mol.WX_menuName     = WX_menuName;
            mol.WX_MenuType     = WX_MenuType;
            mol.WX_MenusKey_URL = WX_MenusKey_URL;
            mol.WX_Fid          = Convert.ToInt32(WX_Fid);
            mol.WX_AddTime      = DateTime.Now;
            try
            {
                mol.flat2 = Convert.ToInt32(Request.Form["flat2"]);
            }
            catch
            {
                mol.flat2 = 0;
            }
            string sql  = "";
            int    onum = 0;

            if (mol.WX_Fid.ToString().Trim() == "0")
            {
                sql  = "select count(*) from YX_weiXinMenus where WX_Fid=0";
                onum = Convert.ToInt32(imp.GetSqlOne(CommandType.Text, sql));
                if (onum >= 3)
                {
                    Response.Write("NO");//一级菜单大于三
                }
                else
                {
                    if (bll.Add(mol) != 0)
                    {
                        Response.Write("OK");//添加成功
                    }
                    else
                    {
                        Response.Write("error");//系统错误  添加失败
                    }
                }
            }
            else
            {
                sql  = "select count(*) from YX_weiXinMenus where WX_Fid=" + mol.WX_Fid + "";
                onum = Convert.ToInt32(imp.GetSqlOne(CommandType.Text, sql));
                if (onum >= 5)
                {
                    Response.Write("NOO");//二级菜单大于5
                }
                else
                {
                    if (bll.Add(mol) != 0)
                    {
                        Response.Write("OK");//添加成功
                    }
                    else
                    {
                        Response.Write("error");//系统错误  添加失败
                    }
                }
            }
            Response.End();
        }