/// <summary> /// Start Claim on Selected Order /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btbStartClaim_Click(object sender, EventArgs e) { if (selectedOrder > 0) { var c = claimService.NewClaim(selectedOrder, 8); TabPage tab = new TabPage(); tab.Text = "Claim # " + c.ClaimId.ToString(); ClaimControl control = new ClaimControl(c.ClaimId, _ctx); control.Dock = DockStyle.Fill; tab.Controls.Add(control); tabClaims.TabPages.Add(tab); dgSupplierClaims.DataSource = ordersService.GetSupplierOrders(c.SupplierId.Value); } }
private void OpenClaimTab(int claimID) { try { TabPage tab = new TabPage(); tab.Text = "Claim # " + claimID.ToString(); ClaimControl control = new ClaimControl(claimID, _ctx); control.Dock = DockStyle.Fill; tab.Controls.Add(control); tabClaims.TabPages.Add(tab); tabClaims.SelectedTab = tab; } catch (Exception) { ; } }