private void cmdManageAccount_Click(object sender, EventArgs e) { using (frmClientManagement newForm = new frmClientManagement(dgwAll.CurrentRow.Cells[1].Value.ToString())) { newForm.ShowDialog(); } }
private void cmdManageAccount_Click(object sender, EventArgs e) { using (frmClientManagement newForm = new frmClientManagement(Convert.ToInt32(gwClients.SelectedRows[0].Cells[0].Value))) { newForm.ShowDialog(); } }
private void btnRegister_Click(object sender, EventArgs e) { int ruturnedID = 0; StringBuilder sb = new StringBuilder(); sb.Append($"{txtEmail1.Text.ToString()}@{txtEmail2.Text.ToString()}"); ruturnedID = _vmb.RegisterCustomers(txtTitle.Text.ToString(), txtFName.Text.ToString(), txtMName.Text.ToString(), txtLName.Text.ToString(), txtSuffix.Text.ToString(), DateTime.Parse(dtpBirthDate.Text.ToString()), txtIDCardPers.Text.ToString(), txtAddress.Text.ToString(), txtPostcode.Text.ToString(), int.Parse(txtCityID.Text), txtCountry.Text.ToString(), txtPhone.Text.ToString(), sb.ToString()); // TODO natlacit tam ID customera _vmb.RegisterAccount(ruturnedID, txtAccName.Text.ToString(), int.Parse(txtOverdraft.Text)); using (frmClientManagement newForm = new frmClientManagement(ruturnedID)) { newForm.ShowDialog(); } }
/// <summary> /// jumps into client manager form /// with the selected index /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdManageAccount_Click(object sender, EventArgs e) { frmClientManagement manager = new frmClientManagement(_logic.GetIdCardByIban (dGVAccounts.SelectedRows[0].Cells[0].Value.ToString()), _logic); manager.ShowDialog(); }
private void cmdFindClient_Click(object sender, EventArgs e) { lblInfoText.Visible = false; string text = txtFindClient.Text; int clientId = _clientRepository.FindClientIdByText(text); if (clientId > 0) { using (frmClientManagement newForm = new frmClientManagement(clientId)) { newForm.ShowDialog(); } } else if (clientId == 0) { lblInfoText.Text = "Klient nebol nájdený v databáze"; lblInfoText.Visible = true; } else if (clientId == -1) { lblInfoText.Text = MainRepository.NO_DB_CONNECTION; lblInfoText.Visible = true; } else { lblInfoText.Text = MainRepository.UNKNOWN_ERROR; lblInfoText.Visible = true; } txtFindClient.Text = ""; }
private void cmdManageAccount_Click(object sender, EventArgs e) { using (frmClientManagement newForm = new frmClientManagement(_accountsViewModel.IdNumber)) { newForm.ShowDialog(); } }
private void cmdManageAccount_Click(object sender, EventArgs e) { using (frmClientManagement newForm = new frmClientManagement(indexA)) { newForm.ShowDialog(); } }
private void cmdFindClient_Click(object sender, EventArgs e) { _logic.FilterTxt = txtFilter.Text; using (frmClientManagement newForm = new frmClientManagement(_logic)) { newForm.ShowDialog(); } }
/// <summary> /// find client button, if no client is sleected nothing will happend /// otherwise we weill be send to a client manager /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdFindClient_Click(object sender, EventArgs e) { if (!comboBox1.SelectedIndex.Equals(-1)) { using (frmClientManagement newForm = new frmClientManagement(comboBox1.Text.Split(' ')[0], _logic)) { newForm.ShowDialog(); } } }
private void cmdManageAccount_Click(object sender, EventArgs e) { int selectedId = (int)dtGrdAccounts.SelectedCells[6].Value; using (frmClientManagement newForm = new frmClientManagement(selectedId)) { newForm.ShowDialog(); } DialogResult = DialogResult.OK; }
private void cmdManageAccount_Click(object sender, EventArgs e) { if (dGVAccounts.CurrentRow != null) { int index = dGVAccounts.CurrentRow.Index; int accountId = _frmAccountsViewModel.GetAccountId(index); using (frmClientManagement newForm = new frmClientManagement(new FrmClientManagementViewModel(), accountId)) { newForm.ShowDialog(); } } }
/// <summary> /// Opens new frmClientManagment with filtered Client/Account /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdFindClient_Click(object sender, EventArgs e) { if (!int.TryParse(txtBxMainFindClient.Text, out int result)) { MessageBox.Show("Put number ID"); } else { using (frmClientManagement newForm = new frmClientManagement(result)) { newForm.ShowDialog(); } } }
private void cmdFindClient_Click(object sender, EventArgs e) { if (mainViewModel.CheckClient(txbIdNumber.Text)) { using (frmClientManagement newForm = new frmClientManagement(mainViewModel.GetID(txbIdNumber.Text))) { newForm.ShowDialog(); } } else { cmdFindClient.BackColor = Color.Red; } }
private void cmdFindClient_Click(object sender, EventArgs e) { var findedAccounts = _frmMainViewModel.FindClients(txtFilter.Text); if (findedAccounts.Count == 1) { using (frmClientManagement newForm = new frmClientManagement(new FrmClientManagementViewModel(), findedAccounts[0].Id)) { newForm.ShowDialog(); } } else { MessageBox.Show("There is no such client/account, or there was found more than one account"); } }
private void cmdFindClient_Click(object sender, EventArgs e) { if (MainViewModel.FindClient(txtFindClient.Text)) { lblError.Visible = false; using (frmClientManagement newForm = new frmClientManagement(txtFindClient.Text)) { newForm.ShowDialog(); } } else { lblError.Text = "Ty kokot taky tam neni"; lblError.Visible = true; } }
private void cmdManageAccount_Click(object sender, EventArgs e) { string clientIdentityCard = (searchedClientsDtGrdVw.SelectedCells[1].Value).ToString(); int identity = _bankManager.ClientId(clientIdentityCard); if (identity != 0 && identity != BankManager.BANK_IDENTIY) { using (frmClientManagement newForm = new frmClientManagement(_bankManager.ClientId(clientIdentityCard))) { newForm.ShowDialog(); Close(); } } else { MessageBox.Show("There are no clients with searched Identity Card number"); } }
private void cmdFindClient_Click(object sender, EventArgs e) { int identity = _bankManager.ClientId(txtBxSearchIdentity.Text); if (identity != 0 && identity != BankManager.BANK_IDENTIY) { using (frmClientManagement newForm = new frmClientManagement(_bankManager.ClientId(txtBxSearchIdentity.Text))) { if (newForm.ShowDialog() == DialogResult.No) { RefreshData(); } } } else { MessageBox.Show("There are no clients with searched Identity Card number"); } }