示例#1
0
        private void авторизацияToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AutorizationForm AutoForm = new AutorizationForm();

            AutoForm.Owner = this;
            AutoForm.ShowDialog();
        }
示例#2
0
        private void Form1_Activated(object sender, EventArgs e)
        {
            if (autorizationFlag == true)
            {
                if (TypeOfAccount == 2)
                {
                    AllFill();
                    Savebttn.Enabled = true;
                    button1.Enabled  = true;
                    регистрацияToolStripMenuItem.Enabled           = true;
                    инструментыToolStripMenuItem.Enabled           = true;
                    авторизацияToolStripMenuItem.Enabled           = false;
                    отладкаToolStripMenuItem.Enabled               = true;
                    очиститьТаблицуToolStripMenuItem.Enabled       = true;
                    экспортToolStripMenuItem.Enabled               = true;
                    добавитьУченикаToolStripMenuItem.Enabled       = true;
                    таблицыАутентификацииToolStripMenuItem.Enabled = true;
                    toolStripStatusLabel5.Text = "Вы авторизовались как :Администратор";
                }
                if (TypeOfAccount == 0)
                {
                    AllFill();
                    Savebttn.Enabled = true;
                    button1.Enabled  = true;
                    регистрацияToolStripMenuItem.Enabled     = true;
                    инструментыToolStripMenuItem.Enabled     = true;
                    авторизацияToolStripMenuItem.Enabled     = false;
                    отладкаToolStripMenuItem.Enabled         = true;
                    экспортToolStripMenuItem.Enabled         = true;
                    добавитьУченикаToolStripMenuItem.Enabled = true;
                    toolStripStatusLabel5.Text = "Вы авторизовались как: Библиотекарь";
                }
                if (TypeOfAccount == 1)
                {
                    try
                    {
                        ID_Uchenika = (int)this.uchenikiTableAdapter.GetID(toolStripStatusLabel3.Text, UchenikDR);
                        uchenikForm UchForm = new uchenikForm();
                        UchForm.Owner = this;
                        UchForm.ShowDialog();
                    }
                    catch (InvalidOperationException) { MessageBox.Show("Данного ученика нет в общей базе данных, обратитесь к сотруднику библиотеки!");
                                                        AutorizationForm AForm = new AutorizationForm();

                                                        TypeOfAccount = 4;
                                                        AForm.Owner   = this;
                                                        AForm.ShowDialog(); }
                }
            }
            if (TypeOfAccount == 4)
            {
                this.Validate();
            }
            cheakSistem();
        }
示例#3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     using (AutorizationForm AForm = new AutorizationForm())
     {
         AForm.Owner = this;
         AForm.ShowDialog();
     }
     if (StatusLabl.Text == "StatusLable")
     {
         StatusLabl.Text = null;
     }
 }