Exemplo n.º 1
0
 private void TreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     HideAll();
     if (DashboardPanel_TreeView.SelectedNode != null)
     {
         IComponent component = (IComponent)DashboardPanel_TreeView.SelectedNode.Tag;
         if (component is Campaign)
         {
             SelectedCampaign = ((Campaign)DashboardPanel_TreeView.SelectedNode.Tag);
             if (SelectedCampaign.Type == "Donation")
             {
                 DashboardPanel_DeliveryCodeLabel.Show();
                 DashboardPanel_DeliveryCodeTextBox.Show();
                 DashboardPanel_ValidateDeliveryButton.Show();
             }
         }
         else if (component is Contribution)
         {
             SelectedContribution     = (Contribution)DashboardPanel_TreeView.SelectedNode.Tag;
             InfoPanel_Username.Text  = SelectedContribution.Username;
             InfoPanel_OtherInfo.Text = SelectedContribution.OtherInfo;
             InfoPanel.Show();
             if (SelectedContribution.Type == "Volunteering" && SelectedContribution.Status == "Pending")
             {
                 DashboardPanel_ApproveVolunteerButton.Show();
             }
             else if (SelectedContribution.Type == "Volunteering" && SelectedContribution.Status == "InProgress")
             {
                 DashboardPanel_ValidateContributionButton.Show();
             }
         }
     }
 }
Exemplo n.º 2
0
 private void HideAll()
 {
     InfoPanel.Hide();
     DashboardPanel_DeliveryCodeLabel.Hide();
     DashboardPanel_DeliveryCodeTextBox.Hide();
     DashboardPanel_ValidateDeliveryButton.Hide();
     DashboardPanel_ValidateContributionButton.Hide();
     DashboardPanel_ApproveVolunteerButton.Hide();
 }