Exemplo n.º 1
0
        public void Initializeaza(BUtilizator pUtilizator)
        {
            base.InitializeazaVariabileleGenerale();

            incepeIncarcarea();

            this.lUtilizator = pUtilizator;

            initListe();

            this.cboTitulatura.SelectedItem = this.lUtilizator.Titulatura;
            this.txtNume.Text    = this.lUtilizator.Nume;
            this.txtPrenume.Text = this.lUtilizator.Prenume;
            this.ctrlSex.Initializeaza(this.lUtilizator.Sex);
            this.ctrlDataNasterii.DataAfisata = this.lUtilizator.DataNastere;
            this.txtCnp.Text    = this.lUtilizator.CNP;
            this.rbBI.Checked   = this.lUtilizator.TipActIdentitate == 1;
            this.rbCI.Checked   = this.lUtilizator.TipActIdentitate == 1;
            this.txtSerie.Text  = this.lUtilizator.SerieActIdentitate;
            this.txtNr.Text     = this.lUtilizator.NumarActIdentitate;
            this.txtEmisDe.Text = this.lUtilizator.EmisDe;
            this.ctrlValabilitateInceput.DataAfisata = this.lUtilizator.ValabilitateInceput;
            this.ctrlValabilitateSfarsit.DataAfisata = this.lUtilizator.ValabilitateSfarsit;
            this.txtTelefonMobil.Text                 = this.lUtilizator.TelefonMobil;
            this.txtEmail.Text                        = this.lUtilizator.AdresaMail;
            this.cboRol.SelectedItem                  = this.lUtilizator.Rol;
            this.txtContStoma.Text                    = this.lUtilizator.ContStoma;
            this.txtContStoma.ReadOnly                = this.lUtilizator.EsteADMIN();
            this.txtObservatii.Text                   = this.lUtilizator.Observatii;
            this.cboTipContract.SelectedItem          = this.lUtilizator.TipContract;
            this.txtNrContract.Text                   = this.lUtilizator.NumarContract.ToString();
            this.ctrlDataContract.DataAfisata         = this.lUtilizator.DataContract;
            this.ctrlDataAngajare.DataAfisata         = this.lUtilizator.DataAngajare;
            this.ctrlDataIncetareContract.DataAfisata = this.lUtilizator.DataIncetareContract;
            this.txtOreNorma.Text                     = this.lUtilizator.OreNorma.ToString();
            this.txtZileConcediu.Text                 = this.lUtilizator.NumarZileCOAgreate.ToString();
            this.txtIban.Text = this.lUtilizator.Iban;

            if (this.lUtilizator.IdAdresa == 0)
            {
                this.ctrlAdresa.Initializeaza(null, EnumTipObiect.Utilizator, this.lUtilizator.Id, BAdrese.EnumTipAdresa.Principala);
            }
            else
            {
                this.ctrlAdresa.Initializeaza(BAdrese.getAdresa(this.lUtilizator.IdAdresa, null), EnumTipObiect.Utilizator, this.lUtilizator.Id, BAdrese.EnumTipAdresa.Principala);
            }

            if (this.lUtilizator.IdBanca == 0)
            {
                this.ctrlCautareBanca.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos);
            }
            else
            {
                this.ctrlCautareBanca.Initializeaza(new StructIdDenumire(this.lUtilizator.IdBanca, BBanci.getBanca(this.lUtilizator.IdBanca, null).Denumire), CEnumerariComune.EnumTipDeschidere.DreaptaJos);
            }

            initDosarPozaPersonal();

            finalizeazaIncarcarea();
        }
        public void Initializeaza(BClienti pClient)
        {
            base.InitializeazaVariabileleGenerale();

            incepeIncarcarea();

            this.lClient = pClient;

            initListe();

            this.txtDenumireFiscala.Text    = this.lClient.DenumireFiscala;
            this.cboTipClient.SelectedIndex = this.lClient.TipClient;
            this.txtCUI.Text      = this.lClient.CUI;
            this.txtNrRegCom.Text = this.lClient.RegCom;
            this.txtIBAN.Text     = this.lClient.Iban;
            if (this.lClient.IdBanca != 0)
            {
                this.ctrlCautareBanca.Initializeaza(new StructIdDenumire(this.lClient.IdBanca, BBanci.getBanca(this.lClient.IdBanca, null).Denumire), CEnumerariComune.EnumTipDeschidere.DreaptaJos);
            }
            else
            {
                this.ctrlCautareBanca.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos);
            }
            this.txtReprezentantLegal.Text        = this.lClient.ReprezentantLegal;
            this.cboTipReprezentant.SelectedIndex = this.lClient.CalitateReprezentant;
            if (this.lClient.NumarContract != 0)
            {
                this.txtNrContract.Text = this.lClient.NumarContract.ToString();
            }
            else
            {
                this.txtNrContract.Goleste();
            }
            this.ctrlDataContract.DataAfisata = this.lClient.DataContract;
            this.txtObservatiiDateFirma.Text  = this.lClient.ObservatiiDateFirma;

            ConstruiesteColoaneDGV();
            ConstruiesteRanduriDGV();

            ConstruiesteColoaneDGVIncasari();
            ConstruiesteRanduriDGVIncasari();

            finalizeazaIncarcarea();
        }