コード例 #1
0
ファイル: AdminHome.cs プロジェクト: sammusaev/ClubSys
        //Constuctor loads navbar
        public AdminHome()
        {
            InitializeComponent();
            NavBar frmNavBar = new NavBar("Administrator");

            LoadFormIntoPanel.load(pnlNav, frmNavBar);
        }
コード例 #2
0
ファイル: AdminHome.cs プロジェクト: sammusaev/ClubSys
        private void btnAddClub_Click(object sender, EventArgs e)
        {
            AdminAddEdit frmAddClub = new AdminAddEdit();

            LoadFormIntoPanel.load(pnlContainer, frmAddClub);
            //lblSubPageTitle.Text = "Add New Club";
        }
コード例 #3
0
        public RepHome(string user)
        {
            InitializeComponent();
            NavBar frmNavBar = new NavBar("Representative");

            LoadFormIntoPanel.load(pnlNav, frmNavBar);

            string queryShowClubInfo = "SELECT ClubName, ClubDescription, ClubPresident, ClubVice, ClubSecretary, ClubSecretaryID, ClubEstablished FROM CLUB" +
                                       " WHERE ClubSecretaryID='" + user + "'";

            try
            {
                con.Open();
                SqlCommand    cmd = new SqlCommand(queryShowClubInfo, con);
                SqlDataReader dr  = cmd.ExecuteReader();
                while (dr.Read())
                {
                    lblClubName.Text        = (dr["ClubName"].ToString());
                    txtClubDescription.Text = (dr["ClubDescription"].ToString());
                    lblPresident.Text       = (dr["ClubPresident"].ToString());
                    lblVice.Text            = (dr["ClubVice"].ToString());
                    lblSecretary.Text       = (dr["ClubSecretary"].ToString());
                    lblEstablished.Text     = (dr["ClubEstablished"].ToString());
                }
                con.Close();
                ShowPastUpdates();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error:" + ex.Message, "Failed to retrieve club data");
            }
        }
コード例 #4
0
ファイル: StudentHome.cs プロジェクト: sammusaev/ClubSys
        public StudentHome()
        {
            InitializeComponent();
            NavBar frmNavBar = new NavBar("Student");

            LoadFormIntoPanel.load(pnlNav, frmNavBar);
            PopulateListbox("SELECT ClubName FROM CLUB WHERE ClubStatus=1");
            dynamicPanel.Visible = false;
            //retrieve clubnames & show them inside list box
        }
コード例 #5
0
ファイル: AdminHome.cs プロジェクト: sammusaev/ClubSys
        private void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                AdminAddEdit frmEditClub = new AdminAddEdit(lstClubs.SelectedItems[0].Text);
                LoadFormIntoPanel.load(pnlContainer, frmEditClub);
                //lblSubPageTitle.Text = "Edit Club";
            }

            catch (Exception ex)
            {
                MessageBox.Show("Please select a club to edit", ex.Message);
            }
        }
コード例 #6
0
ファイル: AdminHome.cs プロジェクト: sammusaev/ClubSys
        private void btnGenActivityList_Click(object sender, EventArgs e)
        {
            AdminReports frmReports = new AdminReports("updates");

            LoadFormIntoPanel.load(pnlContainer, frmReports);
        }