protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.ddl_mid.Items.AddRange(Serial.GetList(SerialType.MachineID, true)); this.ddl_type.Items.AddRange(Serial.GetList(SerialType.Type, true)); this.ddl_shift.Items.AddRange(Serial.GetList(SerialType.Shift, true)); this.AspNetPager1.PageSize = System.Configuration.ConfigurationManager.AppSettings["PageSize"].ToInt32(); foreach (var x in Enum.GetValues(typeof(WorkStep))) { ws = (WorkStep)x; this.ddl_step.Items.Add(new ListItem(ws.ToString(), ((int)ws).ToString())); } this.ddl_step.Items.Insert(0, new ListItem("All", "9999")); ddl_step_SelectedIndexChanged(null, null); } }
internal async Task ShowShim(frmMain.PlcReference refplc, int shimno, double selshim, WorkStep index = WorkStep.FrontShim) { try { BeginInvoke((Action)(() => { lbl_FSG4_Bar.Text = refplc.Barcode; lbl_FSG4_Part.Text = refplc.PartName; lbl_FSG4_WorkDate.Text = refplc.WorkDate.ToString(); lbl_FSG4_WorkNo.Text = refplc.WorkNo.ToString(); lbl_FSG4_SelVal.Text = selshim.ToString("0.000"); lbl_FSG4_Plcno.Text = shimno.ToString(); })); } catch (Exception ex) { StackTrace trace = new StackTrace(ex, true); StackFrame stackFrame = trace.GetFrame(trace.FrameCount - 1); int lineNumber = stackFrame.GetFileLineNumber(); I_Home.ErrorLog(($" ({lineNumber})[ShowShim({index.ToString()}) Error] : {ex.ToString()}")); } }
private static void AssertAreNotEqual(WorkStep ws1, WorkStep ws2) { Assert.IsFalse(ws1.Equals(ws2)); Assert.AreNotEqual(ws1.GetHashCode(), ws2.GetHashCode()); Assert.AreNotEqual(ws1.ToString(), ws2.ToString()); }