示例#1
0
        public GDTXUserYSBQC getUserYSBQC(string dm)
        {
            string s = dm.ToUpper();

            switch (s)
            {
            case "YBNSRZZSXBSZ":
                s = "YBNSRZZS";
                break;
            }
            GTXResult resultq = GTXMethod.GetUserYSBQC();

            if (resultq.IsSuccess)
            {
                List <GDTXUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXUserYSBQC> >(resultq.Data.ToString());

                ysbqclist = ysbqclist.Where(a => a.BDDM.ToUpper() == s || a.sbzlDm == s || a.zsxmDm == s).ToList();
                if (ysbqclist.Count == 0)
                {
                    return(null);
                }
                return(ysbqclist[0]);
            }
            else
            {
                return(null);
            }
        }
示例#2
0
        public List <GDTXUserYSBQC> getUserYSBQC()
        {
            GTXResult resultq = GTXMethod.GetUserYSBQC();

            if (resultq.IsSuccess)
            {
                List <GDTXUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXUserYSBQC> >(resultq.Data.ToString());
                return(ysbqclist);
            }
            else
            {
                return(null);
            }
        }
示例#3
0
        public GDTXUserYSBQC getUserYSBQC(Type controller)
        {
            string s = controller.Name;

            s = s.Substring(0, s.IndexOf("Controller"));
            GTXResult resultq = GTXMethod.GetUserYSBQC();

            if (resultq.IsSuccess)
            {
                List <GDTXUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXUserYSBQC> >(resultq.Data.ToString());

                ysbqclist = ysbqclist.Where(a => a.BDDM.ToUpper() == s.ToUpper()).ToList();
                if (ysbqclist.Count == 0)
                {
                    return(null);
                }
                return(ysbqclist[0]);
            }
            else
            {
                //return new GDTXBeiJingUserYSBQC();
                return(null);
            }
        }