/// <summary> /// constructor /// datagridview filled with datasource from logic /// </summary> /// <param name="logic"></param> public frmAccounts(BSLogic logic) { InitializeComponent(); _logic = logic; dGVAccounts.DataSource = _logic.GetDSforAccounts(); dGVAccounts.DataMember = "AccountsWithNames"; }
/// <summary> /// Used when adding new account. /// </summary> public frmAccount(BSLogic logic) { _logic = logic; InitializeComponent(); label1ibangen.Text = _logic.GenerateIBAN(); _isUpdate = false; }
/// <summary> /// contructior for updating /// </summary> /// <param name="logic"></param> /// <param name="clientIdCard"></param> public frmAccount(BSLogic logic, string clientIdCard) { _logic = logic; InitializeComponent(); _clientIdCard = clientIdCard; ReadyForUpdate(); _isUpdate = true; }
/// <summary> /// Used when viewing/updating existing client. /// </summary> /// <param name="clientIdCard"></param> public frmClientManagement(string clientIdCard, BSLogic logic) { _logic = logic; _clientIdCard = clientIdCard; InitializeComponent(); FillCreditCardGridView(); FillOverview(); }
/// <summary> /// construcotr /// label text is generated if is new or is copyied if id old /// </summary> /// <param name="logic"></param> /// <param name="clientCardID"></param> /// <param name="isNew"></param> public frmNewCreditcard(BSLogic logic, string clientCardID, bool isNew) { _isNew = isNew; InitializeComponent(); _logic = logic; _clientCardID = clientCardID; if (isNew) { labelCardGenerated.Text = _logic.GenerateCardNumber(); } else { labelCardGenerated.Text = clientCardID; } }
/// <summary> /// this construcotr is called when we want to see all transactions done by User /// also hiding and editing unnecessary data /// </summary> /// <param name="logic"></param> /// <param name="clientIdCard"></param> public frmTransactions(BSLogic logic, string clientIdCard) { InitializeComponent(); _logic = logic; dGVTransactions.DataSource = _logic.GetTransactionsByIdCard(clientIdCard); dGVTransactions.Columns[0].Visible = false; dGVTransactions.Columns[1].Visible = false; foreach (DataGridViewRow Item in dGVTransactions.Rows) { Item.Cells[2].Value = (Item.Cells[1].Value.Equals(Item.Cells[2].Value)) ? "Bank Transaction" : _logic.GetIbanbyAccountID(Convert.ToInt32(Item.Cells[2].Value)); } }
/// <summary> /// constructor /// </summary> /// <param name="logic"></param> /// <param name="clientIdCard"></param> public frmTransaction(BSLogic logic, string clientIdCard) { InitializeComponent(); _logic = logic; _clientIdCard = clientIdCard; }