private void buttonCustomerSearch(object sender, EventArgs e) { FFindCustomerByDate ffc = new FFindCustomerByDate(nodeCustomer, FFindCustomerByDate.typeSearchCustomer.PAST); if (sender == leaveTomorowToolStripMenuItem) { ffc = new FFindCustomerByDate(nodeCustomer, FFindCustomerByDate.typeSearchCustomer.TOMOROW); } if (sender == leaveTodayToolStripMenuItem) { ffc = new FFindCustomerByDate(nodeCustomer, FFindCustomerByDate.typeSearchCustomer.TODAY); } if (sender == lEftToolStripMenuItem) { ffc = new FFindCustomerByDate(nodeCustomer, FFindCustomerByDate.typeSearchCustomer.PAST); } if (ffc.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (ffc.Selected != "") { try { treeView1.SelectedNode = nodeCustomer.Select(ffc.Selected); } catch (Exception exp) { MessageBox.Show("Error selecting Client " + exp.Message); } } } }
private void showCustomerLeavingTomorrow() { FFindCustomerByDate ffc = new FFindCustomerByDate(nodeCustomer, FFindCustomerByDate.typeSearchCustomer.TOMOROW); if (ffc.users.Count > 0) { ffc.ShowDialog(); } }