Beispiel #1
0
        private void btnTypeSave_Click(object sender, EventArgs e)
        {
            currentPay             = new PaymentType();
            currentPay.Description = txtPayType.Text;
            PayType = _paymentTypeController.GetPaymentTypes();

            foreach (PaymentType item in PayType)
            {
                if (txtPayType.Text == item.Description)
                {
                    throw new PaymentTypeException();
                }
            }
            try
            {
                bool result = _paymentTypeController.Add(currentPay);

                if (result)
                {
                    MessageBox.Show("Ödeme tip ekleme başarılı");
                    FillList();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 public static String[] Insert(String type)
 {
     String[] message = payment.Add(type);
     return(message);
 }