Beispiel #1
0
        public void save()
        {
            ActiveResult vret        = ActiveResult.Valid(AppConfig.SUCCESS);
            String       cKeyID      = StringEx.getString(request["ID"]);
            String       cUser_Count = StringEx.getString(request["user_count"]);
            String       cORG_ID     = StringEx.getString(request["org_id"]);
            String       cAREA_ID    = StringEx.getString(request["AREA_ID"]);

            cAREA_ID = cAREA_ID.Replace("00", "");

            XT_MOBILE_USER vo = new XT_MOBILE_USER();

            vo = (XT_MOBILE_USER)RequestUtil.readFromRequest(request, vo);

            vo.user_count = vo.phone_num;
            if (String.IsNullOrEmpty(cORG_ID))
            {
                vret = ActiveResult.Valid("单位编码不能为空!");
            }
            else if (String.IsNullOrEmpty(vo.phone_num))
            {
                vret = ActiveResult.Valid("手机号码不能为空!");
            }

            if (vret.result == AppConfig.SUCCESS)
            {
                int iCode = dao.save(vo, cKeyID);
                vret = ActiveResult.Valid(iCode);
            }
            response.Write(vret.toJSONString());
        }
Beispiel #2
0
        public void find()
        {
            ActiveResult vret   = ActiveResult.Valid(AppConfig.FAILURE);
            String       cKeyID = StringEx.getString(request["ID"]);

            if (String.IsNullOrEmpty(cKeyID))
            {
                vret = ActiveResult.Valid("用户账号不能为空!");
            }
            else
            {
                XT_MOBILE_USER vInfo = dao.FindOne(cKeyID);
                vret = ActiveResult.returnObject(vInfo);
            }
            response.Write(vret.toJSONString());
        }