/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmClients(ConstructorData constructorData) { InitializeComponent(); this.constructorData.Client = constructorData.BankAccount.Client; this.constructorData.BankAccount = constructorData.BankAccount; txtClientNumber.Text = this.constructorData.Client.ClientNumber.ToString(); txtClientNumber_Leave(txtClientNumber, null); }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmTransaction(ConstructorData constructorData) { InitializeComponent(); this.constructorData = constructorData; clientNumberMaskedLabel.Text = this.constructorData.BankAccount.Client.ClientNumber.ToString(); accountNumberMaskedLabel.Text = this.constructorData.BankAccount.AccountNumber.ToString(); fullNameLabel1.Text = this.constructorData.BankAccount.Client.FullName; balanceLabel1.Text = this.constructorData.BankAccount.Balance.ToString("C"); }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmHistory(ConstructorData constructorData) { InitializeComponent(); this.constructorData = constructorData; clientNumberMaskedLabel.Text = this.constructorData.client.ClientNumber.ToString(); lblFullName.Text = this.constructorData.client.FullName; accountNumberMaskedLabel.Text = this.constructorData.bankAccount.AccountNumber.ToString(); lblBalance.Text = this.constructorData.bankAccount.Balance.ToString("C"); }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmTransaction(ConstructorData constructorData) { InitializeComponent(); this.constructorData = constructorData; //this.constructorData = new ConstructorData(); //this.constructorData.client = constructorData.client; //this.constructorData.bankAccount = constructorData.bankAccount; clientNumberMaskedLabel.Text = this.constructorData.client.ClientNumber.ToString(); clientBindingSource.DataSource = constructorData.client; //BankAccount bankAccount = db.BankAccounts.Where(x => x.ClientId == constructorData.client.ClientId).FirstOrDefault(); bankAccountBindingSource.DataSource = constructorData.bankAccount; }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmHistory(ConstructorData constructorData) { InitializeComponent(); this.constructorData = constructorData; /* * Populate the controls in the Client Data groupbox */ clientNumberMaskedLabel.Text = this.constructorData.BankAccount.Client.ClientNumber.ToString(); accountNumberMaskedLabel.Text = this.constructorData.BankAccount.AccountNumber.ToString(); fullNameLabel1.Text = this.constructorData.BankAccount.Client.FullName; balanceLabel1.Text = this.constructorData.BankAccount.Balance.ToString("C"); }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmHistory(ConstructorData constructorData) { InitializeComponent(); this.constructorData = constructorData; //Populating the corresponding data in the client number label lblClientNumber.Text = constructorData.client.ClientNumber.ToString(); //Populating the corresponding data in the fullname label lblFullName.Text = constructorData.client.FullName.ToString(); //Populating the corresponding data in the account number label lblAccountNumber.Text = constructorData.bankAccount.AccountNumber.ToString(); //Populating the corresponding data in the balance label lblBalance.Text = constructorData.bankAccount.Balance.ToString("c"); }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmClients(ConstructorData constructorData) { InitializeComponent(); //Populating the corresponding data in the client number text box txtClientNumber.Text = constructorData.client.ClientNumber.ToString(); //Triggering the MaskedTextBox_Leave event txtClientNumber_Leave(this, EventArgs.Empty); //Checks if bank account is not null if (constructorData.bankAccount != null) { //Populating the corresponding data in the account number combo box cboAccountNumber.Text = constructorData.bankAccount.AccountNumber.ToString(); } }
/// <summary> /// given: This constructor will be used when returning to frmClient /// from another form. This constructor will pass back /// specific information about the client and bank account /// based on activites taking place in another form /// </summary> /// <param name="client">specific client instance</param> /// <param name="account">specific bank account instance</param> public frmClients(ConstructorData constructorData) { InitializeComponent(); //further code to be added //this.constructorData.client = constructorData.client; //this.constructorData.bankAccount = constructorData.bankAccount; //clientNumberMaskedTextBox.Text = this.constructorData.client.ClientNumber.ToString(); //clientNumberMaskedTextBox_Leave(null, EventArgs.Empty); //clientBindingSource.DataSource = constructorData.client; //bankAccountBindingSource.DataSource = constructorData.bankAccount; clientNumberMaskedTextBox.Text = constructorData.client.ClientNumber.ToString(); clientNumberMaskedTextBox_Leave(null, null); if (constructorData.bankAccount != null) { cbAcctNumber.Text = constructorData.bankAccount.AccountNumber.ToString(); } }