private void FindDisplayRecords()
        {
            string findNrCont = tbText.Text;
            int    result     = 0;


            returnedRows = ds1.Tables["Conturi"].Select("Nr_cont='" + findNrCont + "'");

            result = returnedRows.Length;

            if (result > 0)
            {
                IntroduceDepunereRetragere.Close();

                DataRow dRow = returnedRows[0];

                txtId.Text         = dRow["Id"].ToString();
                txtNrCont.Text     = dRow["Nr_cont"].ToString();
                txtNume.Text       = dRow["Nume"].ToString();
                txtCompanie.Text   = dRow["Companie"].ToString();
                txtAdresa.Text     = dRow["Adresa"].ToString();
                txtMobil.Text      = dRow["Mobil"].ToString();
                txtSoldCurent.Text = dRow["Sold_curent"].ToString();
                SoldCurent         = float.Parse(dRow["Sold_curent"].ToString());

                MakeReadOnly(this.groupBox1);



                if (grpBoxDepunere.Visible)
                {
                    this.ActiveControl = txtValDepusa;
                    txtValDepusa.Focus();
                }
                else
                {
                    this.ActiveControl = txtValRetrasa;
                    txtValRetrasa.Focus();
                }
            }
            else
            {
                if (grpBoxDepunere.Visible)
                {
                    this.Close();
                    MessageBox.Show("Informatia nu a fost gasita!", "Mesaj", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    IntroduceDepunereRetragere.Text = "Introduce numarul contului pentru a depune";
                }
                else
                {
                    this.Close();
                    MessageBox.Show("Informatia nu a fost gasita!", "Mesaj", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    IntroduceDepunereRetragere.Text = "Introduce numarul contului pentru a depune";
                }
                IntroduceDepunereRetragere.Show();
                txtNrCont.Focus();
            }
        }
Exemplo n.º 2
0
 private void mnuIstoricTranzactii_Click(object sender, EventArgs e)
 {
     if (tNumeCont.IsDisposed || tNumeCont == null)
     {
         tNumeCont      = new NumeCont();
         tNumeCont.Text = "Introduce numarul contului pentru a vizualiza tranzactiile";
         tNumeCont.Show();
     }
     else
     {
         tNumeCont.Text = "Introduce numarul contului pentru a vizualiza tranzactiile";
         tNumeCont.Show();
     }
 }
Exemplo n.º 3
0
 private void mnuRetragere_Click(object sender, EventArgs e)
 {
     if (rNumeCont.IsDisposed || rNumeCont == null)
     {
         rNumeCont      = new NumeCont();
         rNumeCont.Text = "Introduce numarul contului pentru a retrage";
         rNumeCont.Show();
     }
     else
     {
         rNumeCont.Text = "Introduce numarul contului pentru a retrage";
         rNumeCont.Show();
     }
 }
Exemplo n.º 4
0
 private void mnuDepunere_Click(object sender, EventArgs e)
 {
     if (dNumeCont.IsDisposed || dNumeCont == null)
     {
         dNumeCont      = new NumeCont();
         dNumeCont.Text = "Introduce numarul contului pentru a depune";
         dNumeCont.Show();
     }
     else
     {
         dNumeCont.Text = "Introduce numarul contului pentru a depune";
         dNumeCont.Show();
     }
 }
Exemplo n.º 5
0
 private void AfiseazaInformatiiPersonaleToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (cNumeCont.IsDisposed || cNumeCont == null)
     {
         cNumeCont      = new NumeCont();
         cNumeCont.Text = "Introduce numarul contului pentru a vizualiza informatiile personale";
         cNumeCont.Show();
     }
     else
     {
         cNumeCont.Text = "Introduce numarul contului pentru a vizualiza informatiile personale";
         cNumeCont.Show();
     }
 }
        private void AfiseazaInformatii()
        {
            string findNrCont = tbText.Text;
            int    result     = 0;


            returnedRows = ds1.Tables["Conturi"].Select("Nr_cont='" + findNrCont + "'");

            result = returnedRows.Length;

            if (result > 0)
            {
                ContVizualizare.Close();

                DataRow dRow = returnedRows[0];

                txtId.Text         = dRow["Id"].ToString();
                txtNrCont.Text     = dRow["Nr_cont"].ToString();
                txtNume.Text       = dRow["Nume"].ToString();
                txtCompanie.Text   = dRow["Companie"].ToString();
                txtAdresa.Text     = dRow["Adresa"].ToString();
                txtMobil.Text      = dRow["Mobil"].ToString();
                txtSoldCurent.Text = dRow["Sold_curent"].ToString();
                txtStare.Text      = dRow["Stare"].ToString();

                this.ActiveControl = btnInchide;

                MakeReadOnly(this);
            }
            else
            {
                this.Close();

                MessageBox.Show("Informatia nu a fost gasita!");
                ContVizualizare.Text = "Introduce numarul contului pentru a vizualiza informatiile personale";
                ContVizualizare.Show();
                txtNrCont.Focus();
            }
        }
Exemplo n.º 7
0
        private void AfiseazaIstoric()
        {
            txtNrCont.Text = tbText.Text;
            returnedRows   = dt.Select("Nr_cont='" + tbText.Text + "'");
            int result = returnedRows.Length;

            if (result > 0)
            {
                DataTable dt1 = returnedRows.CopyToDataTable();
                IntroduceNrCont.Close();
                dataGridViewIstTr.DataSource = dt1;
                dataGridViewIstTr.ClearSelection();
                this.ActiveControl = btnInchide;
                MakeReadOnly(txtNrCont);
            }
            else
            {
                this.Close();
                MessageBox.Show("Informatia nu a fost gasita!", "Mesaj", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                IntroduceNrCont.Text = "Introduce numarul contului pentru a vizualiza tranzactiile";
                IntroduceNrCont.Show();
                txtNrCont.Focus();
            }
        }