private void PublicShowDataMessage_Load(object sender, EventArgs e) { CommonMetaList commonMetaList = new CommonMetaList(); ListMaintenance.ListDataStatusDataTable listDataStatusDataTable = commonMetaList.GetListDataStatus(); this.comboBoxDataStatusID.DataSource = listDataStatusDataTable; this.comboBoxDataStatusID.DisplayMember = listDataStatusDataTable.DescriptionColumn.ColumnName; this.comboBoxDataStatusID.ValueMember = listDataStatusDataTable.DataStatusIDColumn.ColumnName; this.dataStatusIDBinding = this.comboBoxDataStatusID.DataBindings.Add("SelectedValue", this.dataMessageMaster, "DataStatusID", true); this.coilCodeAndExtentionBinding = this.textBoxCoilCodeAndExtention.DataBindings.Add("Text", this, "CoilCodeAndExtention", true); this.counterValueBinding = this.textBoxCounterValue.DataBindings.Add("Text", this.dataMessageMaster, "CounterValue", true); this.counterAutonicsBinding = this.textBoxCounterAutonics.DataBindings.Add("Text", this.dataMessageMaster, "CounterAutonics", true); this.dataMessageDisplayBinding = this.textBoxDataMessageDisplay.DataBindings.Add("Text", this, "DataMessageDisplay", true); this.userInputCounterValueBinding = this.textBoxUserInputCounterValue.DataBindings.Add("Text", this, "UserInputCounterValue", true, DataSourceUpdateMode.OnPropertyChanged); this.dataStatusIDBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.coilCodeAndExtentionBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.counterValueBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.counterAutonicsBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.dataMessageDisplayBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.userInputCounterValueBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); }
public ListMaintenance.ListDataStatusDataTable GetDataStatusByID(int dataStatusID) { ListDataStatusTableAdapter listDataStatusTableAdapter = new ListDataStatusTableAdapter(); ListMaintenance.ListDataStatusDataTable listDataStatusDataTable = listDataStatusTableAdapter.GetDataByDataStatusID(dataStatusID); return(listDataStatusDataTable); }
public string GetDataStatusName(int dataStatusID) { ListMaintenance.ListDataStatusDataTable listDataStatusDataTable = this.GetDataStatusByID(dataStatusID); if (listDataStatusDataTable.Rows.Count > 0) { return(listDataStatusDataTable.Rows[0]["Description"].ToString()); } else { return(""); } }
public ListMaintenance.ListDataStatusDataTable GetListDataStatus(bool withNewRow) { ListDataStatusTableAdapter listDataStatusTableAdapter = new ListDataStatusTableAdapter(); ListMaintenance.ListDataStatusDataTable listDataStatusDataTable = listDataStatusTableAdapter.GetData(); if (withNewRow) { listDataStatusDataTable.AddListDataStatusRow("", DateTime.Now); } return(listDataStatusDataTable); }