コード例 #1
0
        private void button5_Click_1(object sender, EventArgs e)
        {
            var pleaseWait = new frm_PleaseWait();

            pleaseWait.Show();
            Application.DoEvents();
            Cursor.Current = Cursors.WaitCursor;
            var myForm = new frm_Supplier();

            myForm.Show();
            pleaseWait.Hide();

            this.Hide();
        }
コード例 #2
0
        private void btnmanageaccounts_Click(object sender, EventArgs e)
        {
            var pleaseWait = new frm_PleaseWait();

            pleaseWait.Show();
            Application.DoEvents();
            Cursor.Current = Cursors.WaitCursor;
            var myForm = new frm_AccountManager();

            myForm.Show();
            pleaseWait.Hide();

            this.Hide();
        }
コード例 #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            var pleaseWait = new frm_PleaseWait();

            pleaseWait.Show();
            Application.DoEvents();
            Cursor.Current = Cursors.WaitCursor;
            var myForm = new frm_TransactionRecord();

            myForm.Show();
            pleaseWait.Hide();

            this.Hide();
        }
コード例 #4
0
        private void btnLoginHistory_Click(object sender, EventArgs e)
        {
            var pleaseWait = new frm_PleaseWait();

            pleaseWait.Show();
            Application.DoEvents();
            Cursor.Current = Cursors.WaitCursor;
            var myForm = new frm_LoginHistory();

            myForm.Show();
            pleaseWait.Hide();

            this.Hide();
        }
コード例 #5
0
        private void btnTransactionRecord_Click(object sender, EventArgs e)
        {
            if (frm_Login.stockman == "Stockman")
            {
                DialogResult confirm = MessageBox.Show("Are you sure, you want to logout?", "Fabula's Merchandise System", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (confirm == DialogResult.Yes)
                {
                    Cursor.Current = Cursors.WaitCursor;
                    frm_Login.time = DateTime.Now.ToShortTimeString();
                    try
                    {
                        MySqlConnection Conn = ConString.Connection;
                        MySqlCommand    cmd  = new MySqlCommand("update tbl_loginhistory set time_out = '" + frm_Login.time + "', status = 'Offline' where login_id = '" + frm_Login.loginID + "'", Conn);

                        MySqlDataReader myReader;

                        myReader = cmd.ExecuteReader();

                        while (myReader.Read())
                        {
                        }
                        Conn.Close();

                        Cursor.Current = Cursors.AppStarting;
                        var myForm = new frm_Login();
                        myForm.Show();
                        this.Hide();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
                else if (confirm == DialogResult.No)
                {
                }
            }
            else
            {
                var pleaseWait = new frm_PleaseWait();
                pleaseWait.Show();
                Application.DoEvents();
                Cursor.Current = Cursors.WaitCursor;
                var myForm = new frm_TransactionRecord();
                myForm.Show();
                pleaseWait.Hide();

                this.Hide();
            }
        }
コード例 #6
0
        private void btnInventory_Click(object sender, EventArgs e)
        {
            if (frm_Login.stockman == "Stockman")
            {
            }
            else
            {
                var pleaseWait = new frm_PleaseWait();
                pleaseWait.Show();
                Application.DoEvents();
                Cursor.Current = Cursors.WaitCursor;
                var myForm = new frm_Inventory();
                myForm.Show();
                pleaseWait.Hide();

                this.Hide();
            }
        }
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            MySqlConnection Conn = ConString.Connection;


            if (txtConfirmPassword.Text == "" || txtNewPassword.Text == "")
            {
                string s = String.Empty;

                MessageBox.Show("Please input the require fields.", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.None);

                return;
            }
            else
            {
            }

            if (txtNewPassword.Text == txtConfirmPassword.Text)
            {
            }

            else
            {
                MessageBox.Show("Password doesn't match.", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }



            if (txtConfirmPassword.Text.Length < 6)
            {
                MessageBox.Show("The length of password should be 6 or 25 characters.", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
            }


            string password00 = txtConfirmPassword.Text;
            string password11 = txtNewPassword.Text;



            if (password00.Contains(@"\") || password11.Contains(@"\"))

            {
                MessageBox.Show("Your password is invalid for using " + @"'\'", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;
            }
            if (txtConfirmPassword.Text == oldpass)
            {
                MessageBox.Show("New and old password must not be equal.", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            MySqlCommand cmd = cmd = new MySqlCommand("update tbl_login set password = '******' where login_id = '" + frm_vforgotPassword_s1.getSubgeneralID + "'", Conn);

            cmd.CommandTimeout = 50000;
            MySqlDataReader myReader;

            try
            {
                myReader = cmd.ExecuteReader();

                while (myReader.Read())
                {
                }
                MessageBox.Show("Your password has been verified successfully.", "Fabula's Merchandise System", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);


                Conn.Close();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }



            this.Hide();

            var pleaseWait = new frm_PleaseWait();

            pleaseWait.Show();
            Application.DoEvents();
            Cursor.Current = Cursors.WaitCursor;
            var myForm = new frm_Login();

            myForm.Show();
            pleaseWait.Hide();
        }