Beispiel #1
0
        protected PersonComplexAES(SerializationInfo info, StreamingContext context)
        {
            Id   = info.GetInt32("Id");
            Name = info.GetString("Name");

            // Decrypt using utility class
            SSNEncrypt = (byte[])info.GetValue("SSNEncrypt", typeof(byte[]));
            SSN        = AESUtility.Decrypt(SSNEncrypt, cnxString);

            isDirty = info.GetBoolean("isDirty");
        }
        /// <summary>
        /// 创建数据表头
        /// </summary>
        /// <param name="header"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public TableInfoIdParam CreateReportTableInfoHeader(TableInfoHeaderVo header, string accessToken)
        {
            TableInfoIdParam tableInfoIdParam = null;
            string           url = URLConstant.CREATETABLEINFOHEADER + string.Format("?accessToken={0}", accessToken);

            ResponseContext <string> result = PostGetAction(url, header);

            string decryptData = AESUtility.Decrypt(result.data, m_AESKey);

            tableInfoIdParam = JsonConvert.DeserializeObject <TableInfoIdParam>(decryptData);
            return(tableInfoIdParam);
        }
        /// <summary>
        /// 查询上传数据表数据上传结果
        /// </summary>
        /// <param name="eid"></param>
        /// <param name="batchId"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public DataSaveStatus GetReportTableInfoDataSaveStatus(string eid, string batchId, string accessToken)
        {
            string url = URLConstant.GETTABLEINFODATASAVESTATUS + string.Format("?accessToken={0}", accessToken);

            dynamic dyParams = new ExpandoObject();

            dyParams.eid     = eid;
            dyParams.batchId = batchId;

            ResponseContext <string> result = PostGetAction(url, dyParams);

            string decryptData = AESUtility.Decrypt(result.data, m_AESKey);

            return(JsonConvert.DeserializeObject <DataSaveStatus>(decryptData));
        }
        /// <summary>
        /// 获取轻应用管理员权限内所有报表分类及OpenApi创建的数据表信息
        /// </summary>
        /// <param name="eid"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public List <CategoryWithReportTableVo> GetAdminTableInfos(string eid, string accessToken)
        {
            string url = URLConstant.GETADMINTABLEINFOS + string.Format("?accessToken={0}", accessToken);

            dynamic dyParams = new ExpandoObject();

            dyParams.eid = eid;

            ResponseContext <string> result = PostGetAction(url, dyParams);

            string decryptData = AESUtility.Decrypt(result.data, m_AESKey);
            List <CategoryWithReportTableVo> categoryWithReportTableVos = JsonConvert.DeserializeObject <List <CategoryWithReportTableVo> >(decryptData);

            return(categoryWithReportTableVos);
        }