예제 #1
0
        private void btnParameterModify_Click(object sender, EventArgs e)
        {
            int selectIndex = lstvParameter.SelectedIndices[0];
            int itemIndex   = (int)lstvParameter.SelectedItems[0].Tag;

            QueryParameter frm = new QueryParameter(parameterList, itemIndex);

            frm.ShowDialog(this);

            ShowParameter();
            lstvParameter.Items[selectIndex].Selected = true;
        }
예제 #2
0
        private void btnParameterAdd_Click(object sender, EventArgs e)
        {
            int            count = parameterList.Count;
            QueryParameter frm   = new QueryParameter(parameterList);

            frm.ShowDialog(this);

            if (parameterList.Count > count)
            {
                ShowParameter();

                int i = 0;
                foreach (ListViewItem viewItem in lstvParameter.Items)
                {
                    if ((int)viewItem.Tag == count)
                    {
                        lstvParameter.Items[i].Selected = true;
                        break;
                    }
                    i++;
                }
            }
        }