Exemplo n.º 1
0
        private void gridRep_CellClick(object sender, GridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                btnDelete.Enabled = true;
                btnEdit.Enabled   = true;

                _netUser = AspNetUserService.GetCount(Enum.GetName(typeof(RolesConstants.Enum), RolesConstants.Enum.Admin)).ToList()[e.RowIndex];
                canPerformOtherAction = true;
            }
        }
Exemplo n.º 2
0
        private void NewForm_Load(object sender, EventArgs e)
        {
            try
            {
                if (IsEdit)
                {
                    AspNetUserItem = AspNetUserService.GetItem(Id);

                    txtSurname.Text      = AspNetUserItem.FirstName;
                    txtOtherName.Text    = AspNetUserItem.LastName;
                    txtPhoneNumber.Text  = AspNetUserItem.PhoneNumber;
                    txtEmail.Text        = AspNetUserItem.Email;
                    txtMatricNumber.Text = AspNetUserItem.MatricNumber;
                }
            }
            catch (Exception ex)
            {
                _logger.Error("Error Message: " + ex.Message.ToString(), ex);
                MessageBox.Show($@"Message: {ex.Message}{Environment.NewLine}Stack Message: {ex.StackTrace}", $@"Error Message from {typeof(ListForm)}");
            }
        }