private void btnCreditCreate_Click(object sender, EventArgs e)
 {
     if (_orderId != 0)
     {
         bool isAuth = _creditManager.Authorized(txtCreditName.Text, txtCreditSurname.Text, _orderId);
         if (isAuth)
         {
             Result result = _creditManager.Add(new Credit
             {
                 Amount     = decimal.Parse(txtCreditAmount.Text),
                 OrderId    = _orderId,
                 Cvc        = short.Parse(txtCVC.Text),
                 CardNumber = txtCardNumber.Text,
                 Name       = txtCreditName.Text,
                 Surname    = txtCreditSurname.Text
             });
             if (result.ResultState == ResultState.Erorr)
             {
                 MessageBox.Show(result.Message, "Hata işlem yapılamadı");
             }
             else
             {
                 DataGridCreditFill();
             }
         }
         else
         {
             MessageBox.Show("Kimlik doğrulama başarısız", "Hata işlem yapılamadı");
         }
     }
     else
     {
         MessageBox.Show("Order Id boş geçilemez", "Hata işlem yapılamadı");
     }
 }
Exemple #2
0
        public void LoadCredits()
        {
            Credit credit = new Credit();

            credit.sprite.texture  = Content.Load <Texture2D>("Credits_Screen");
            credit.sprite.position = new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2);
            credit.sprite.origin   = new Vector2(credit.sprite.texture.Width / 2, credit.sprite.texture.Height / 2);
            creditManager.Add(credit);
        }