Пример #1
0
        void LoadAudio()
        {
            dataGridViewEx1.Rows.Clear();
            var filePaths = Setting.PicOrder;// Directory.GetFiles(@"Image\Part");

            foreach (var file in filePaths)
            {
                dataGridViewEx1.Rows.Add(Image.FromFile(file).GetThumbnailImage(60, 66, () => { return(true); }, IntPtr.Zero), Path.GetFileNameWithoutExtension(file), "否");
            }
            var dt = IInfo.GetAudioByHis(PatientGUID);

            foreach (DataGridViewRow row in dataGridViewEx1.Rows)
            {
                var part = row.Cells["Part"].Value + "";
                //var i = part.IndexOf("(");
                //if (i<0)
                //{
                //    i = part.IndexOf("(");
                //}
                var drs = dt.Select("Part='" + part + "'");
                if (drs.Length > 0)
                {
                    row.Cells["isRecord"].Value   = "是";
                    row.Cells["RecordTime"].Value = drs[0]["RecordTime"];
                    row.Cells["TakeTime"].Value   = drs[0]["TakeTime"];
                }
            }
        }