Example #1
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);
            }
        }
Example #2
0
        public GTXResult SaveUserYSBQCReportData(string strJson, int userYsbqcId, string reportCode, string dataKey = "data")
        {
            List <GTXNameValue> nameList = new List <GTXNameValue>();
            GTXNameValue        nv       = new GTXNameValue();

            nv.key = dataKey;
            byte[] bytes   = Encoding.UTF8.GetBytes(strJson);
            string _result = HttpUtility.UrlEncode(Convert.ToBase64String(bytes));

            nv.value = _result;
            nameList.Add(nv);
            GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), userYsbqcId.ToString(), reportCode);

            return(saveresult);
        }
Example #3
0
        public GDTXUserYSBQC getUserYSBQC(int id)
        {
            GTXResult resultq = GTXMethod.GetUserYSBQC();

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

                ysbqclist = ysbqclist.Where(a => a.Id == id).ToList();
                return(ysbqclist[0]);
            }
            else
            {
                return(null);
            }
        }
Example #4
0
        public JToken getUserYSBQCReportData(int id, string reportCode, string dataKey = "data")
        {
            GTXResult gr = GTXMethod.GetUserReportData(id.ToString(), reportCode);

            if (gr.IsSuccess)
            {
                List <GDTXUserYSBQCReportData> dataList = JsonConvert.DeserializeObject <List <GDTXUserYSBQCReportData> >(gr.Data.ToString());
                if (dataList.Count > 0)
                {
                    GDTXUserYSBQCReportData data = dataList.Where(a => a.DataKey == dataKey).FirstOrDefault();
                    byte[] outputb   = Convert.FromBase64String(data.DataValue);
                    string dataValue = Encoding.UTF8.GetString(outputb);
                    JToken re_json   = JsonConvert.DeserializeObject <JToken>(dataValue);
                    return(re_json);
                }
            }
            return(JToken.FromObject(new object()));
        }
Example #5
0
        public Nsrxx getNsrxx()
        {
            Nsrxx     X   = new Nsrxx();
            GTXResult gr1 = GTXMethod.GetCompanyDetail();

            if (gr1.IsSuccess)
            {
                JObject jo = new JObject();
                jo = JsonConvert.DeserializeObject <JObject>(gr1.Data.ToString());
                JToken Company = jo["Company"];
                if (Company.HasValues)
                {
                    JToken data_jo = Company;
                    X.NSRMC            = data_jo["NSRMC"].ToString();
                    X.NSRSBH           = data_jo["NSRSBH"].ToString();
                    X.DJZCLX           = data_jo["DJZCLX"].ToString();
                    X.ZCDZ             = data_jo["ZCDZ"].ToString();
                    X.SCJYDZ           = data_jo["SCJYDZ"].ToString();
                    X.LXDH             = data_jo["LXDH"].ToString();
                    X.GBHY             = data_jo["GBHY"].ToString();
                    X.ZGDSSWJFJMC      = data_jo["ZGDSSWJFJMC"].ToString();
                    X.TaxPayerType     = int.Parse(data_jo["TaxPayerType"].ToString());
                    X.TaxPayerTypeName = data_jo["TaxPayerTypeName"].ToString();
                    X.BusinessType     = int.Parse(data_jo["BusinessType"].ToString());
                    X.BusinessTypeName = data_jo["BusinessTypeName"].ToString();
                }
            }

            GTXResult gr2 = GTXMethod.GetCompanyPerson();

            if (gr2.IsSuccess)
            {
                JArray ja = new JArray();
                ja = JsonConvert.DeserializeObject <JArray>(gr2.Data.ToString());
                if (ja.Count > 0)
                {
                    JObject data_jo = (JObject)ja[0];
                    X.Name      = data_jo["Name"].ToString();
                    X.IDCardNum = data_jo["IDCardNum"].ToString();
                }
            }
            return(X);
        }
Example #6
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();
                return(ysbqclist[0]);
            }
            else
            {
                //return new GDTXBeiJingUserYSBQC();
                return(null);
            }
        }
Example #7
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).ToList();
                return(ysbqclist[0]);
            }
            else
            {
                return(null);
            }
        }
Example #8
0
 public void reset(string dm)
 {
     qc = getUserYSBQC(dm);
     GTXMethod.DeleteUserReportData(qc.Id.ToString(), qc.ywbm);
 }
Example #9
0
 public void UpdateSBZT(int id, string sbzt)
 {
     GTXMethod.UpdateYSBQC(id.ToString(), sbzt);
 }
Example #10
0
 public void UpdateSBSE(int id, string sbse)
 {
     GTXMethod.UpdateSBSE(id.ToString(), sbse);
 }