private void btnGenerator_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(tbInput.Text)) { return; } if (ValidationCheck(tbInput)) { if (String.IsNullOrEmpty(tbGenerator.Text)) { tbGenerator.Text = tbInput.Text; } tbGenerator.Text = BankOperation.GenerateNextCreditCardNumber(tbGenerator.Text); ValidationCheck(tbGenerator); } else { MessageBox.Show("Новий номер можна згенерувати тільки на основі існуючого валідного."); } } catch { } }
public void makeDeposit(BankProduct destination, float value) { BankOperation bankOperation = new BankOperation(); bankOperation.value = value; // bankOperation.desitnation = destination; // bankOperation.commit(); }
static void Main(string[] args) { try { DbConnectivity connect = new DbConnectivity(); connect.connection(); } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("1.Add Account\n2.View Account Details\n3.Withdrawl Amount\n4.Deposite Amount\nEnter the choice:"); int ch = int.Parse(Console.ReadLine()); switch (ch) { case 1: BankOperation add = new BankOperation(); add.AddAcount(); break; case 2: BankOperation details = new BankOperation(); details.AccountDetails(); break; case 3: BankOperation withdraw = new BankOperation(); withdraw.Withdraw(); break; case 4: BankOperation deposite = new BankOperation(); deposite.Deposite(); break; default: Console.WriteLine("Wrong Choice:"); break; } }
private bool ValidationCheck(TextBox tb) { lblIsCreditCardNumberValid.Text = BankOperation.IsCreditCardNumberValid(tb.Text).ToString(); // for test lblGetCreditCardVendor.Text = BankOperation.GetCreditCardVendor(tb.Text); // for test if (BankOperation.IsCreditCardNumberValid(tb.Text)) { lblVendor.Text = BankOperation.GetCreditCardVendor(tb.Text); if (lblVendor.Text != "Unknown") { lblValid.Text = "Номер валідний"; object check = Properties.Resources.ResourceManager.GetObject("true"); pbCheck.Image = (Image)check; ChosePicture(); return(true); } else { lblValid.Text = "Номер не валідний"; object check = Properties.Resources.ResourceManager.GetObject("false"); pbCheck.Image = (Image)check; ChosePicture(); return(false); } } else { lblVendor.Text = "Unknown"; lblValid.Text = "Номер не валідний"; object logo = Properties.Resources.ResourceManager.GetObject("kottans"); pbVendor.Image = (Image)logo; object check = Properties.Resources.ResourceManager.GetObject("false"); pbCheck.Image = (Image)check; return(false); } }
public void addOperation(BankOperation bankOperation) { this.history.Add(bankOperation); }
public void addBankOperation(BankOperation bankOperation) { this.allBankOperations.Add(bankOperation); }