예제 #1
0
        private add_book_frm()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            try { sqlcon.Open(); }
            catch { }

            /*     for(int i=0;i<10;i++)
             *   {
             *       ListViewItem a = new ListViewItem();
             *       a.Text = "asd"+i;
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       a.SubItems.Add("f**k off" + i);
             *       listViewEx1.Items.Add(a);
             *   }*/
            read_from_database_to_listview();
        }
        /*    public static change_password getInstance()
         *  {
         *      if (uniqueInstance == null)
         *          uniqueInstance = new change_password();
         *      return uniqueInstance;
         *  }*/

        private void change_btn_Click(object sender, EventArgs e)
        {
            getSqlConnection getcon = new getSqlConnection();
            SqlConnection    sqlcon = getcon.GetCon();
            SqlCommand       sqlcom = sqlcon.CreateCommand();

            MessageBoxEx.EnableGlass = false;
            if (
                password_box1.Text == "" ||
                old_password.Text == "" ||
                password_box2.Text == ""
                )
            {
                MessageBoxEx.Show("密码不能为空!");
                return;
            }


            if (password_box1.Text != password_box2.Text)
            {
                MessageBoxEx.Show("两次密码输入不一致!");
                return;
            }

            sqlcom.CommandText = $"update manager set userpassword='******' where userid='{Userid}'";
            int flag = sqlcom.ExecuteNonQuery();

            if (flag == 1)
            {
                MessageBoxEx.EnableGlass = false;
                MessageBoxEx.Show("更改成功!");
                this.Close();
            }
        }
예제 #3
0
        private borrow_book_frm()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
        }
예제 #4
0
        public reader_form()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
        }
예제 #5
0
        private add_reader_frm()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            read_reader_from_database();
        }
예제 #6
0
        private return_handle_frm()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            read_borrow_from_database();
        }
예제 #7
0
        private delete_frm()
        {
            InitializeComponent();
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            read_from_database_to_listview();
        }
        private update_book_frm()
        {
            InitializeComponent();
            this.TopLevel = false;
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            try { sqlcon.Open(); }
            catch (Exception ex) { }
            read_from_database_to_listview();
        }
예제 #9
0
        public Registry_form()
        {
            InitializeComponent();
            login = Program.first;
            getSqlConnection getcon = new getSqlConnection();

            sqlcon = getcon.GetCon();
            toolTip1.SetToolTip(reg_id, "ÊäÈëÕ˺Å");
            toolTip1.SetToolTip(reg_password, "ÊäÈëÃÜÂë");
            toolTip1.SetToolTip(reg_password_again, "ÊäÈëÃÜÂë");
            toolTip1.SetToolTip(serial_reg_box, "ÊäÈëÐòÁкÅ");
            toolTip1.SetToolTip(registry_button, "µã»÷×¢²á");
        }
예제 #10
0
        public reader_reg_form()
        {
            InitializeComponent();
            login = Program.first;
            getSqlConnection sql = new getSqlConnection();

            sqlcon = sql.GetCon();
            toolTip1.SetToolTip(readerId_box, "�����˺�");
            toolTip1.SetToolTip(readerpassword_box, "��������");
            toolTip1.SetToolTip(phone_box, "����绰����");
            toolTip1.SetToolTip(id_box, "����֤������");
            toolTip1.SetToolTip(id_kind_box, "ѡ��֤������");
            toolTip1.SetToolTip(reader_password_again, "��������");
            toolTip1.SetToolTip(reader_reg_button, "���ע��");
        }
예제 #11
0
        public Login_Form()
        {
            InitializeComponent();
            getSqlConnection getConnection = new getSqlConnection();

            try
            {
                sqlcon = getConnection.GetCon();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Á¬½ÓÊý¾Ý¿âʧ°Ü£¡");
            }
            toolTip1.SetToolTip(isManager, "ÐèÒªÒԵǼ»ò×¢²áΪ¹ÜÀíÔ±Éí·Ý£¬Çë¹´Ñ¡£¡");
            toolTip1.SetToolTip(userid_box, "ÊäÈëÕ˺Å");
            toolTip1.SetToolTip(userpassword_box, "ÊäÈëÃÜÂë");
            toolTip1.SetToolTip(Sign_in, "µã»÷µÇ¼");
            toolTip1.SetToolTip(Sign_up, "µã»÷×¢²á");
        }