/// <summary>
        /// 上传计划附件
        /// </summary>
        /// <param name="UpFileInfo">该文件信息</param>
        /// <param name="PostFileStream">该文件流</param>
        /// <param name="PostFileKey">供服务器索引使用的Key。如服务器不使用之,可以为空</param>
        /// <param name="PostFileName">用于告诉服务器指定文件的名称。如服务器不使用之,可以为空</param>
        /// <param name="showUploadProgress">上传进度</param>
        /// <returns></returns>
        public static async Task <ExcuteResult> UpLoadFileInfo(Lib.PlanFileEntity UpFileInfo, Stream PostFileStream, string PostFileKey = null, string PostFileName = null, ProgressMessageHandler showUploadProgress = null)
        {
            MultipartFormDataContent V_MultFormDatas = DataApiRepository.SetFormData(UpFileInfo, PostFileStream, PostFileKey, PostFileName);
            ExcuteResult             JsonResult      = await DataApiRepository.PostApiUriAsync(_ApiUrlBase + "PlanFile/UpLoadFile", V_MultFormDatas, showUploadProgress).ConfigureAwait(false);

            return(JsonResult);
        }
        /// <summary>
        /// 批量新增数据
        /// </summary>
        /// <param name="P_Entity"></param>
        /// <returns></returns>
        public static async Task <ExcuteResult> AddRecords(List <Lib.NoteEntity> Entitys)
        {
            ExcuteResult JsonResult = await DataApiRepository.PostApiUriAsync(_ApiUrlBase + "Note/AddRange", Entitys).ConfigureAwait(false);

            return(JsonResult);
        }
Example #3
0
        /// <summary>
        /// 单个新增数据
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public static async Task <ExcuteResult> AddRecord(Lib.UserEntity PEntity)
        {
            ExcuteResult JsonResult = await DataApiRepository.PostApiUriAsync(_ApiUrlBase + "User", PEntity).ConfigureAwait(false);

            return(JsonResult);
        }
Example #4
0
        /// <summary>
        /// 新增一个计划
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public static async Task <ExcuteResult> AddNewPlan(Lib.PlanEntity PEntity)
        {
            ExcuteResult JsonResult = await DataApiRepository.PostApiUriAsync(_ApiUrlBase + "Plan", PEntity).ConfigureAwait(false);

            return(JsonResult);
        }
        /// <summary>
        /// 新增或更新单个实体
        /// </summary>
        /// <param name="PEntity"></param>
        /// <returns></returns>
        public static async Task <ExcuteResult> AddOrUpdateEntity(Lib.MemberInfoEntity PEntity)
        {
            ExcuteResult JsonResult = await DataApiRepository.PostApiUriAsync(_ApiUrlBase + "AddOrUpdateEntity", PEntity).ConfigureAwait(false);

            return(JsonResult);
        }