private void UIControl() { ddlType.Items.Clear(); var allToolTypeData = ToolTypeInfoEx.GetToolTypeByToolClass("DIE").OrderBy(p => p.Type).ToList(); allToolTypeData.FindAll(p => p.Status.ToBool()).ForEach(p => ddlType.Items.Add(new ListItem(p.Type, p.ID))); ddlType.Items.Insert(0, ""); ddlState.Items.Clear(); var allToolStateData = ToolStateInfo.GetAllToolStates(); allToolStateData.FindAll(p => p.Status.ToBool()).ForEach(p => ddlState.Items.Add(new ListItem(p.State, p.ID))); ddlState.Items.Insert(0, ""); var tabPM = rtsDetail.FindTabByValue("PM"); var tabPMCounter = rtsDetail.FindTabByValue("PMCounter"); if (CimesGenuine.RegisterLicense.PM.AccessAuthority == EAccessAuthority.FullAccess) { if (tabPM != null) { //tabPM.Visible = true; if (tabPMCounter != null) { tabPMCounter.Visible = true; } } } else { if (tabPM != null) { //tabPM.Visible = false; if (tabPMCounter != null) { tabPMCounter.Visible = false; } } } }
private void LoadControlDefault() { ttbQuantity.Text = ""; ttbEquipment.Text = _CurrentEquipment; ttbDevice.Text = _CurrentDevice; //取得所有啟用之刀具類別 var toolTypes = ToolTypeInfoEx.GetToolTypeByToolClass("CUTTER"); ddlToolType.Items.Clear(); ddlToolType.DataSource = toolTypes; ddlToolType.DataTextField = "Type"; ddlToolType.DataValueField = "Type"; ddlToolType.DataBind(); ddlToolType.Items.Insert(0, ""); var lstToolOperation = WpcExClassItemInfo.GetInfoByClass("SAIToolOperation"); lstToolOperation.ForEach(oper => { ddlOperation.Items.Add(oper.Remark01); }); ddlOperation.Items.Insert(0, ""); }