コード例 #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            HelpdeskServiceForm helpdesk_form = new HelpdeskServiceForm();

            helpdesk_form.Show();
            Visible = false;
        }
コード例 #2
0
ファイル: UserLoginForm.cs プロジェクト: nabiyevRM/C-Sharp
        private void button1_Click(object sender, EventArgs e)
        {
            //checking email and password user to enter service form//
            ArrayList users = UserDatabase.GetAllUsersData();

            foreach (UserModel user in users)
            {
                if (user.Email == txbx_user_email.Text && user.Password == txbx_user_password.Text)
                {
                    MessageBox.Show("Sistemə uğurlu daxil olduz");
                    HelpdeskServiceForm h_services_form = new HelpdeskServiceForm();
                    h_services_form.Show();
                    Visible = false;
                }
                else
                {
                    MessageBox.Show("Email yaxud şifrə yanlışdır.");
                }
            }
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            // checking txbx values if card details contain in database payment will be successfull //
            if (BankCards.Card_Number == txbx_bank_card_number.Text && BankCards.Card_Expiry_Date == txbx_expiry_date.Text &&
                BankCards.Card_Cvc == txbx_cvc_number.Text)
            {
                // adding amount to balance //
                ArrayList cardData    = CardDetailsDB.GetAllCardData();
                int       cardBalance = Convert.ToInt32(BankCards.Card_Balance);
                int       txbxAmount  = Convert.ToInt32(txbx_payment_amount.Text);
                if (txbxAmount <= cardBalance)
                {
                    int userAmount  = 0;
                    int userBalance = 0;

                    MessageBox.Show("Ödəniş uğurlu yerinə yetirildi" + "\n" + "Zəhmət olmasa balansı yoxluyun");
                    foreach (CardModel card in cardData)
                    {
                        userAmount    += Convert.ToInt32(txbx_payment_amount.Text);
                        userBalance    = Convert.ToInt32(card.CardPrice);
                        userBalance   += userAmount;
                        card.CardPrice = Convert.ToString(userBalance) + "AZN";
                    }
                    // returnig to helpdesk service form //
                    HelpdeskServiceForm service_form = new HelpdeskServiceForm();
                    service_form.Show();
                    Visible = false;
                }
                else
                {
                    MessageBox.Show("Balansınızda kifayyət qədər məbləğ yoxdur");
                }
            }
            else
            {
                MessageBox.Show("Kartın məlumatları düzgün deyil");
            }
        }