Exemplo n.º 1
0
 private void FillForm()
 {
     if (_statusUpdate == true)
     {
         Text = "Изменение пользователя: " + _userStruct.login;
         comboBoxLevel.Text   = _userStruct.levelName;
         textBoxName.Text     = _userStruct.name;
         textBoxSurname.Text  = _userStruct.surname;
         textBoxLogin.Text    = _userStruct.login;
         pictureBoxUser.Image = (_userStruct.binary != null) ? ImageMethod.BinaryToImage(_userStruct.binary) : null;
     }
 }
Exemplo n.º 2
0
 private void FillForm()
 {
     this.Text += _userStruct.login;
     this.textBoxLogin.Text       = _userStruct.login;
     this.textBoxLevel.Text       = _userStruct.levelName;
     this.textBoxName.Text        = _userStruct.name;
     this.textBoxSurname.Text     = _userStruct.surname;
     this.textBoxProject.Text     = DataMethod.CountFiles(_userStruct.userId, StatusFile.Project).ToString();
     this.textBoxReview.Text      = DataMethod.CountFiles(_userStruct.userId, StatusFile.Review).ToString();
     this.textBoxDraft.Text       = DataMethod.CountFiles(_userStruct.userId, StatusFile.Draft).ToString();
     this.textBoxAllFiles.Text    = DataMethod.CountFiles(_userStruct.userId, StatusFile.My).ToString();
     this.textBoxSizeFiles.Text   = FileMethod.FileSize(DataMethod.SizeAllFiles(_userStruct.userId));
     this.textBoxDatetimeAT.Text  = _userStruct.dateTimeAT.ToString();
     this.pictureBoxUser.SizeMode = PictureBoxSizeMode.StretchImage;
     this.pictureBoxUser.Image    = (_userStruct.binary != null) ? ImageMethod.BinaryToImage(_userStruct.binary) : null;
 }
Exemplo n.º 3
0
 private void FillForm()
 {
     try
     {
         Text = "Свойства пользователя: " + _userStruct.login;
         textBoxLogin.Text       = _userStruct.login;
         textBoxLevel.Text       = _userStruct.levelName;
         textBoxName.Text        = _userStruct.name;
         textBoxSurname.Text     = _userStruct.surname;
         textBoxProject.Text     = DataMethod.CountFiles(_userStruct.userId, StatusFileEnum.Project).ToString();
         textBoxDraft.Text       = DataMethod.CountFiles(_userStruct.userId, StatusFileEnum.Draft).ToString();
         textBoxAllFiles.Text    = DataMethod.CountFiles(_userStruct.userId, StatusFileEnum.My).ToString();
         textBoxSizeFiles.Text   = FileMethod.FileSize(DataMethod.SizeAllFiles(_userStruct.userId));
         textBoxDatetimeAT.Text  = _userStruct.dateTimeAT.ToString();
         pictureBoxUser.SizeMode = PictureBoxSizeMode.StretchImage;
         pictureBoxUser.Image    = (_userStruct.binary != null) ? ImageMethod.BinaryToImage(_userStruct.binary) : null;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }