Пример #1
0
 /// <summary>
 /// 用户注册
 /// </summary>
 /// <param name="context"></param>
 public void UserReg1(HttpContext context)
 {
     var bll = new UserRegBll();
     var qymc = context.Request["qymc"] ?? "";
     var lxr = context.Request["lxr"] ?? "";
     var phonenumber = context.Request["phonenumber"] ?? "";
     try
     {
         var bean = new UserReg()
         {
             Wxid = qymc,
             RNumber = qymc,//用户编号
             bak2 = lxr,//用户名称
             PhoneNumber = phonenumber,
         };
         bll.Add(bean);
         context.Response.Write("{\"success\":true,\"msg\":\"注册成功!\"}");
     }
     catch (Exception e)
     {
         Log.Debug("方法名:UserReg,描述:用户注册方法出错,错误原因:" + e.Message);
         context.Response.Write("{\"success\":false,\"msg\":\"注册失败!\"}");
     }
 }
Пример #2
0
        /// <summary>
        /// 获取用户注册列表
        /// </summary>
        /// <param name="context"></param>
        public void GetUserRegList(HttpContext context)
        {
            var wxid = context.Request["wxid"] ?? "";
            var phone = context.Request["phone"] ?? "";

            try
            {
                UserRegBll bll = new UserRegBll();
                DataTable dt = bll.Query(new UserReg() { Wxid = wxid, PhoneNumber = phone });
                var list = ConvertHelper<UserReg>.ConvertToList(dt);
                hashtable["rows"] = list.ToList();
                hashtable["total"] = list.Count;
                var json = _jss.Serialize(hashtable);
                context.Response.Write(json);
            }
            catch (Exception e)
            {
                Log.Debug("方法名:GetUserRegList,描述:获取用户注册列表方法出错,错误原因:" + e.Message);
                context.Response.Write("{\"success\":false,\"msg\":\"查询失败!\"}");
            }
        }
Пример #3
0
 /// <summary>
 /// 用户注册
 /// </summary>
 /// <param name="context"></param>
 public void UserReg(HttpContext context)
 {
     var bll = new UserRegBll();
     var wxid = context.Request["wxid"] ?? "";
     var qymc = context.Request["qymc"] ?? "";
     var lxr = context.Request["lxr"] ?? "";
     var phonenumber = context.Request["phonenumber"] ?? "";
     var tel = context.Request["tel"] ?? "";
     var zhiwu = context.Request["zhiwu"] ?? "";
     try
     {
         var bean = new UserReg()
         {
             Wxid = wxid,
             RNumber = qymc,//用户编号
             bak1 = qymc,//企业名称
             bak2 = lxr,//用户名称
             bak3 = tel,//固话
             bak4 = zhiwu,//职务
             PhoneNumber = phonenumber,//手机
         };
         bll.Add(bean);
         context.Response.Write("{\"success\":true,\"msg\":\"注册成功!\"}");
     }
     catch (Exception e)
     {
         Log.Debug("方法名:UserReg,描述:用户注册方法出错,错误原因:" + e.Message);
         context.Response.Write("{\"success\":false,\"msg\":\"注册失败!\"}");
     }
 }
Пример #4
0
 /// <summary>
 /// 删除绑定
 /// </summary>
 /// <param name="context"></param>
 public void DelUserReg(HttpContext context)
 {
     var wxid = context.Request["wxid"] ?? "";
     var qymc = context.Request["qymc"] ?? "";
     var lxr = context.Request["lxr"] ?? "";
     var dh = context.Request["dh"] ?? "";
     var phone = context.Request["phone"] ?? "";
     try
     {
         UserRegBll bll = new UserRegBll();
         bll.Del(new UserReg()
         {
             Wxid = wxid,
         });
         context.Response.Write("{\"success\":true,\"msg\":\"删除成功!\"}");
     }
     catch (Exception e)
     {
         Log.Debug("方法名:DelUserReg,描述:删除绑定方法出错,错误原因:" + e.Message);
         context.Response.Write("{\"success\":false,\"msg\":\"删除失败!\"}");
     }
 }