using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; namespace Statistics.UserControls { public partial class StatisticsCtrl : UserControl { public int Id; /// Index of the tab page public MidOrWaterMetersCtrl BenchesCtrl; /// Reference to the parent control public StatisticsCtrl() { InitializeComponent(); } private void updateButton_Click(object sender, EventArgs e) { if (BenchesCtrl != null) BenchesCtrl.UpdateRequest(Id); } } }