コード例 #1
0
ファイル: PeopleGrid.xaml.cs プロジェクト: TheSklyar/MMSDLab2
        private void Create_Click(object sender, RoutedEventArgs e)
        {
            var edt = new PeopleEdit(_connectionSettings, OpenType.New);

            edt.Owner = this;
            edt.ShowDialog();
            UpdatePageCount();
            UpdateGrid();
        }
コード例 #2
0
ファイル: PeopleGrid.xaml.cs プロジェクト: TheSklyar/MMSDLab2
 private void Edit_Click(object sender, RoutedEventArgs e)
 {
     if (UserGrid.SelectedItem != null)
     {
         DataRowView row = UserGrid.SelectedItem as DataRowView;
         var         edt = new PeopleEdit(_connectionSettings, OpenType.Edit, Convert.ToInt32(row.Row.ItemArray[1]));
         edt.Owner = this;
         edt.ShowDialog();
         UpdatePageCount();
         UpdateGrid();
     }
 }
コード例 #3
0
ファイル: PeopleGrid.xaml.cs プロジェクト: TheSklyar/MMSDLab2
 public void Row_DoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (sender is DataGridRow row)
     {
         if (fromOtherView)
         {
             TemporaryStorage.Holder.Add("ID", ((DataRowView)row.Item).Row.ItemArray[1].ToString());
             this.Close();
             return;
         }
         var edt = new PeopleEdit(_connectionSettings, OpenType.View, Convert.ToInt32(((DataRowView)row.Item).Row.ItemArray[1].ToString()));
         edt.Owner = this;
         edt.ShowDialog();
         UpdatePageCount();
         UpdateGrid();
     }
 }