Beispiel #1
0
        /// <summary>
        /// 文件下载事件
        /// 2017/04/12(zhuguanjun)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void File_DownLoad(object sender, EventArgs e)
        {
            #region 检查
            if (string.IsNullOrEmpty(SubID))
            {
                MessageHelper.ShowMsg(MessageID.W000000002, MessageType.Alert, "分包合同");
                return;
            }
            #endregion
            ButtonX button = (ButtonX)sender;
            int     Type   = int.Parse(button.Name.Substring(4, 1));
            List <SubContractFiles> list = bll.GetFiles(SubID, Type);
            if (list.Count <= 0)
            {
                MessageHelper.ShowMsg(MessageID.W000000005, MessageType.Alert);
                return;
            }

            //取得上传文件类型
            string fileName = list[0].Path;

            FileHelper.DownLoadFile(UploadType.SubContract, ProjectId, null, fileName);
        }