Esempio n. 1
0
        private void btnUserFile_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridViewUsers.RowCount.Equals(0))
            {
                XtraMessageBox.Show("There is no user(s) to access", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                for (int x = 0; x < gridViewUsers.SelectedRowsCount; x++)
                {
                    string eUID = gridViewUsers.GetRowCellValue(gridViewUsers.GetSelectedRows()[x], gridColumnUserID).ToString();
                    string eUserLvl = gridViewUsers.GetRowCellValue(gridViewUsers.GetSelectedRows()[x], gridColumnUserLvl).ToString();

                    frmFiles userFiles = new frmFiles(eUID, eUserLvl, ownerArea, ownerUID, ownerUserlvl);
                    userFiles.ShowDialog();
                }
            }
        }
Esempio n. 2
0
        private void btnStudentFile_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            List<string> UID = new List<string>();
            List<string> CID = new List<string>();

            if (userControl.gridViewUsers.RowCount.Equals(0))
            {
                XtraMessageBox.Show("There is no student(s) to view", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                for (int x = 0; x < userControl.gridViewUsers.SelectedRowsCount; x++)
                {
                    string uid = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserID).ToString();
                    string fName = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserfName).ToString();
                    string mName = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUsermName).ToString();
                    string lName = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserlName).ToString();
                    string ext = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserExt).ToString();
                    string ownerUserlvl = userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserLvl).ToString();
                    
                    string cid = this.CID;

                    frmFiles userFiles = new frmFiles(uid, ownerUserlvl, classArea, string.Empty, userlvl);
                    userFiles.ShowDialog();
                }
            }
        }