public WIP_Models.ReturnBody <T2> Validate <T1, T2>(T1 param, ref ExceptionInfoEntity exception)
        {
            ReturnBody <T2> retBody = null;

            #region 验证

            retBody = ValidateDataHelper.CommonValidateIsNULL <T1, T2>(param, ref exception);
            if (retBody != null)
            {
                return(retBody);
            }


            string _userName = param as string;

            if (string.IsNullOrEmpty(_userName))
            {
                retBody = new ReturnBody <T2>()
                {
                    resCode = ResCode.PARAMETERNOEMPTY,
                    resMsg  = "查询登录名不能为空"
                };
            }

            #endregion

            return(retBody);
        }
Esempio n. 2
0
        public WIP_Models.ReturnBody <T2> Validate <T1, T2>(T1 param, ref ExceptionInfoEntity exception)
        {
            ReturnBody <T2> retBody = null;

            #region 验证

            retBody = ValidateDataHelper.CommonValidateIsNULL <T1, T2>(param, ref exception);
            if (retBody != null)
            {
                return(retBody);
            }

            /*
             * ValidateInStoreParam _param = param as ValidateInStoreParam;
             *
             * List<ValidateModel> columnsList = new List<ValidateModel>() {
             *  new ValidateModel(){ ChinaName="流转卡号", DataType=typeof(string), DataValue=_param.processCardNumber },
             *  new ValidateModel(){ ChinaName="设备号", DataType=typeof(string), DataValue=_param.equipId },
             *  new ValidateModel(){ ChinaName="时间戳", DataType=typeof(DateTime), DataValue=_param.timestamp }
             * };
             * retBody = ValidateDataHelper.CommonValidate<T1, T2>(param, ref exception, columnsList);
             * if (retBody != null)
             * {
             *  return retBody;
             * }
             * //*/

            #endregion

            return(retBody);
        }