示例#1
0
        public FormMain(string str, FormAuthorization form)
        {
            InitializeComponent();
            formAuthorization = form;
            IdGroup           = str;
            ds = GetDataSet();
            FillDataGrid(ds.Tables[0]);
            buttonAddStudent.Click      += (sender, args) => InvokeAdd();
            exitToolStripMenuItem.Click += (sender, args) => Application.Exit();

            dataGridViewStudentsList.AllowUserToResizeColumns = false;
            dataGridViewStudentsList.AllowUserToResizeRows    = false;
            dataGridViewStudentsList.MultiSelect = false;

            buttonDeleteStudent.Click          += (sender, args) => InvokeDelete();
            dataGridViewStudentsList.CellClick += (sender, args) => SelectFullRow(args);
            dataGridViewStudentsList.CellEnter += (sender, args) => SelectFullRow(args);
            labelTitle.Text = labelTitle.Text + GetGroupName();
            FillListTb();
            buttonAddPhoto.Click       += (sender, args) => InvokeAddPhoto();
            buttonChangeStudent.Click  += (sender, args) => ChangeCard();
            buttonSaveCard.Click       += (sender, args) => SaveCard();
            buttonDeletePhoto.Click    += (sender, args) => DeletePhoto();
            comboBox1.SelectedIndex     = 0;
            tbSearchByWord.TextChanged += (sender, args) => SearchingByWord();
            buttonMakeReport.Click     += (sender, args) => MakeReport();

            buttonOpenWord.Click += (sender, args) => OpenWithWord();
            this.Load            += (sender, args) =>
            {
                buttonAddPhoto.Visible    = false;
                buttonDeletePhoto.Visible = false;
                dtDOB.MaxDate             = DateTime.Now.Date;
            };
        }
示例#2
0
 public FormAdminPanel(FormAuthorization formAuthorization)
 {
     InitializeComponent();
     authorization = formAuthorization;
     LoadDataGrid();
     buttonSave.Click += (sender, args) => SaveChanges();
     this.FormClosing += (sender, args) => authorization.Show();
     buttonEncr.Click += (sender, args) => Encrypt();
 }