Ejemplo n.º 1
0
        /// <summary>
        /// 关闭文件
        /// </summary>
        /// <param name="closeFileParam"></param>
        /// <param name="proxy"></param>
        /// <returns></returns>
        public static CloseFileResult CloseFile(CloseFileParameter closeFileParam, IRemoteFileStorage proxy)
        {
            ManagerHelper.CheckNullReference(closeFileParam, "closeFileParam");
            if (proxy == null)
            {
                proxy = ServiceProxy;
            }
            CloseFileResult result = proxy.CloseFile(closeFileParam);

            ManagerHelper.CheckUpdateResult(result);
            return(result);
        }
Ejemplo n.º 2
0
        public CloseFileResult CloseFile(CloseFileParameter closeFileParam)
        {
            CloseFileResult result = new CloseFileResult();

            try
            {
                result = ExecuteRemoteResult("CloseFile", closeFileParam, result) as CloseFileResult;
            }
            catch (Exception e)
            {
                result.InnerException = CreateExceptionResult(result.InnerException, e.Message);
            }
            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 关闭文件
        /// </summary>
        /// <param name="closeFileItem"></param>
        /// <param name="proxy"></param>
        /// <returns></returns>
        public static CloseFileResultItemData CloseFile(CloseFileItemData closeFileItem, IRemoteFileStorage proxy)
        {
            CloseFileResultItemData result = null;

            ManagerHelper.CheckNullReference(closeFileItem, "closeFileItem");
            CloseFileParameter param = new CloseFileParameter();

            param.InputData.Add(closeFileItem);
            CloseFileResult itemResult = CloseFile(param, proxy);

            if (itemResult.RecordCount > 0)
            {
                result = itemResult.ExecuteResult[0];
            }
            return(result);
        }
Ejemplo n.º 4
0
        public CloseFileResult CloseFile(CloseFileParameter closeFileParam)
        {
            CloseFileResult result = new CloseFileResult();

            try
            {
                if (closeFileParam != null)
                {
                    CloseFileResultItemDataCollection items = result.ExecuteResult;
                    foreach (CloseFileItemData itemParam in closeFileParam.InputData)
                    {
                        CloseFileResultItemData item = this.CloseFileItem(itemParam, closeFileParam.CurrentUserID, null);
                        items.Add(item);
                    }
                }
            }
            catch (Exception e)
            {
                Utils.BuilderExecuteResult(result, e);
            }
            return(result);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// 关闭文件
 /// </summary>
 /// <param name="closeFileParam"></param>
 /// <returns></returns>
 public static CloseFileResult CloseFile(CloseFileParameter closeFileParam)
 {
     return(CloseFile(closeFileParam, null));
 }