Exemple #1
0
        /// <summary>
        /// 根据病案审核状态,提示信息
        /// </summary>
        /// <param name="checkState"></param>
        /// <returns></returns>
        public bool isSuccessCheckStatus(string checkState, bool bol)
        {
            string storagePath = OutHosDate.Year.ToString() + "\\" + OutHosDate.Month.ToString() + "\\" + OutHosDate.Day.ToString() + "\\" + LURecordNO.DisplayText + "\\" + SetImagePage()[0];

            if (checkState == "103")//已提交
            {
                MessageBox.Show("此病案为已提交审核,不能进行图片拍照上传");
                BindNull();
                return(false);
            }
            if (checkState == "101")
            {
                MessageBox.Show("此病案为已审核通过,不能进行图片拍照上传");
                BindNull();
                return(false);
            }
            if (checkState == "104")
            {
                MessageBox.Show("此病案为已合并,不能进行图片拍照上传");
                BindNull();
                return(false);
            }
            if (checkState == "107" && bol == true)
            {
                if (Message.ShowQuery("此病案为合并失败,是否进行重新上传?", Message.Button.YesNo) == Message.Result.Yes)
                {
                    string   imgExtension = ConfigHelper.GetAppStrings("ImgExtension");//图片格式
                    string[] picName      = FtpHelp.GetFileList(storagePath.Replace('\\', '/'), HostName, UserName, Password, imgExtension);
                    if (picName != null && picName.Length > 0)
                    {
                        for (int i = 0; i < picName.Length; i++)
                        {
                            string picPath = "ftp://" + HostName + "/" + storagePath.Replace('\\', '/') + "/" + picName[i];
                            FtpHelp.DeleteFile(picPath, UserName, Password);
                        }
                    }
                    if (OnMerge != null)
                    {
                        imagesInputArgs.MergeState = "100";
                        imagesInputArgs.HealthID   = LURecordNO.DisplayValue;
                        OnMerge(null, imagesInputArgs);
                    }
                }
                else
                {
                    BindNull();
                    return(false);
                }
            }
            if (checkState == "102" && bol == true)//审核未通过
            {
                MessageBox.Show("此病案为审核未通过,请查看已入库图片的审核原因,然后进行重新拍照上传");
            }
            return(true);
        }
Exemple #2
0
 /// <summary>
 /// 根据目录获得图片Datatable
 /// </summary>
 /// <param name="pathname"></param>
 /// <returns></returns>
 public DataTable CreatePictureDate()
 {
     try
     {
         string str_inHosTimes;
         if (txtTimes.Text.Length == 1)
         {
             str_inHosTimes = "0" + txtTimes.Text;
         }
         else
         {
             str_inHosTimes = txtTimes.Text;
         }
         DataTable data        = PictureData();
         string    storagePath = OutHosDate.Year.ToString() + "/" + OutHosDate.Month.ToString() + "/" + OutHosDate.Day.ToString() + "/" + LURecordNO.DisplayText + "/" + str_inHosTimes;
         bool      bol         = FtpHelp.FtpIsExistsFile(storagePath, HostName, UserName, Password);
         if (bol)
         {
             string   imgExtension = ConfigHelper.GetAppStrings("ImgExtension");//图片格式
             string[] picName      = FtpHelp.GetFileList(storagePath, HostName, UserName, Password, imgExtension);
             if (picName != null && picName.Length > 0)
             {
                 for (int i = 0; i < picName.Length; i++)
                 {
                     data = SetPictureDataRows(data, picName[i], HostName);
                 }
             }
         }
         else
         {
             MessageBox.Show("此病案未上传任何图片");
         }
         PictureInfo = data;
         return(data);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
         return(null);
     }
 }