示例#1
0
        //保存

        //查看图片
        private void btnViewPic_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            ExecuteTeamAlterDto          dto = grvArbitrationTeamAlter.GetRow(grvArbitrationTeamAlter.FocusedRowHandle) as ExecuteTeamAlterDto;
            DataSet                      ds  = service.SearchAnswerDtl2(dto.ProjectCode, dto.SubjectCode, dto.ShopCode);
            List <InspectionStandardDto> inspectionStandardlist = new List <InspectionStandardDto>();

            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    InspectionStandardDto inspectionStandardDto = new InspectionStandardDto();
                    inspectionStandardDto.SubjectCode     = Convert.ToString(ds.Tables[0].Rows[i]["SubjectCode"]);
                    inspectionStandardDto.ProjectCode     = Convert.ToString(ds.Tables[0].Rows[i]["ProjectCode"]);
                    inspectionStandardDto.SeqNO           = Convert.ToInt32(ds.Tables[0].Rows[i]["SeqNO"]);
                    inspectionStandardDto.FileName        = Convert.ToString(ds.Tables[0].Rows[i]["FileName"]);
                    inspectionStandardDto.FileType        = Convert.ToString(ds.Tables[0].Rows[i]["FileType"]);
                    inspectionStandardDto.CheckOptionCode = Convert.ToString(ds.Tables[0].Rows[i]["CheckOptionCode"]) == "" ? "01" : Convert.ToString(ds.Tables[0].Rows[i]["CheckOptionCode"]);
                    inspectionStandardlist.Add(inspectionStandardDto);
                }
            }
            if (inspectionStandardlist.Count > 0)
            {
                string[] filelist = new string[inspectionStandardlist.Count];
                for (int i = 0; i < inspectionStandardlist.Count; i++)
                {
                    filelist[i] = inspectionStandardlist[i].FileName;
                }
                AllPictureShow2 pic = new AllPictureShow2("", filelist, dto.ProjectCode + dto.ShopName, dto.SubjectCode, "", "");
                pic.ShowDialog();
            }
        }
        //点击查看图片时的操作
        private void btnViewPic_Click(object sender, EventArgs e)
        {
            string[] picNameList = null;
            if (!string.IsNullOrEmpty(txtFilePath.Text))
            {
                picNameList = txtFilePath.Text.Split(';');
            }
            if (picNameList == null)
            {
                return;
            }
            string          path = AppDomain.CurrentDomain.BaseDirectory + @"UploadImage\SpecialCasePictures\" + SpecialCaseCode + @"\";
            AllPictureShow2 pic  = new AllPictureShow2(path, picNameList, txtShopName.Text, txtSubjectCode.Text, "SpecialCase", SpecialCaseCode);

            pic.ShowDialog();
        }