using ng.optima.server; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Utility; namespace MyGlassEdit.EDIT.功能 { public partial class 钢化版图预览 : Form { public 钢化版图预览() { InitializeComponent(); } public string CurrentProjectNo = ""; private void 钢化版图预览_Load(object sender, EventArgs e) { DataTable pInfo = ProjectDB.QueryProjectInfo(CurrentProjectNo); if (pInfo != null) { //currentOperateProject = openProject; foreach (DataColumn dc in pInfo.Columns) { Label labelInfo = showLabelText(dc.ColumnName, pInfo.Rows[0][dc].ToString()); if (labelInfo == null) { continue; } flpProjectInfo.Controls.Add(labelInfo); } } webBrowser1.Dock = DockStyle.Fill; webBrowser1.Navigate("http://10.153.19.11:801/#/new-page?current=P24052502"); //webBrowser1.Navigate("http://baidu.com"); } Label showLabelText(string t, string v) { Label lblInfo = new Label { BorderStyle = BorderStyle.FixedSingle, Font = new Font("微软雅黑", 10), AutoSize = true, Margin = new Padding(3, 3, 3, 3) }; switch (t) { case "project_no": lblInfo.Text = "工程号"; //lblInfo.BackColor = Color.White; //lblInfo.Text = ""; lblInfo.BackColor = Color.White; break; case "project_name": lblInfo.Text = "工程名称"; //lblInfo.BackColor = Color.White; break; case "glass_type": lblInfo.Text = "膜系"; //lblInfo.BackColor = Color.White; break; case "glass_thickness": lblInfo.Text = "厚度"; //lblInfo.BackColor = Color.White; break; case "order_glass_type": lblInfo.Text = "下单膜系"; //lblInfo.BackColor = Color.White; break; case "order_glass_thickness": lblInfo.Text = "下单厚度"; //lblInfo.BackColor = Color.White; break; case "type": lblInfo.Text = "类型"; //lblInfo.BackColor = Color.White; break; case "state": lblInfo.Text = "状态"; //lblInfo.BackColor = Color.White; break; case "glass_total": lblInfo.Text = "小片数量"; //lblInfo.BackColor = Color.White; break; case "glass_total_area": lblInfo.Text = "小片面积"; //lblInfo.BackColor = Color.White; break; case "process_qty": lblInfo.Text = "流程卡数量"; //lblInfo.BackColor = Color.White; break; case "raw_stock_qty": lblInfo.Text = "使用的原料数"; //lblInfo.BackColor = Color.White; break; case "avg_cut_pct": lblInfo.Text = "平均切裁率"; //lblInfo.BackColor = Color.White; break; case "chaos_pct": lblInfo.Text = "(钢化)混排程度"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "max_load_pct": lblInfo.Text = "(钢化)最大装载率"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "max_area": lblInfo.Text = ""; //lblInfo.BackColor = Color.White; break; case "max_qty": lblInfo.Text = ""; //lblInfo.BackColor = Color.White; break; case "load_width": lblInfo.Text = "(钢化)上片台宽"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "load_length": lblInfo.Text = "(钢化)上片台长"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "x_space": lblInfo.Text = "(钢化)X轴间隔"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "y_space": lblInfo.Text = "(钢化)Y轴间隔"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "load_rate": lblInfo.Text = "(钢化)平均装载率"; lblInfo.BackColor = ColorUtil.WarningColor; break; //case "process_cards": //lblInfo.Text = "流程卡合集"; //lblInfo.BackColor = Color.White; break; case "furnaces_qty": lblInfo.Text = "(钢化)总炉数"; lblInfo.BackColor = ColorUtil.WarningColor; break; case "createrName": lblInfo.Text = "创建人"; //lblInfo.BackColor = Color.White; break; //case "create_time": // lblInfo.Text = "创建时间"; // //lblInfo.BackColor = Color.White; // break; //case "update_time": // lblInfo.Text = "更新时间"; // //lblInfo.BackColor = Color.White; // break; default: break; } if (string.IsNullOrEmpty(lblInfo.Text)) { return null; } lblInfo.Text += ":" + v; return lblInfo; } } }