| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | 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 DLLPass;namespace СУБД_Швейная_фабрика{    public partial class FormReg : Form    {        public FormReg()        {            InitializeComponent();        }        private void BtnReg_Click(object sender, EventArgs e)        {            // если пароль, указанный пользователем, не соответствует требованиям            if (!ClassCheckPass.CheckPass(PassTextBox.Text))            {                MessageBox.Show("Пароль не соответствует требованиям.", "Внимание!",                     MessageBoxButtons.OK, MessageBoxIcon.Exclamation);                PassTextBox.Focus();                return;  // выйти из процедуры            }            try            {                BsUsers.EndEdit();                this.usersTableAdapter.Update(this.fab2021DataSet1.Users);            }            catch            {                MessageBox.Show(@"В базе данных уже есть пользователь с таким логином.Введите уникальный логин пользователя.", "Внимание!", MessageBoxButtons.OK,MessageBoxIcon.Exclamation);                LoginTextBox.Focus();            }            this.DialogResult = DialogResult.OK;            Close();        }        private void FormReg_Load(object sender, EventArgs e)        {            // TODO: This line of code loads data into the 'fab2021DataSet1.Users' table. You can move, or remove it, as needed.            this.usersTableAdapter.Fill(this.fab2021DataSet1.Users);            BsUsers.AddNew();            LblRole.Text = "заказчик";        }        private void CbxShowPass_CheckedChanged(object sender, EventArgs e)        {            PassTextBox.UseSystemPasswordChar = !PassTextBox.UseSystemPasswordChar;        }    }}
 |