private void FFeederMaintain_Load(object sender, System.EventArgs e) { if (tableSource == null) { tableSource = new DataTable(); tableSource.Columns.Add("FeederCode"); tableSource.Columns.Add("MaxCount", typeof(int)); tableSource.Columns.Add("UsedCount", typeof(int)); tableSource.Columns.Add("OldStatus"); tableSource.Columns.Add("MaintainType"); tableSource.Columns.Add("ReturnReason"); tableSource.Columns.Add("AnalyseReason"); tableSource.Columns.Add("OperationMessage"); tableSource.Columns.Add("Status"); tableSource.Columns.Add("MaintainUser"); tableSource.Columns.Add("MaintainDate"); tableSource.Columns.Add("MaintainTime"); } gridList.DataSource = tableSource; gridList.DisplayLayout.Bands[0].Columns["UsedCount"].Hidden = true; SetControlEnabled(); this.txtFeederNo.TextFocus(false, true); smtFacade = new SMTFacade(this.DataProvider); UserControl.UIStyleBuilder.FormUI(this); UserControl.UIStyleBuilder.GridUI(gridList); gridList.DisplayLayout.Bands[0].Columns["MaxCount"].Format = "#,#"; gridList.DisplayLayout.Bands[0].Columns["MaxCount"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right; gridList.DisplayLayout.Bands[0].Columns["UsedCount"].Format = "#,#"; gridList.DisplayLayout.Bands[0].Columns["UsedCount"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right; BenQGuru.eMES.BaseSetting.SystemSettingFacade sysFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider); analyseReasonList = sysFacade.GetParametersByParameterGroup("FEEDERANALYSEREASON"); if (analyseReasonList != null) { for (int i = 0; i < analyseReasonList.Length; i++) { BenQGuru.eMES.Domain.BaseSetting.Parameter parameter = (BenQGuru.eMES.Domain.BaseSetting.Parameter)analyseReasonList[i]; this.cboAnalyseReason.Items.Add(parameter.ParameterAlias); } } operationMessageList = sysFacade.GetParametersByParameterGroup("FEEDERSOLUTION"); if (operationMessageList != null) { for (int i = 0; i < operationMessageList.Length; i++) { BenQGuru.eMES.Domain.BaseSetting.Parameter parameter = (BenQGuru.eMES.Domain.BaseSetting.Parameter)operationMessageList[i]; this.cboOperationMessage.Items.Add(parameter.ParameterAlias); } } //this.InitPageLanguage(); //this.InitGridLanguage(gridList); }
private void ConvertStatusText() { if (tableSource.Rows.Count == 0) { return; } if (htStatus == null) { htStatus = new Hashtable(); BenQGuru.eMES.BaseSetting.SystemSettingFacade sysSetting = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider); object[] objs = sysSetting.GetParametersByParameterGroup("FEEDERSTATUS"); if (objs != null) { for (int i = 0; i < objs.Length; i++) { BenQGuru.eMES.Domain.BaseSetting.Parameter param = (BenQGuru.eMES.Domain.BaseSetting.Parameter)objs[i]; htStatus.Add(param.ParameterCode, param.ParameterAlias); } } } DataRow row = tableSource.Rows[tableSource.Rows.Count - 1]; if (htStatus.ContainsKey(row["Status"].ToString()) == true) { row["Status"] = htStatus[row["Status"].ToString()]; row["OldStatus"] = htStatus[row["OldStatus"].ToString()]; } if (this.rdoTakeCare.Checked == true) { row["MaintainType"] = this.rdoTakeCare.Text; } else if (this.rdoAdjust.Checked == true) { row["MaintainType"] = this.rdoAdjust.Text; } else if (this.rdoAnalyse.Checked == true) { row["MaintainType"] = this.rdoAnalyse.Text; } // 原因分析 if (row["AnalyseReason"].ToString() != string.Empty) { row["AnalyseReason"] = ((BenQGuru.eMES.Domain.BaseSetting.Parameter) this.analyseReasonList[this.cboAnalyseReason.SelectedIndex]).ParameterAlias; } if (row["OperationMessage"].ToString() != string.Empty) { row["OperationMessage"] = ((BenQGuru.eMES.Domain.BaseSetting.Parameter) this.operationMessageList[this.cboOperationMessage.SelectedIndex]).ParameterAlias; } }
private void FInvReceive_Load(object sender, System.EventArgs e) { _infoForm = ApplicationRun.GetInfoForm(); UserControl.UIStyleBuilder.FormUI(this); this.txtRecNo.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; #region 初始化Grid UserControl.UIStyleBuilder.GridUI(this.ultraGridContent); _tmpTable = new DataTable(); _tmpTable.Columns.Clear(); _tmpTable.Columns.Add("*", typeof(bool)); _tmpTable.Columns.Add("MoCode", typeof(string)); _tmpTable.Columns.Add("NO", typeof(string)); _tmpTable.Columns.Add("SEQ", typeof(int)); _tmpTable.Columns.Add("ModelCode", typeof(string)); _tmpTable.Columns.Add("ItemCode", typeof(string)); _tmpTable.Columns.Add("ItemDesc", typeof(string)); _tmpTable.Columns.Add("PlayQty", typeof(string)); _tmpTable.Columns.Add("ActQty", typeof(string)); _tmpTable.Columns.Add("MOPlanQty", typeof(string)); _tmpTable.Columns.Add("MOActQty", typeof(string)); BindGrid(); #endregion //入库单类型 this.cbxType.ComboBoxData.Items.Clear(); object[] types = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider).GetParametersByParameterGroup("INVRECEIVE"); if (types != null && types.Length > 0) { foreach (object obj in types) { BenQGuru.eMES.Domain.BaseSetting.Parameter param = obj as BenQGuru.eMES.Domain.BaseSetting.Parameter; if (obj != null) { this.cbxType.ComboBoxData.Items.Add(param.ParameterCode); } } if (this.cbxType.ComboBoxData.Items.Count > 0) { this.cbxType.ComboBoxData.SelectedIndex = 0; } } //产品别列表 BindModel(this.DataProvider, this.cbxModel); }