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();
            }
        }
        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();
            }
        }
Пример #3
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();
            }
        }