12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using PasswordCheckDll;
- namespace garment_factory
- {
- public partial class fProfil : Form
- {
- public fProfil()
- {
- InitializeComponent();
- }
- private void fProfil_Load(object sender, EventArgs e)
- {
- // TODO: данная строка кода позволяет загрузить данные в таблицу "fabrika2024DataSet.Users". При необходимости она может быть перемещена или удалена.
- this.usersTableAdapter.Fill(this.fabrika2024DataSet.Users);
- }
- private void BtnSave_Click(object sender, EventArgs e)
- {
- if (tbxoldpasw.Text != lblpassw.Text)
- {
- MessageBox.Show("Вы ввели неверный старый пароль!", "Внимание",
- MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- return;
- }
- if (tbxnewpasw.Text != "")
- {
- if (!PasswordCheckClass.PasswordCheck(tbxnewpasw.Text))
- {
- MessageBox.Show("Новый пароль не соответствует требованиям!",
- "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- return;
- }
- lblpassw.Text = tbxnewpasw.Text;
- }
- BsUsers.EndEdit();
- this.usersTableAdapter.Update(this.fabrika2024DataSet.Users);
- this.DialogResult = DialogResult.OK;
- Close();
- }
- private void CbxShowPass_CheckedChanged(object sender, EventArgs e)
- {
- tbxnewpasw.UseSystemPasswordChar = !tbxnewpasw.UseSystemPasswordChar;
- tbxoldpasw.UseSystemPasswordChar = !tbxoldpasw.UseSystemPasswordChar;
- }
- private void BtnCancel_Click(object sender, EventArgs e)
- {
- DialogResult=DialogResult.Cancel;
- }
- }
- }
|