예제 #1
0
        private void Btn_Click_Save(Object send, EventArgs e, NewTabItem newtbitem)
        {
            //var g = MainPanel.Items.GetItemAt(MainPanel.Items.Count - 1);
            Grid gr = newtbitem.tbitem.Content as Grid;

            foreach (var f in gr.Children)
            {
                if (f as StackPanel != null)
                {
                    StackPanel sp = f as StackPanel;
                    foreach (var i in sp.Children)
                    {
                        if (i as DataGrid != null)
                        {
                            DataGrid dg = i as DataGrid;
                            newtbitem.NewTB.SetDataGridContentToBD();
                        }
                    }
                }
            }
            MessageBox.Show("Изменения успешно сохранены");
        }
예제 #2
0
 private void Btn_Click_AddSection(Object send, EventArgs e, NewTabItem newtbitem)
 {
     MessageBox.Show("Секция добавлена");
 }
예제 #3
0
 private void Btn_Click_Delete(Object send, EventArgs e, NewTabItem newtbitem)
 {
     newtbitem.DeleteTabItem();
     MainPanel.Items.Remove(newtbitem.tbitem);
     MessageBox.Show("Таблица " + newtbitem.NewTB.nameDB + " успешно удалена");
 }