| | |
| | | using DevExpress.XtraGrid; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraLayout; |
| | | using DevExpress.XtraRichEdit.Model; |
| | | using DevExpress.XtraWaitForm; |
| | | using Gs.DevApp.DevFrm; |
| | | using Gs.DevApp.DevFrm.QC; |
| | |
| | | btnBaoGao.ItemClick += BtnBaoGao_ItemClick; |
| | | btnPingZhi.ItemClick += BtnPingZhi_ItemClick; |
| | | btnFPingZhi.ItemClick += BtnFPingZhi_ItemClick; |
| | | |
| | | var lst = new List<string>(); |
| | | foreach (BarItem item in barManager1.Items) |
| | | if (item is BarLargeButtonItem largeButtonItem) |
| | |
| | | actions = lst; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 初始化按钮状态 |
| | |
| | | // continue; |
| | | // } |
| | | //} |
| | | |
| | | //按钮是否在权限表中 |
| | | var exists = dt.AsEnumerable().Any(row => |
| | | row.Field<string>("name") == item.Caption); |
| | |
| | | _enabledList.Add(_btnName); |
| | | } |
| | | } |
| | | |
| | | //默认启用的按钮 |
| | | _enabledList.Add(btnLoad.Name); |
| | | _enabledList.Add(btnHelp.Name); |
| | |
| | | /// 反品质 |
| | | /// </summary> |
| | | public event EventHandler btnFPingZhiClick; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 公共属性 |
| | |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="inType"></param> |
| | | public void SetAllButton(int inType) |
| | | { |
| | | var lstBtn = new List<string>(); |
| | | if (inType == 0) |
| | | { |
| | | lstBtn.Add(btnSave.Name); |
| | | lstBtn.Add(btnEsc.Name); |
| | | foreach (BarItem item in barManager1.Items) |
| | | if (item is BarLargeButtonItem largeButtonItem) |
| | | { |
| | | if (!lstBtn.Contains(item.Name)) |
| | | largeButtonItem.Enabled = true; |
| | | else |
| | | largeButtonItem.Enabled = false; |
| | | } |
| | | return; |
| | | } |
| | | if (inType == 2) |
| | | { |
| | | lstBtn.Add(btnHelp.Name); |
| | | lstBtn.Add(btnLoad.Name); |
| | | lstBtn.Add(btnQuery.Name); |
| | | lstBtn.Add(btnLayout.Name); |
| | | lstBtn.Add(btnFont.Name); |
| | | lstBtn.Add(btnAdd.Name); |
| | | foreach (BarItem item in barManager1.Items) |
| | | if (item is BarLargeButtonItem largeButtonItem) |
| | | { |
| | | if (lstBtn.Contains(item.Name)) |
| | | largeButtonItem.Enabled = true; |
| | | else |
| | | largeButtonItem.Enabled = false; |
| | | } |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查找gridView |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |