Exemplo n.º 1
0
 //=====================================================================
 //  FunctionName : ExportToFile
 /// <summary>
 /// 重载ExportToFile
 /// </summary>
 //=====================================================================
 protected override void ExportToFile()
 {
     appData = new ShortMessageApplicationData();
     appData.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
     appData.ObjectID = base.ObjectID;
     QueryRecord();
     gvPrint.Visible = true;
     gvPrint.DataSource = appData.ResultSet;
     gvPrint.DataBind();
     switch (ddlExportFileFormat.SelectedValue.ToLower())
     {
         case "xls":
             FileLibrary.ExportToExcelFile(gvPrint, "Result");
             break;
         case "doc":
             FileLibrary.ExportToWordFile(gvPrint, "Result");
             break;
         case "pdf":
             string pageSize = ddlPrintPageSize.SelectedValue;
             bool boolOrientation = ddlPrintPageOrientation.SelectedValue == "landscape" ? true : false;
             float marginTop = DataValidateManager.ValidateNumberFormat(txtMarginTop.Text) == true ? Convert.ToSingle(txtMarginTop.Text) : 50;
             float marginRight = DataValidateManager.ValidateNumberFormat(txtMarginRight.Text) == true ? Convert.ToSingle(txtMarginRight.Text) : 50;
             float marginBottom = DataValidateManager.ValidateNumberFormat(txtMarginBottom.Text) == true ? Convert.ToSingle(txtMarginBottom.Text) : 50;
             float marginLeft = DataValidateManager.ValidateNumberFormat(txtMarginLeft.Text) == true ? Convert.ToSingle(txtMarginLeft.Text) : 50;
             ExportToPDFFile(appData.ResultSet, "Result", pageSize, boolOrientation, marginTop, marginRight, marginBottom, marginLeft);
             break;
         default:
             FileLibrary.ExportToExcelFile(gvPrint, "Result");
             break;
     }
     gvPrint.Visible = false;
 }
