Ejemplo n.º 1
0
        private void AdministrationUserControl_Load(object sender, EventArgs e)
        {
            controlNameLabel.Text      = LanguageController.GetText(StringKeys.Administration);
            usersMenuItem.MenuItemText = LanguageController.GetText(StringKeys.Users);
            usersMenuItem.TooltipText  = LanguageController.GetText(StringKeys.UsersTooltip);

            userLoginLabel.Text  = GlobalSettings.User?.Login;
            userPictureBox.Image = DirectoriesController.GetImage(GlobalSettings.User?.AvatarImagePath, Properties.Resources.noUserImage_white);
        }
Ejemplo n.º 2
0
        private void FillDataGridView()
        {
            dataGridView.Rows.Clear();

            foreach (var item in ezkoController.GetUsers())
            {
                int rowIndex = dataGridView.Rows.Add(new object[]
                                                     { item.ID, DirectoriesController.GetImage(item.AvatarImagePath, Properties.Resources.noUserImage), item.Login, GetRoleName(item.RoleID), "", "Upraviť", "Zmazať", " " });
                dataGridView.Rows[rowIndex].Tag = item;
            }
        }
Ejemplo n.º 3
0
        private void FillDataGridView(IQueryable <Patient> patients)
        {
            dataGridView.Rows.Clear();

            foreach (var item in patients)
            {
                int rowIndex = dataGridView.Rows.Add(new object[]
                                                     { item.ID, DirectoriesController.GetImage(item.AvatarImagePath, Properties.Resources.noUserImage), item.FullName, item.Contact.Phone,
                                                       item.Contact.Email, item.Address?.FullAddress ?? "Nezadané", "", "EZKO", "PDF", "Zmazať" });
                dataGridView.Rows[rowIndex].Tag = item;
            }
        }
Ejemplo n.º 4
0
        private void InitializeForm()
        {
            if (user != null)
            {
                login = user.Login;
                email = user.Email;
                avatarPictureBox.Image   = DirectoriesController.GetImage(user.AvatarImagePath, Properties.Resources.noUserImage);
                userNameTextBox.ReadOnly = true;
            }

            userRolesDictionary = new Dictionary <string, int>();
            InitializeRoleComboBox();
        }
Ejemplo n.º 5
0
        private void editLoggedUserButton_Click(object sender, EventArgs e)
        {
            if (GlobalSettings.User != null)
            {
                EditUserForm form = new EditUserForm(GlobalSettings.User);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    if (userControlPanel != null)
                    {
                        userControlPanel.UpdateControl();
                    }

                    userPictureBox.Image = DirectoriesController.GetImage(GlobalSettings.User?.AvatarImagePath, Properties.Resources.noUserImage_white);
                }
            }
        }