Esempio n. 1
0
        private void BtnPlayerIDEnter_Click(object sender, EventArgs e)
        {
            if (txtPlayerID.Text == "")
            {
                MessageBox.Show("Player ID can not be empty.");
                return;
            }
            if (!PlayerDataBaseControl.MatchingOneColumn("PlayerID", txtPlayerID.Text))
            {
                MessageBox.Show("Player ID does not exist.");
                return;
            }

            if (txtPointCardID.Text == "")
            {
                MessageBox.Show("Point Card ID can not be empty.");
                return;
            }
            if (!DataBaseControl.MatchingOneColumn_OfTable("PointCard", "PointCardID", txtPointCardID.Text))
            {
                MessageBox.Show("Point Card ID does not exist.");
                return;
            }

            PlayerDataBaseControl.playerID = txtPlayerID.Text;

            TopUpToPlayer();
        }
Esempio n. 2
0
        private void BtnPlayerAccountNameEnter_Click(object sender, EventArgs e)
        {
            if (txtPlayerAccountName.Text == "")
            {
                MessageBox.Show("Player Account Name can not be empty.");
                return;
            }

            if (!PlayerDataBaseControl.MatchingOneColumn("PlayerAccountName", txtPlayerAccountName.Text))
            {
                MessageBox.Show("Player Account Name does not exist.");
                return;
            }

            PlayerDataBaseControl.playerID = PlayerDataBaseControl.GetData_ByColumn("PlayerAccountName", txtPlayerAccountName.Text, "PlayerID");
            PlayerDataBaseControl.Load();

            if (StaffDataBaseControl.staffID != "")
            {
                ((StaffMenu)MdiParent).ChangeMDIForm_callByOtherForm(StaffMenu.Page.PlayerAccount_inSide);
            }
            else if (CSMDataBaseControl.CSMID != "")
            {
                ((CSMMenu)MdiParent).ChangeMDIForm_callByOtherForm(CSMMenu.Page.PlayerAccount_inSide);
            }
            else
            {
                MessageBox.Show("Unexpected flow.");
            }

            btnPlayerAccountNameEnter.Enabled = false;
        }