Exemplo n.º 1
0
        private void btnSendMessage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            List<string> reciever = new List<string>();

            if (gridViewUsers.RowCount.Equals(0))
            {
                XtraMessageBox.Show("There is no user(s)", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                for (int x = 0; x < gridViewUsers.SelectedRowsCount; x++)
                {
                    reciever.Add(gridViewUsers.GetRowCellValue(gridViewUsers.GetSelectedRows()[x], gridColumnUserID).ToString());
                }
                //disable the sending of message to current user
                reciever.Remove(ownerUID);
                frmNewMessage message = new frmNewMessage(reciever, ownerUID);
                message.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void btnSend_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            List<string> uid = new List<string>();

            if (userControl.gridViewUsers.RowCount.Equals(0))
            {
                XtraMessageBox.Show("There is no student(s)", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                for (int x = 0; x < userControl.gridViewUsers.SelectedRowsCount; x++)
                {
                    uid.Add(userControl.gridViewUsers.GetRowCellValue(userControl.gridViewUsers.GetSelectedRows()[x], userControl.gridColumnUserID).ToString());
                }

                frmNewMessage message = new frmNewMessage(uid,log);
                message.ShowDialog();
            }
        }