using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using UAS_MES.DataOperate; using UAS_MES.Entity; using UAS_MES.PublicMethod; namespace UAS_MES.Query { public partial class Query_OperationInstruction : Form { DataHelper dh; public Query_OperationInstruction() { InitializeComponent(); } private void Query_OperationInstruction_Load(object sender, EventArgs e) { dh = SystemInf.dh; } private void Query_OperationInstruction_SizeChanged(object sender, EventArgs e) { sn_label.Location = new Point(20, 20); SnCode.Location = new Point(sn_label.Location.X + sn_label.Width + 20, 20); FileList_label.Location = new Point(SnCode.Location.X + SnCode.Width + 20, 20); FileList.Location = new Point(FileList_label.Location.X + FileList_label.Width + 20, 20); } private void SnCode_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { string MachineType = dh.getFieldDataByCondition("makeserial left join product on pr_code=ms_prodcode", "pr_machinetype", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + SnCode.Text + "')").ToString(); //string FilePath = dh.getFieldDataByCondition("", "", "").ToString(); } } private void OpenFile_Click(object sender, EventArgs e) { switch (BaseUtil.GetFileSuffix(FileList.Text)) { case "MP4": //Query.Query_ShowVideo ShowVideo = new Query_ShowVideo(FileList.Text); //ShowVideo.Show(); break; case "PDF": Query.Query_ShowPDF ShowPdf = new Query_ShowPDF(FileList.Text); ShowPdf.Show(); break; case "JPEG": Query.Query_ShowPicture ShowPic = new Query_ShowPicture(FileList.Text); ShowPic.Show(); break; case "JPG": Query.Query_ShowPicture ShowPic1 = new Query_ShowPicture(FileList.Text); ShowPic1.Show(); break; default: break; } } } }