private void tab2_menu2_Click(object sender, RoutedEventArgs e) { MenuItem __menuItem = (MenuItem)e.Source; ContextMenu __contextMenu = (ContextMenu)__menuItem.Parent; ListView __lv = (ListView)__contextMenu.PlacementTarget; CallingRateInterRegion __rowview = (CallingRateInterRegion)__lv.SelectedItem; }
private void tab2_menu1_Click(object sender, RoutedEventArgs e) { MenuItem __menuItem = (MenuItem)e.Source; ContextMenu __contextMenu = (ContextMenu)__menuItem.Parent; ListView __lv = (ListView)__contextMenu.PlacementTarget; CallingRateInterRegion __rowview = (CallingRateInterRegion)__lv.SelectedItem; AddPrefixInterRegion __pop = new AddPrefixInterRegion(); __pop.Owner = this; __pop._propsValue = __rowview; __pop.Show(); }
private void btnOk_Click(object sender, RoutedEventArgs e) { // 값 filter //if (txtKind.SelectedIndex == 0) //{ // MessageBox.Show("대역 번호를 선택하세요."); // txtKind.Focus(); // return; //} if (string.IsNullOrEmpty(txtNationCode.Text.Trim())) { MessageBox.Show("국가 번호를 입력하세요."); txtNationCode.Focus(); return; } //if (string.IsNullOrEmpty(txtAreaCode.Text.Trim())) //{ // MessageBox.Show("지역 번호를 입력하세요."); // txtAreaCode.Focus(); // return; //} if (string.IsNullOrEmpty(txtNationNameKO.Text.Trim())) { MessageBox.Show("나라 이름(한글)을 입력하세요."); txtNationNameKO.Focus(); return; } if (string.IsNullOrEmpty(txtNationNameEN.Text.Trim())) { MessageBox.Show("나라 이름(영어)을 입력하세요."); txtNationNameEN.Focus(); return; } if (_mode == AddPrefixStates.Add) { CallingRateInterRegion __row = new CallingRateInterRegion() { Kind = txtKind.Text.Trim() , NationCode = txtNationCode.Text.Trim() , AreaCode = txtAreaCode.Text.Trim() , NameKo = txtNationNameKO.Text.Trim() , NameEn = txtNationNameEN.Text.Trim() , LM = txtLM.Text }; txtNationCode.Text = string.Empty; txtAreaCode.Text = string.Empty; txtNationNameKO.Text = string.Empty; txtNationNameEN.Text = string.Empty; } else if (_mode == AddPrefixStates.Modify) { this.Close(); } }