private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { ErrorCodeGroup errorCodeGroup = (ErrorCodeGroup)listBox1.SelectedItem; if (errorCodeGroup != null) { listBox2.DataSource = errorCodeGroup.errorCodes.ToList(); } listBox2.SelectedItem = null; TsErrorCode tsErrorCode = Program.programContainer.GetExportedValue <FrmTsInputEdit>().currentTsErrorCode; if (tsErrorCode != null) { int index_listBoxe2 = listBox2.FindString(tsErrorCode.errorCode.ecdesc); if (index_listBoxe2 == -1) { MessageBox.Show("Item is not available in ListBox2"); } else { listBox2.SetSelected(index_listBoxe2, true); } } }
public virtual OperationResult UpdateEntity(ErrorCodeGroup ecg, bool isSave = true) { return(ecgRepository.Update(ecg, isSave)); }
public virtual OperationResult AddEntity(ErrorCodeGroup ecg, bool isSave = true) { return(ecgRepository.Insert(ecg, isSave)); }