Beispiel #1
0
    public void getUserLastMlsData(string para)
    {
        try
        {
            string userCode = joPara["userCode"].ToString();

            BLL.MlsDataBLL             dataBll  = new MlsDataBLL();
            IList <Model.MlsDataModel> dataList = dataBll.GetDataByCode("{'userCode':'" + userCode + "'}");

            if (dataList == null)//检索失败
            {
                ReturnData(0, "失败", null);
            }
            else if (dataList.Count < 1)
            {//无数据
                ReturnData(0, "null", null);
            }
            else
            {
                ReturnData(1, "成功", dataList[0]);
            }
        }
        catch (Exception ex)
        {
            ErrorUtil.RecordErrorToFile(ex, joPara, Context);
            ReturnData(0, ex.Message, "");
        }
        finally
        {
            Context.Response.End();
        }
    }
Beispiel #2
0
    public void loginVerification(string para)
    {
        try
        {
            string mlsCode  = joPara["mlsCode"].ToString();
            string userCode = joPara["userCode"].ToString();
            string pwd      = joPara["pwd"].ToString();

            BLL.MlsUserBLL             objBll = new MlsUserBLL();
            IList <Model.MlsUserModel> list   = objBll.GetLoginUser(mlsCode, userCode, pwd);

            if (list == null || list.Count < 1)
            {
                ReturnData(0, "失败", null);
            }
            else
            {
                BLL.MlsDataBLL             dataBll  = new MlsDataBLL();
                IList <Model.MlsDataModel> dataList = dataBll.GetDataByCode("{'userCode':'" + userCode + "'}");
                ReturnData(1, "成功", list[0]);
            }
        }
        catch (Exception ex)
        {
            ErrorUtil.RecordErrorToFile(ex, joPara, Context);
            ReturnData(0, ex.Message, "");
        }
        finally
        {
            Context.Response.End();
        }
    }
Beispiel #3
0
    public void getUserListByCodeOrName(string para)
    {
        try
        {
            string keyword = joPara["keyword"].ToString();

            BLL.MlsUserBLL             objBll = new MlsUserBLL();
            IList <Model.MlsUserModel> list   = objBll.GetUserByCodeOrName(keyword);

            if (list == null || list.Count < 1)
            {
                ReturnData(0, "失败", null);
            }
            else
            {
                ReturnData(1, "成功", list);
            }
        }
        catch (Exception ex)
        {
            ErrorUtil.RecordErrorToFile(ex, joPara, Context);
            ReturnData(0, ex.Message, "");
        }
        finally
        {
            Context.Response.End();
        }
    }
Beispiel #4
0
 public void getUserPositionSituation(string para)
 {
     try
     {
         ReturnData(1, "成功", "");
     }
     catch (Exception ex)
     {
         ErrorUtil.RecordErrorToFile(ex, joPara, Context);
         ReturnData(0, ex.Message, "");
     }
     finally
     {
         Context.Response.End();
     }
 }
Beispiel #5
0
    /// <summary>
    /// 执行请求之前的准备工作
    /// </summary>
    private void initVRequest()
    {
        bool   tag     = true;
        string strPara = HttpContext.Current.Request.Params["para"];

        try
        {
            joPara = JObject.Parse(strPara);
            string strToken  = joPara["Token"].ToString();
            string strDToken = DesUtil.Base64Decode(strToken);

            NameValueCollection colParams = new NameValueCollection();
            tokenModel             = new TokenModel();
            colParams              = DesUtil.GetQueryString(strDToken);
            tokenModel.time        = colParams["time"];
            tokenModel.num         = colParams["num"];
            tokenModel.accessToken = colParams["accessToken"];
            tokenModel.appId       = colParams["appId"];
            tokenModel.version     = colParams["version"];
            tokenModel.platform    = colParams["platform"];
            tokenModel.phoneUUID   = colParams["phoneUUID"];

            string strValidate = DesUtil.Encrypt(tokenModel.time + "_" + tokenModel.num);
            if (tokenModel.accessToken != strValidate || tokenModel.accessToken == null)
            {
                tag = false;
                ReturnData(0, "密钥无效", "");
            }
        }
        catch (Exception ex)
        {
            tag = false;
            ErrorUtil.RecordErrorToFile(ex, strPara, Context);
            ReturnData(0, "参数有误,请重新输入", ex);
        }
        finally
        {
            if (!tag)
            {
                Context.Response.End();
            }
        }
    }
Beispiel #6
0
    public void getMLSList(string para)
    {
        try
        {
            BLL.MlsMarathonBLL       objBll = new MlsMarathonBLL();
            IList <MlsMarathonModel> list   = objBll.getMLSList();

            ReturnData(1, "成功", list);
        }
        catch (Exception ex)
        {
            ErrorUtil.RecordErrorToFile(ex, joPara, Context);
            ReturnData(0, ex.Message, "");
        }
        finally
        {
            Context.Response.End();
        }
    }
Beispiel #7
0
    /// <summary>
    /// 执行请求之前的准备工作
    /// </summary>
    private void initPRequest()
    {
        bool   tag     = true;
        string strPara = HttpContext.Current.Request.Params["para"];

        try
        {
            joPara = JObject.Parse(strPara);
        }
        catch (Exception ex)
        {
            tag = false;
            ErrorUtil.RecordErrorToFile(ex, strPara, Context);
            ReturnData(0, "参数有误,请重新输入", "");
        }
        finally
        {
            if (!tag)
            {
                Context.Response.End();
            }
        }
    }