public NewTabItem(TableSQL newtb, int widthfirstcolumn, int widthsecondcolumn, int widththirdcolumn)
 {
     NewTB              = newtb;
     _nameNewTB         = NewTB.nameDB;
     _widthfirstcolumn  = widthfirstcolumn;
     _widthsecondcolumn = widthsecondcolumn;
     _widththirdcolumn  = widththirdcolumn;
 }
Exemplo n.º 2
0
        private void InitTabItem(string nameDB, string connection)
        {
            var        newtb     = new TableSQL(nameDB, connection);
            NewTabItem newtbitem = new NewTabItem(newtb, 150, 5, 500);
            TabItem    tbitem    = newtbitem.Create();

            MainPanel.Items.Add(tbitem);
            newtbitem.btn_save.Click    += (send, EventArgs) => { Btn_Click_Save(send, EventArgs, newtbitem); };
            newtbitem.btn_delete.Click  += (send, EventArgs) => { Btn_Click_Delete(send, EventArgs, newtbitem); };
            newtbitem.btn_section.Click += (send, EventArgs) => { Btn_Click_AddSection(send, EventArgs, newtbitem); };
        }
Exemplo n.º 3
0
        public void Button_NewTable_Click(object sender, RoutedEventArgs e)
        {
            string connectionString = @"Data Source=DESKTOP-997EUHU\SQLEXPRESS;Initial Catalog=usersd;Integrated Security=True";
            //string sql = "SELECT * FROM [usersd].[dbo].[Table]";
            var newtb = new TableSQL(TextBox_NewTable.Text, connectionString);

            newtb.CreateNewTable();
            NewTabItem newtbitem = new NewTabItem(newtb, 150, 5, 500);
            TabItem    tbitem    = newtbitem.Create();

            MainPanel.Items.Add(tbitem);
            newtbitem.btn_save.Click    += (send, EventArgs) => { Btn_Click_Save(send, EventArgs, newtbitem); };
            newtbitem.btn_delete.Click  += (send, EventArgs) => { Btn_Click_Delete(send, EventArgs, newtbitem); };
            newtbitem.btn_section.Click += (send, EventArgs) => { Btn_Click_AddSection(send, EventArgs, newtbitem); };
        }