Exemplo n.º 1
0
        //bool Authorization = false;
        private void button5_Click(object sender, EventArgs e)
        {
            DBGeneral dbG = new DBGeneral();

            if (dbG.Login(textBox2.Text, textBox3.Text))
            {
                MessageBox.Show("Авторизация прошла успешно!", "Добро пожаловать", MessageBoxButtons.OK, MessageBoxIcon.Information);
                F1.EmpID = dbG.EmpID;
                F1.textBox1.Text = dbG.UserName;
                this.Close();
            }
            else
            {
                MessageBox.Show("Пользователя с таким именем или паролем не существует!", "Неверное имя или пароль!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                textBox3.Text = "";
            }
        }
Exemplo n.º 2
0
        private void Log()
        {
            DBGeneral dbg = new DBGeneral();

            dgvLOG.Columns.Clear();
            dgvLOG.AutoGenerateColumns = true;
            dgvLOG.DataSource = dbg.GetLog();
            dgvLOG.Columns["time"].HeaderText = "�����";
            dgvLOG.Columns["time"].Width = 80;
            dgvLOG.Columns["bar"].HeaderText = "��������";
            dgvLOG.Columns["bar"].Width = 80;
            dgvLOG.Columns["tit"].HeaderText = "�������";
            dgvLOG.Columns["tit"].Width = 600;
            dgvLOG.Columns["idr"].HeaderText = "��������";
            dgvLOG.Columns["idr"].Width = 80;
            dgvLOG.Columns["st"].HeaderText = "��������";
            dgvLOG.Columns["st"].Width = 100;
            foreach (DataGridViewColumn c in dgvLOG.Columns)
            {
                c.SortMode = DataGridViewColumnSortMode.NotSortable;
            }
        }
Exemplo n.º 3
0
        private void �������������������������������ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (Statistics.Columns != null)
                Statistics.Columns.Clear();
            DatePeriod f3 = new DatePeriod();
            f3.ShowDialog();
            label18.Text = "";
            label19.Text = "";
            label19.Text = "������ �������� ��������� �� ������ � " + f3.StartDate.ToString("dd.MM.yyyy") + " �� " + f3.EndDate.ToString("dd.MM.yyyy") + ": ";
            DBGeneral dbg = new DBGeneral();

            try
            {
                Statistics.DataSource = dbg.GetOperatorActions(f3.StartDate, f3.EndDate, EmpID);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Statistics.Columns.Clear();
                return;
            }
            autoinc(Statistics);
            Statistics.Columns[0].HeaderText = "��";
            Statistics.Columns[1].Width = 250;
            Statistics.Columns[1].HeaderText = "��������";
            Statistics.Columns[2].HeaderText = "����";
            Statistics.Columns[2].Width = 200;
            autoinc(Statistics);
        }
Exemplo n.º 4
0
        public int GetAttendance()
        {
            DBGeneral dbg = new DBGeneral();

            return(dbg.GetAttendance());
        }
Exemplo n.º 5
0
        public void AddAttendance(ReaderVO reader)
        {
            DBGeneral dbg = new DBGeneral();

            dbg.AddAttendance(reader);
        }
Exemplo n.º 6
0
 public void RecieveBook(int IDEMP)
 {
     DBGeneral dbg = new DBGeneral();
     dbg.Recieve(ScannedBook, ScannedReader, IDEMP);
 }
Exemplo n.º 7
0
 internal int ISSUE(int IDEMP)
 {
     DBGeneral dbg = new DBGeneral();
     return dbg.ISSUE(ScannedBook, ScannedReader, IDEMP);
 }
Exemplo n.º 8
0
        //false - книга, true - читатель
        private BARTYPE BookOrReader(string data)
        {
            var dbg = new DBGeneral();

            return dbg.BookOrReader(data);
        }
Exemplo n.º 9
0
 internal void RemoveResponsibility(int idiss, int EmpID)
 {
     DBGeneral dbg = new DBGeneral();
     dbg.RemoveResposibility(idiss, EmpID);
     return;
 }
Exemplo n.º 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            SmtpClient client = new SmtpClient("neos.libfl.ru");
            //client.EnableSsl = true;
            client.Credentials = new NetworkCredential("*****@*****.**", "abonement123");
            MailAddress from = new MailAddress("*****@*****.**", "ВГБИЛ", Encoding.UTF8);
            MailAddress to;
            MailMessage message = new MailMessage();
            message.From = from;
            message.IsBodyHtml = true;
            //LiveEmail = "*****@*****.**";
            //WorkEmail = "*****@*****.**";
            if (Email != "")
            {
                to = new MailAddress(Email);
                message.To.Add(to);
            }

            message.Body = htmltext;

            message.BodyEncoding = Encoding.UTF8;
            message.Subject = "ВГБИЛ - Абонемент";
            message.SubjectEncoding = Encoding.UTF8;

            try
            {
                client.Send(message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            message.Dispose();
            MessageBox.Show("Отправлено успешно!");
            DBGeneral dbg = new DBGeneral();
            dbg.InsertSendEmailAction(f1.EmpID,reader.ID);
            Close();
        }
Exemplo n.º 11
0
        private BARTYPE BookOrReader(string data)
        {
            var dbg = new DBGeneral();

            return(dbg.BookOrReader(data));
        }
Exemplo n.º 12
0
        public void RecieveBook(int IDEMP)
        {
            DBGeneral dbg = new DBGeneral();

            dbg.Recieve(ScannedBook, ScannedReader, IDEMP);
        }