BaseConfig/BaseConfig.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System.Data;
using System.Text;
using System.Web;
using WebApp;
using System.Xml;

namespace BaseConfig
{
    public class Config
    {
        public Config()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }

        #region 以下是给jqGrid使用的
        /// <summary>
        /// jqgrid多字段查询
        /// </summary>
        /// <param name="filters"></param>
        /// <returns></returns>
        public static string Getstrwhere(string filters)
        {
            string str = "";
            int _index = -1;
            string[] liststr;
            filters = filters.Replace('"', ',').Replace(',', ' ').TrimStart();
            filters.Trim().Replace(':', '=').Trim().Split(new char[] { ' ' });
            liststr = filters.Split(new char[] { ' ' });
            foreach (string o in liststr)
            {
                _index++;
                string op = liststr.GetValue(2).ToString();
                if (o == "field")
                {
                    if (_index + 12 == liststr.Length) { str += " " + liststr.GetValue(_index + 2).ToString() + Oper(liststr.GetValue(_index + 6).ToString(), "", "") + "'" + liststr.GetValue(_index + 10).ToString() + "' "; break; }
                    str += " " + liststr.GetValue(_index + 2).ToString() + Oper(liststr.GetValue(_index + 6).ToString(), "", "") + "'" + liststr.GetValue(_index + 10).ToString() + "' " + op;
                }
            }
            return str;
        }

        /// <summary>
        /// 计算符,在查询的时候用
        /// </summary>
        /// <param name="inputOp"></param>
        /// <returns></returns>
        private static string Oper(string inputOp, string field, string val)
        {
            switch (inputOp)
            {
                case "eq":
                    return field + "=" + val;
                case "ne":
                    return field + "<>" + val;
                case "lt":
                    return field + "<" + val;
                case "le":
后面还有 185 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。