示例#1
0
        /// <summary>
        /// 回复咨询信息
        /// </summary>
        /// <returns></returns>
        private Hashtable CreateVercode(HttpContext context)
        {
            Hashtable htRet = new Hashtable();

            try
            {
                FastReadServer.admin.UserInfo user = (FastReadServer.admin.UserInfo)context.Session[FastReadServer.admin.CConst.CSession.C_UserInfoKey];
                if (user == null || user.UserId == "")
                {
                    htRet["msg"] = "用户信息超时,请重新登录!";
                    htRet["ok"]  = false;
                    return(htRet);
                }

                int iNum = CConvert.ToInt32(context.Request["num"]);
                if (iNum == 0)
                {
                    htRet["msg"] = "请输入正确的数字!";
                    htRet["ok"]  = false;
                    return(htRet);
                }

                DBIndex dbm  = new DBIndex();
                int     iRet = dbm.CreateVerCode(iNum);
                if (iRet <= 0)
                {
                    htRet["msg"] = "服务器异常,请联系管理员!";
                    htRet["ok"]  = false;
                }
                else
                {
                    htRet["ok"] = true;
                }
            }
            catch (Exception ex)
            {
                htRet["ok"]  = false;
                htRet["msg"] = "处理失败!" + ex.Message;
            }
            return(htRet);
        }