예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 public virtual OperationResult UpdateEntity(ErrorCodeGroup ecg, bool isSave = true)
 {
     return(ecgRepository.Update(ecg, isSave));
 }
예제 #3
0
 public virtual OperationResult AddEntity(ErrorCodeGroup ecg, bool isSave = true)
 {
     return(ecgRepository.Insert(ecg, isSave));
 }