Exemplo n.º 1
0
        private void loginClicked(object sender, EventArgs e)
        {
            IDPassWord = new String[] { textBox_ID.Text, textBox_PassWord.Text };
            SQLITE sq = new SQLITE("TestSystem");

            sq.TableName = "IDAndPassword";

            if (textBox_ID.Text != "" && textBox_PassWord.Text != "")
            {
                if (textBox_PassWord.Text == sq.selectData(IDPassWord))
                {
                    this.Close();
                    //VCI_CloseDevice(Can.m_devtype, Can.m_devind);
                    paForm.Close();
                    formPeizhi = new FormPeizhi(formName);
                    formPeizhi.Show();

                    //new Thread(() => Application.Run(new FormZuhebanPeizhi())).Start();
                }
                else
                {
                    this.label1.Text = "账号或密码不正确";
                }
            }
            else
            {
                this.label1.Text = "账号或密码不能为空";
            }
        }
Exemplo n.º 2
0
        private void changeOKButton_Click(object sender, EventArgs e)
        {
            IDPassWord = new String[] { changePasswordIDTextbox.Text, changePasswordOldTextbox.Text };
            SQLITE sq = new SQLITE("TestSystem");

            sq.TableName = "IDAndPassword";

            if (changePasswordIDTextbox.Text != "" && changePasswordOldTextbox.Text != "" && changePasswordNewTextbox.Text != "")
            {
                if (changePasswordOldTextbox.Text == sq.selectData(IDPassWord))
                {
                    sq.updateData(IDPassWord, changePasswordNewTextbox.Text);
                    changePasswordLabel.Text = "修改完成";
                }
                else
                {
                    changePasswordLabel.Text = "账号或密码不正确";
                }
            }
            else
            {
                changePasswordLabel.Text = "账号或密码不能为空";
            }
        }