private void AddVisitContentForDesigner(int orderId) { if (!ParentPanel.Contains(visitContentForDesigner)) { visitContentForDesigner = new VisitContentForDesigner(); visitContentForDesigner.Name = "OrderDetailForDesigner"; visitContentForDesigner.ParentPanel = ParentPanel; visitContentForDesigner.NavigationBar = NavigationBar; visitContentForDesigner.employee = employee; visitContentForDesigner.Dock = DockStyle.Fill; visitContentForDesigner.orderID = orderId; ParentPanel.Controls.Add(visitContentForDesigner); } visitContentForDesigner.orderID = orderId; visitContentForDesigner.Show(); visitContentForDesigner.employee = employee; }
private void dgMySuordinate_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.ColumnIndex == 2) { int orderId = Convert.ToInt32(OrderList.Rows[e.RowIndex].Cells[0].Value); if (visitContentForDesigner == null) { visitContentForDesigner = new VisitContentForDesigner(); visitContentForDesigner.orderID = orderId; visitContentForDesigner.Name = "ModifyCustomer"; visitContentForDesigner.ParentPanel = ParentPanel; visitContentForDesigner.NavigationBar = NavigationBar; visitContentForDesigner.employee = employee; visitContentForDesigner.Dock = DockStyle.Fill; ParentPanel.Controls.Add(visitContentForDesigner); } visitContentForDesigner.orderID = orderId; visitContentForDesigner.Show(); } } }