예제 #1
0
파일: Main.cs 프로젝트: hacpatb/BikeStreet
        private void newClient_Click(object sender, EventArgs e)
        {
            TabPage       newTabPage = new TabPage();
            clientControl newClient  = new clientControl();

            newTabPage.Controls.Add(newClient);
            newTabPage.Text = "Новый клиент";
            ListTab.TabPages.Insert(ListTab.TabCount, newTabPage);
            ListTab.SelectedTab = newTabPage;
        }
예제 #2
0
파일: Main.cs 프로젝트: hacpatb/BikeStreet
 private void clientDGV_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (clientDGV.SelectedCells.Count > 0)
     {
         TabPage newTabPage = new TabPage();
         currentClient = clientDGV.Rows[clientDGV.SelectedCells[0].RowIndex].DataBoundItem as cClient;
         clientControl newClient = new clientControl(currentClient);
         newTabPage.Controls.Add(newClient);
         newTabPage.Text = currentClient.fio;
         ListTab.TabPages.Insert(ListTab.TabCount, newTabPage);
         ListTab.SelectedTab = newTabPage;
     }
 }