Exemplo n.º 2
0
        protected string GetValue(object objValue, string strDisplayFormat = null)
        {
            string strReturn = string.Empty;

            if (objValue == DBNull.Value)
            {
                return(strReturn);
            }
            if (objValue == null)
            {
                return(strReturn);
            }
            if (strDisplayFormat == null)
            {
                strReturn = objValue.ToString();
            }
            else if (Type.GetType("System.String") == objValue.GetType())
            {
                char[] value = objValue.ToString().ToCharArray();
                for (int i = 0; i < value.Length; i++)
                {
                    strDisplayFormat = strDisplayFormat.Replace("{" + i.ToString() + "}", value[i].ToString());
                }
                strReturn = strDisplayFormat;
            }
            else if (DataValidateManager.ValidateNumberFormat(objValue))
            {
                var number = Decimal.Parse(objValue.ToString());
                strReturn = number.ToString(strDisplayFormat);
            }
            else if (DataValidateManager.ValidateDateFormat(objValue))
            {
                strReturn = DateTime.Parse(objValue.ToString()).ToString(strDisplayFormat);
            }
            else
            {
                try
                {
                    char[] value = objValue.ToString().ToCharArray();
                    for (int i = 0; i < value.Length; i++)
                    {
                        strDisplayFormat = strDisplayFormat.Replace("{" + i.ToString() + "}", value[i].ToString());
                    }
                    strReturn = strDisplayFormat;
                }
                catch (Exception)
                {
                    strReturn = objValue.ToString();
                }
            }
            return(strReturn);
        }
        protected override Boolean GetQueryInputParameter()
        {
            Boolean      boolReturn   = true;
            ValidateData validateData = new ValidateData();

            // 验证输入参数

            validateData = ValidateBT(Request["BT"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.BT = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateFBLMBatch(Request["FBLM"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.FBLMBatch = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateFBLM(Request["FBLM"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.FBLM      = null;
                    appData.FBLMBatch = GetSubItem_FBLM(validateData.Value.ToString()) + "," + validateData.Value.ToString();
                }
            }

            validateData = ValidateFBBM(Request["FBBM"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.FBBM = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateFBBM(Request["FBBM"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.FBBM      = null;
                    appData.FBBMBatch = GetSubItem_FBBM(validateData.Value.ToString()) + "," + validateData.Value.ToString();
                }
            }

            validateData = ValidateXXNR(Request["XXNR"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.XXNR = Convert.ToString(validateData.Value.ToString());
                }
            }

            if (!string.IsNullOrWhiteSpace(Request["SearchKeywords"]))
            {
                appData.BT = Convert.ToString(Request["SearchKeywords"]);
            }

            if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
                {
                    appData.QueryType = "AND";
                }
                else
                {
                    appData.QueryType = ViewState["QueryType"].ToString();
                }
            }
            else
            {
                appData.SortField = "AND";
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
            {
                if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
                {
                    appData.Sort = DEFAULT_SORT;
                }
                else
                {
                    appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
                }
            }
            else
            {
                appData.Sort = DEFAULT_SORT;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
                {
                    appData.SortField = DEFAULT_SORT_FIELD;
                }
                else
                {
                    appData.SortField = ViewState["SortField"].ToString();
                }
            }
            else
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
                {
                    appData.PageSize = DEFAULT_PAGE_SIZE;
                }
                else
                {
                    appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
                }
            }
            else
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
                {
                    appData.CurrentPage = DEFAULT_CURRENT_PAGE;
                }
                else
                {
                    appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
                }
            }
            else
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }

            if (CustomPermission == WFBD_PURVIEW_ID)
            {
                appData.FBRJGH = CurrentUserInfo.UserID;
            }

            return(boolReturn);
        }
Exemplo n.º 4
0
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateKCBH(KCBH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateKCMC(KCMC.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCMC = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateKCXLBHBatch(KCXLBH.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCXLBHBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateKCXLBH(KCXLBH.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                if (chkShowSubItemKCXLBH.Checked)
                {
                    appData.KCXLBH      = null;
                    appData.KCXLBHBatch = GetSubItem_KCXLBH(KCXLBH.SelectedValue) + "," + KCXLBH.SelectedValue;
                }
            }
        }

        validateData = ValidateKCNR(KCNR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCNR = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateKCKKSJBegin(KCKKSJBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCKKSJBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateKCKKSJEnd(KCKKSJEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCKKSJEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateKCKKSJ(KCKKSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCKKSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateKSS(KSS.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KSS = Convert.ToInt32(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateDWBH(DWBH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DWBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateDWMC(DWMC.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DWMC = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSJDWBH(SJDWBH.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SJDWBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateDZ(DZ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DZ = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateLXR(LXR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.LXR = Convert.ToString(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateUserLoginName(UserLoginName.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserLoginName = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserGroupIDBatch(UserGroupID.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserGroupIDBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSubjectIDBatch(SubjectID.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SubjectIDBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSubjectID(SubjectID.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                if (chkShowSubItemSubjectID.Checked)
                {
                    appData.SubjectID      = null;
                    appData.SubjectIDBatch = GetSubItem_SubjectID(SubjectID.SelectedValue) + "," + SubjectID.SelectedValue;
                }
            }
        }

        validateData = ValidateUserNickName(UserNickName.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserNickName = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateXBBatch(XB.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.XBBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateMZBatch(MZ.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.MZBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateZZMMBatch(ZZMM.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.ZZMMBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSFZH(SFZH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SFZH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSJH(SJH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SJH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateBGDH(BGDH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.BGDH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateJTDH(JTDH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.JTDH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateEmail(Email.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.Email = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateQQH(QQH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.QQH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserStatus(UserStatus.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserStatus = Convert.ToString(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
Exemplo n.º 7
0
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateFBH(FBH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateBT(BT.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.BT = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBLMBatch(FBLM.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBLMBatch = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBLM(FBLM.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                if (chkShowSubItemFBLM.Checked)
                {
                    appData.FBLM      = null;
                    appData.FBLMBatch = GetSubItem_FBLM(FBLM.SelectedValue) + "," + FBLM.SelectedValue;
                }
            }
        }

        validateData = ValidateFBBM(FBBM.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBBM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBBM(FBBM.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                if (chkShowSubItemFBBM.Checked)
                {
                    appData.FBBM      = null;
                    appData.FBBMBatch = GetSubItem_FBBM(FBBM.SelectedValue) + "," + FBBM.SelectedValue;
                }
            }
        }

        validateData = ValidateXXLX(XXLX.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.XXLX = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateXXNR(XXNR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.XXNR = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateIsTop(IsTop.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.IsTop = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateIsBest(IsBest.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.IsBest = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBRJGH(FBRJGH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBRJGH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBSJRQBegin(FBSJRQBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBSJRQBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateFBSJRQEnd(FBSJRQEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBSJRQEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateFBSJRQ(FBSJRQ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FBSJRQ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }

        if (CustomPermission == WFBD_PURVIEW_ID)
        {
            appData.FBRJGH = CurrentUserInfo.UserID;
        }


        return(boolReturn);
    }
        protected override Boolean GetQueryInputParameter()
        {
            Boolean      boolReturn   = true;
            ValidateData validateData = new ValidateData();

            // 验证输入参数

            validateData = ValidateKCXLBHBatch(Request["KCXLBH"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCXLBHBatch = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateKCXLBH(Request["KCXLBH"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCXLBH      = null;
                    appData.KCXLBHBatch = GetSubItem_KCXLBH(validateData.Value.ToString()) + "," + validateData.Value.ToString();
                }
            }

            validateData = ValidateKCBH(Request["KCBH"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCBH = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateKCSJBegin(Request["KCSJBegin"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCSJBegin = Convert.ToDateTime(validateData.Value.ToString());
                }
            }
            validateData = ValidateKCSJEnd(Request["KCSJEnd"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCSJEnd = Convert.ToDateTime(validateData.Value.ToString());
                }
            }

            validateData = ValidateKCSJ(Request["KCSJ"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.KCSJ = Convert.ToDateTime(validateData.Value.ToString());
                }
            }

            validateData = ValidateSKJS(Request["SKJS"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.SKJS = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateSKFJ(Request["SKFJ"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.SKFJ = Convert.ToString(validateData.Value.ToString());
                }
            }

            if (!string.IsNullOrWhiteSpace(Request["SearchKeywords"]))
            {
                appData.KCBH = Convert.ToString(Request["SearchKeywords"]);
            }

            if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
                {
                    appData.QueryType = "AND";
                }
                else
                {
                    appData.QueryType = ViewState["QueryType"].ToString();
                }
            }
            else
            {
                appData.SortField = "AND";
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
            {
                if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
                {
                    appData.Sort = DEFAULT_SORT;
                }
                else
                {
                    appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
                }
            }
            else
            {
                appData.Sort = DEFAULT_SORT;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
                {
                    appData.SortField = DEFAULT_SORT_FIELD;
                }
                else
                {
                    appData.SortField = ViewState["SortField"].ToString();
                }
            }
            else
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
                {
                    appData.PageSize = DEFAULT_PAGE_SIZE;
                }
                else
                {
                    appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
                }
            }
            else
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
                {
                    appData.CurrentPage = DEFAULT_CURRENT_PAGE;
                }
                else
                {
                    appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
                }
            }
            else
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }

            if (CustomPermission == WDKCB_PURVIEW_ID)
            {
                appData.SKJS = CurrentUserInfo.UserID;
            }

            return(boolReturn);
        }
        protected override Boolean GetQueryInputParameter()
        {
            Boolean      boolReturn   = true;
            ValidateData validateData = new ValidateData();

            // 验证输入参数

            validateData = ValidateUserLoginName(Request["UserLoginName"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.UserLoginName = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateSubjectIDBatch(Request["SubjectID"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.SubjectIDBatch = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateSubjectID(Request["SubjectID"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.SubjectID      = null;
                    appData.SubjectIDBatch = GetSubItem_SubjectID(validateData.Value.ToString()) + "," + validateData.Value.ToString();
                }
            }

            validateData = ValidateUserNickName(Request["UserNickName"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.UserNickName = Convert.ToString(validateData.Value.ToString());
                }
            }

            if (!string.IsNullOrWhiteSpace(Request["SearchKeywords"]))
            {
                appData.UserNickName = Convert.ToString(Request["SearchKeywords"]);
            }

            if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
                {
                    appData.QueryType = "AND";
                }
                else
                {
                    appData.QueryType = ViewState["QueryType"].ToString();
                }
            }
            else
            {
                appData.SortField = "AND";
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
            {
                if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
                {
                    appData.Sort = DEFAULT_SORT;
                }
                else
                {
                    appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
                }
            }
            else
            {
                appData.Sort = DEFAULT_SORT;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
                {
                    appData.SortField = DEFAULT_SORT_FIELD;
                }
                else
                {
                    appData.SortField = ViewState["SortField"].ToString();
                }
            }
            else
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
                {
                    appData.PageSize = DEFAULT_PAGE_SIZE;
                }
                else
                {
                    appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
                }
            }
            else
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
                {
                    appData.CurrentPage = DEFAULT_CURRENT_PAGE;
                }
                else
                {
                    appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
                }
            }
            else
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }

            return(boolReturn);
        }
Exemplo n.º 10
0
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateDXXBT(DXXBT.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DXXBT = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateDXXNR(DXXNR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DXXNR = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFSSJBegin(FSSJBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FSSJBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateFSSJEnd(FSSJEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FSSJEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateFSSJ(FSSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FSSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateFSR(FSR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FSR = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateFSBM(FSBM.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.FSBM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateJSRBatch(JSR.SelectedValues, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.JSRBatch = Convert.ToString(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }

        if (CustomPermission == SJX_PURVIEW_ID)
        {
            appData.DXXLX = "02";
        }

        if (CustomPermission == SJX_PURVIEW_ID)
        {
            appData.JSR = CurrentUserInfo.UserID;
        }

        if (CustomPermission == FJX_PURVIEW_ID)
        {
            appData.DXXLX = "01";
        }

        if (CustomPermission == FJX_PURVIEW_ID)
        {
            appData.FSR = CurrentUserInfo.UserID;
        }


        return(boolReturn);
    }
Exemplo n.º 11
0
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateUserGroupID(UserGroupID.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserGroupID = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserGroupName(UserGroupName.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserGroupName = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserGroupContent(UserGroupContent.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserGroupContent = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserGroupRemark(UserGroupRemark.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserGroupRemark = Convert.ToString(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateBGMC(BGMC.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.BGMC = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateUserID(UserID.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.UserID = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateBGLX(BGLX.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.BGLX = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateGXBG(GXBG.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.GXBG = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateXTBG(XTBG.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.XTBG = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateBGCJSJ(BGCJSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.BGCJSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
Exemplo n.º 13
0
        protected override Boolean GetQueryInputParameter()
        {
            Boolean      boolReturn   = true;
            ValidateData validateData = new ValidateData();

            // 验证输入参数

            validateData = ValidateXM(Request["XM"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.XM = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateSFZH(Request["SFZH"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.SFZH = Convert.ToString(validateData.Value.ToString());
                }
            }

            validateData = ValidateFFGZNY(Request["FFGZNY"], true, false);
            if (validateData.Result)
            {
                if (!validateData.IsNull)
                {
                    appData.FFGZNY = Convert.ToString(validateData.Value.ToString());
                }
            }

            if (!string.IsNullOrWhiteSpace(Request["SearchKeywords"]))
            {
                appData.XM = Convert.ToString(Request["SearchKeywords"]);
            }

            if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
                {
                    appData.QueryType = "AND";
                }
                else
                {
                    appData.QueryType = ViewState["QueryType"].ToString();
                }
            }
            else
            {
                appData.SortField = "AND";
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
            {
                if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
                {
                    appData.Sort = DEFAULT_SORT;
                }
                else
                {
                    appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
                }
            }
            else
            {
                appData.Sort = DEFAULT_SORT;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
                {
                    appData.SortField = DEFAULT_SORT_FIELD;
                }
                else
                {
                    appData.SortField = ViewState["SortField"].ToString();
                }
            }
            else
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
                {
                    appData.PageSize = DEFAULT_PAGE_SIZE;
                }
                else
                {
                    appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
                }
            }
            else
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
                {
                    appData.CurrentPage = DEFAULT_CURRENT_PAGE;
                }
                else
                {
                    appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
                }
            }
            else
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }

            if (CustomPermission == WDGZ_PURVIEW_ID)
            {
                appData.SFZH = CurrentUserInfo.SFZH;
            }

            return(boolReturn);
        }
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateDM(DM.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.DM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateLX(LX.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.LX = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateMC(MC.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.MC = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSJDM(SJDM.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SJDM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSJDM(SJDM.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                if (chkShowSubItemSJDM.Checked)
                {
                    appData.SJDM      = null;
                    appData.SJDMBatch = GetSubItem_SJDM(SJDM.SelectedValue) + "," + SJDM.SelectedValue;
                }
            }
        }

        validateData = ValidateSM(SM.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SM = Convert.ToString(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateKCBBH(KCBBH.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.KCBBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYBH(HYBH.SelectedValue, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateYYSJBegin(YYSJBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.YYSJBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateYYSJEnd(YYSJEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.YYSJEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateYYSJ(YYSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.YYSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateYYBZ(YYBZ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.YYBZ = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateSKZT(SKZT.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SKZT = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidatePJR(PJR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.PJR = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidatePJSJBegin(PJSJBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.PJSJBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidatePJSJEnd(PJSJEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.PJSJEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidatePJSJ(PJSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.PJSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }

        if (CustomPermission == WDYY_PURVIEW_ID)
        {
            appData.HYBH = CurrentUserInfo.UserID;
        }

        if (CustomPermission == WDPY_PURVIEW_ID)
        {
            appData.PJR = CurrentUserInfo.UserID;
        }


        return(boolReturn);
    }
        protected override Boolean GetQueryInputParameter()
        {
            Boolean      boolReturn   = true;
            ValidateData validateData = new ValidateData();

            // 验证输入参数

            if (!string.IsNullOrWhiteSpace(Request["SearchKeywords"]))
            {
                appData.BGMC = Convert.ToString(Request["SearchKeywords"]);
            }

            if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
                {
                    appData.QueryType = "AND";
                }
                else
                {
                    appData.QueryType = ViewState["QueryType"].ToString();
                }
            }
            else
            {
                appData.SortField = "AND";
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
            {
                if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
                {
                    appData.Sort = DEFAULT_SORT;
                }
                else
                {
                    appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
                }
            }
            else
            {
                appData.Sort = DEFAULT_SORT;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
            {
                if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
                {
                    appData.SortField = DEFAULT_SORT_FIELD;
                }
                else
                {
                    appData.SortField = ViewState["SortField"].ToString();
                }
            }
            else
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
                {
                    appData.PageSize = DEFAULT_PAGE_SIZE;
                }
                else
                {
                    appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
                }
            }
            else
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
            {
                if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
                {
                    appData.CurrentPage = DEFAULT_CURRENT_PAGE;
                }
                else
                {
                    appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
                }
            }
            else
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }

            return(boolReturn);
        }
Exemplo n.º 17
0
    //=====================================================================
    //  FunctionName : GetQueryInputParameter
    /// <summary>
    /// 得到查询用户输入参数操作(通过Request对象)
    /// </summary>
    //=====================================================================
    protected override Boolean GetQueryInputParameter()
    {
        Boolean      boolReturn   = true;
        ValidateData validateData = new ValidateData();

        // 验证输入参数

        validateData = ValidateHYBH(HYBH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYBH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYXM(HYXM.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYXM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYNC(HYNC.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYNC = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYSRBegin(HYSRBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYSRBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateHYSREnd(HYSREnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYSREnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYSR(HYSR.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYSR = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYXX(HYXX.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYXX = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateHYBJ(HYBJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.HYBJ = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateJZXM(JZXM.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.JZXM = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateJZDH(JZDH.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.JZDH = Convert.ToString(validateData.Value.ToString());
            }
        }

        validateData = ValidateZCSJBegin(ZCSJBegin.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.ZCSJBegin = Convert.ToDateTime(validateData.Value.ToString());
            }
        }
        validateData = ValidateZCSJEnd(ZCSJEnd.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.ZCSJEnd = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateZCSJ(ZCSJ.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.ZCSJ = Convert.ToDateTime(validateData.Value.ToString());
            }
        }

        validateData = ValidateZKSS(ZKSS.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.ZKSS = Convert.ToInt32(validateData.Value.ToString());
            }
        }

        validateData = ValidateXHKSS(XHKSS.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.XHKSS = Convert.ToInt32(validateData.Value.ToString());
            }
        }

        validateData = ValidateSYKSS(SYKSS.Text, true, false);
        if (validateData.Result)
        {
            if (!validateData.IsNull)
            {
                appData.SYKSS = Convert.ToInt32(validateData.Value.ToString());
            }
        }


        if (!DataValidateManager.ValidateIsNull(ViewState["QueryType"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["QueryType"].ToString()))
            {
                appData.QueryType = "AND";
            }
            else
            {
                appData.QueryType = ViewState["QueryType"].ToString();
            }
        }
        else
        {
            appData.SortField = "AND";
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["Sort"]))
        {
            if (!DataValidateManager.ValidateBooleanFormat(ViewState["Sort"].ToString()))
            {
                appData.Sort = DEFAULT_SORT;
            }
            else
            {
                appData.Sort = Convert.ToBoolean(ViewState["Sort"].ToString());
            }
        }
        else
        {
            appData.Sort = DEFAULT_SORT;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["SortField"]))
        {
            if (!DataValidateManager.ValidateStringFormat(ViewState["SortField"].ToString()))
            {
                appData.SortField = DEFAULT_SORT_FIELD;
            }
            else
            {
                appData.SortField = ViewState["SortField"].ToString();
            }
        }
        else
        {
            appData.SortField = DEFAULT_SORT_FIELD;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["PageSize"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["PageSize"].ToString()))
            {
                appData.PageSize = DEFAULT_PAGE_SIZE;
            }
            else
            {
                appData.PageSize = Convert.ToInt32(ViewState["PageSize"].ToString());
            }
        }
        else
        {
            appData.PageSize = DEFAULT_PAGE_SIZE;
        }
        if (!DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]))
        {
            if (!DataValidateManager.ValidateNumberFormat(ViewState["CurrentPage"].ToString()))
            {
                appData.CurrentPage = DEFAULT_CURRENT_PAGE;
            }
            else
            {
                appData.CurrentPage = Convert.ToInt32(ViewState["CurrentPage"].ToString());
            }
        }
        else
        {
            appData.CurrentPage = DEFAULT_CURRENT_PAGE;
        }


        return(boolReturn);
    }