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 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. 3
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. 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 weixinEventAdd()
 {
     mol.EventName = Request.Form["EventName"];
     mol.msgType   = Convert.ToInt32(Request.Form["msgType"]);
     mol.KeyWorld  = Request.Form["KeyWorld"];
     if (bll.Add(mol) != 0)
     {
         CommonMethod.Alert("注册微信事件成功!", "wei_MsgConfig.aspx?menuFid=" + Request.Form["fid"]);
     }
     else
     {
         CommonMethod.Alert("系统正忙,请稍后重试!");
     }
 }
Esempio n. 6
0
        /// <summary>
        /// 编辑微菜单
        /// </summary>
        protected void WeiMenusEdits()
        {
            string id = Request.Form["menuId"];

            if (!string.IsNullOrEmpty(id))
            {
                menuMol                 = menuBll.GetModel(Convert.ToInt32(id));
                menuMol.WX_menuName     = Request.Form["WX_menuName"];
                menuMol.WX_MenusKey_URL = Request.Form["WX_MenusKey_URL"];
                menuMol.flat2           = Convert.ToInt32(Request.Form["flat2"]);
                if (menuBll.Update(menuMol))
                {
                    CommonMethod.Alert("编辑微菜单成功!", "wei_MenusList.aspx?menuFid=" + Request.Form["fid"]);
                }
                else
                {
                    CommonMethod.Alert("系统正忙,请稍后重试!");
                }
            }
            else
            {
                CommonMethod.Alert("系统正忙,请稍后重试!");
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 保存事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSumit_Click(object sender, EventArgs e)
        {
            Hashtable hs = new Hashtable();

            //获取图片路径
            if (hfImage.Value != imagepath)
            {
                string filename = fuPicture.FileName;
                if (!string.IsNullOrEmpty(filename))
                {
                    string type = (filename.Substring(filename.LastIndexOf(".") + 1)).ToLower(); //得到文件的后缀
                    if (type == "jpg" || type == "gif" || type == "bmp" || type == "png")
                    {
                        string name1 = Guid.NewGuid().ToString();
                        string name  = name1.ToString() + "." + type;
                        string fpath = HttpContext.Current.Server.MapPath("~\\upload\\image\\") + name;
                        fuPicture.SaveAs(fpath); //将文件保存到fpath这个路径里面

                        CommonMethod.CreateThumbnail(fpath, HttpContext.Current.Server.MapPath("~\\upload\\image\\") + "SN" + name, 160, 160, false);

                        //创建缩略图
                        hs["CentreLogo"] = name;
                        //原记录中有图片信息。
                        if (!String.IsNullOrEmpty(imagepath))
                        {
                            //删除原来的旧图片。
                            FileInfo file;
                            file = new FileInfo(Server.MapPath("..") + "\\..\\upload\\image\\" + imagepath);
                            file.Delete();

                            file = new FileInfo(Server.MapPath("..") + "\\..\\upload\\image\\" + "SN" + imagepath);
                            file.Delete();
                        }
                    }
                    else
                    {
                        CommonMethod.Alert(this.Page, "不支持该格式的图标!支持jpg、gif、bmp、png");
                        return;
                    }
                }
            }

            hs["Extension"]     = this.txtExtension.Value;
            hs["HotelNameCode"] = this.txtHotelNameCode.Value;

            if (Request.QueryString["AdminHotelid"] != null)
            {
                //修改
                if (DataFactory.SqlDataBase().UpdateByHashtable("Hotel_Admin", "AdminHotelid", Hdhoteladmin.Value, hs) > 0)
                {
                    ShowMsgHelper.Alert("编辑成功!");


                    Response.Redirect("setcard.aspx?AdminHotelid=" + Hdhoteladmin.Value + "", false);
                }
                else
                {
                    ShowMsgHelper.Alert_Error("编辑失败!");
                }
            }
        }
Esempio n. 8
0
 /// <summary>
 /// 清空缓存
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Button1_Click(object sender, EventArgs e)
 {
     BrnMall.Core.Common.CacheHelper.RemoveAllCache();
     CommonMethod.Alert("系统缓存清空成功!");
 }