快乐的昕的电脑
2025-10-27 4351bcb4088bfa9dcf796351c7abfd9c5f224f18
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
@@ -344,5 +344,53 @@
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gridView1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            if (e.Button.Index == 0)
            {
                var dr = gridView1.GetDataRow(rowhandle);
                var mxGuid = dr["guid"].ToString();
                Gs.DevApp.UserControl.ShowUp frm = new Gs.DevApp.UserControl.ShowUp(mxGuid);
                frm.UpdateParent += (ss, ee) =>
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowInformation("上传成功!");
                    getPageList(this.pageBar1.CurrentPage);
                };
                frm.ShowDialog();
            }
        }
        /// <summary>
        /// 预览图片
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gridView1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            if (e.Button.Index == 0)
            {
                try
                {
                    var dr = gridView1.GetDataRow(rowhandle);
                    var urlPath = dr["guid"].ToString();
                    Gs.DevApp.UserControl.ShowFile frm = new ShowFile(urlPath);
                    frm.ShowDialog();
                }
                catch (Exception ex)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
                }
            }
        }
    }
}