FormProfile.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace СУБД_Альфапол
  11. {
  12. public partial class FormProfile : Form
  13. {
  14. public FormProfile()
  15. {
  16. InitializeComponent();
  17. }
  18. private void FormProfile_Load(object sender, EventArgs e)
  19. {
  20. // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Manager' table. You can move, or remove it, as needed.
  21. this.managerTableAdapter.Fill(this.dbAlphapolAGDataSet.Manager);
  22. lblPass.Hide();
  23. }
  24. private void BtnSave_Click(object sender, EventArgs e)
  25. {
  26. if (tbxPass1.Text != "")
  27. {
  28. if (tbxPass1.Text != tbxPass2.Text)
  29. {
  30. MessageBox.Show("Пароли должны совпадать!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
  31. return;
  32. }
  33. lblPass.Text = tbxPass1.Text;
  34. }
  35. bsMeneger.EndEdit();
  36. this.managerTableAdapter.Update(this.dbAlphapolAGDataSet.Manager);
  37. Close();
  38. }
  39. private void tbxPass1_TextChanged(object sender, EventArgs e)
  40. {
  41. }
  42. private void tbxPass2_TextChanged(object sender, EventArgs e)
  43. {
  44. }
  45. private void cbxShowPass_CheckedChanged(object sender, EventArgs e)
  46. {
  47. tbxPass1.UseSystemPasswordChar = !cbxShowPass.Checked;
  48. tbxPass2.UseSystemPasswordChar = !cbxShowPass.Checked;
  49. }
  50. }
  51. }