public void AddAccount(Account acc) { if (acc.AccountNum == "" || inter.CheckIfExist(acc.AccountNum)) { throw new Exception("The Account Number Isn't Available"); } try { Convert.ToDouble(acc.Equity); } catch { throw new Exception("The Equity Isn't Available"); } inter.CreateAcc(acc); }
public void CreateAccount(Account acc) { try { AccountC inter = new AccountC(); acc.Balance = "0"; acc.Equity = "0"; acc.Debt = "0"; acc.SBalance = "0"; acc.Sequity = "0"; acc.Sdebt = "0"; inter.CreateAcc(acc); } catch (Exception e) { throw e; } }