public void Initializeaza(BUtilizator pUser) { base.InitializeazaVariabileleGenerale(); AllowModification(true); this.lUser = pUser; incepeIncarcarea(); initListe(); this.txtSerieActPersonal.TotulCuMajuscule = true; if (this.lUser == null) { this.txtNumePersonal.Focus(); this.txtNumePersonal.Goleste(); this.txtPrenumePersonal.Goleste(); this.txtSupranumePersonal.Goleste(); this.chkFemininPersonal.Checked = false; this.chkMasculinPersonal.Checked = false; this.txtNumeDeFataPersonal.Goleste(); this.txtNumeDeFataPersonal.Visible = false; this.lblNumeDeFataPersonal.Visible = false; this.txtCnpPersonal.Goleste(); this.txtSerieActPersonal.Goleste(); this.txtNrActPersonal.Goleste(); this.txtScoalaPersonal.Goleste(); this.ctrlProfesiePersonal.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); this.ctrlDataNasteriiPersonal.Goleste(); this.txtTelefonMobilPersonal.Goleste(); this.txtTelefonFixPersonal.Goleste(); this.txtFaxPersonal.Goleste(); this.txtEmailPersonal.Goleste(); this.txtContYMPersonal.Goleste(); this.txtPaginaWebPersonal.Goleste(); this.txtSkypePersonal.Goleste(); this.txtInfoContactPersonal.Goleste(); this.ctrlCuloarePersonal.Goleste(); this.ctrlDataAngajarePersonal.Goleste(); this.txtContStomaPersonal.Goleste(); this.txtParolaPersonal.Goleste(); this.txtObservatiiPersonal.Goleste(); this.txtNrOreNorma.Goleste(); this.ctrlDataContract.Goleste(); this.ctrlDataIncetareContract.Goleste(); this.txtNrContract.Goleste(); } else { this.txtNumePersonal.Text = lUser.Nume; this.cboTitulaturaPersonal.SelectedIndex = lUser.Titulatura; this.txtPrenumePersonal.Text = lUser.Prenume; this.txtSupranumePersonal.Text = lUser.Porecla; this.chkFemininPersonal.Checked = getSexPersonal(true); this.chkMasculinPersonal.Checked = getSexPersonal(false); seteazaVizibilitateNumeFata(getSexPersonal(true)); this.cboStareCivilaPersonal.SelectedIndex = lUser.StareCivila; this.cboNrCopiiPersonal.SelectedIndex = lUser.NumarCopii; this.txtCnpPersonal.Text = lUser.CNP; this.cboTipActPersonal.SelectedIndex = lUser.TipActIdentitate; this.txtSerieActPersonal.Text = lUser.SerieActIdentitate; this.txtNrActPersonal.Text = lUser.NumarActIdentitate; this.cboTipEducatiePersonal.SelectedIndex = lUser.Educatie; this.txtScoalaPersonal.Text = lUser.Scoala; if (this.lUser.IdProfesie != 0) { this.ctrlProfesiePersonal.Initializeaza(new StructIdDenumire(this.lUser.IdProfesie, BProfesii.getProfesie(this.lUser.IdProfesie, null).Denumire), CEnumerariComune.EnumTipDeschidere.DreaptaJos); } this.ctrlDataNasteriiPersonal.DataAfisata = lUser.DataNastere; //this.ctrlImaginePersonal.IdPoza = lUser.IdImagineCurenta; this.txtTelefonMobilPersonal.Text = lUser.TelefonMobil; this.txtTelefonFixPersonal.Text = lUser.TelefonFix; this.txtFaxPersonal.Text = lUser.Fax; this.txtEmailPersonal.Text = lUser.AdresaMail; this.txtContYMPersonal.Text = lUser.ContYM; this.txtPaginaWebPersonal.Text = lUser.PaginaWeb; this.txtSkypePersonal.Text = lUser.ContSkype; this.txtInfoContactPersonal.Text = lUser.InfoContact; this.ctrlCuloarePersonal.Initializeaza(lUser.Culoare); this.cboRolPersonal.SelectedIndex = lUser.Rol; this.ctrlDataAngajarePersonal.DataAfisata = lUser.DataAngajare; this.txtContStomaPersonal.Text = lUser.ContStoma; this.txtParolaPersonal.Text = lUser.ParolaStoma; this.txtObservatiiPersonal.Text = lUser.Observatii; this.cboTipContract.SelectedIndex = lUser.TipContract; this.txtNrOreNorma.Text = lUser.OreNorma.ToString(); this.ctrlDataContract.DataAfisata = lUser.DataContract; this.ctrlDataIncetareContract.DataAfisata = lUser.DataIncetareContract; this.txtNrContract.Text = lUser.NumarContract; } finalizeazaIncarcarea(); }
public void Initializeaza(BClientiReprezentanti pReprezentant, BClienti pClient) { base.InitializeazaVariabileleGenerale(); incepeIncarcarea(); this.lReprezentant = pReprezentant; this.lClient = pClient; this.txtNumeReprezentant.CapitalizeazaPrimaLitera = true; this.txtPrenumeReprezentant.CapitalizeazaPrimaLitera = true; initListe(); this.txtNumeReprezentant.Focus(); if (this.lReprezentant == null) { this.txtNumeReprezentant.Goleste(); this.txtPrenumeReprezentant.Goleste(); this.txtSupranumeReprezentant.Goleste(); this.txtNumeDeFataReprezentant.Goleste(); this.chkFemininReprezentant.Checked = false; this.chkMasculinReprezentant.Checked = false; this.txtScoalaReprezentant.Goleste(); this.ctrlDataNasteriiReprezentant.Goleste(); this.ctrlProfesie.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); this.ctrlTara.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); //this.ctrlLocalitate.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); //this.cboNationalitateReprezentant.DataSource= // this.cboJudetReprezentant.DataSource= this.txtCnpReprezentant.Goleste(); this.txtTelefonMobilReprezentant.Goleste(); this.txtTelefonFixReprezentant.Goleste(); this.txtFaxReprezentant.Goleste(); this.txtEmailReprezentant.Goleste(); this.txtContYMReprezentant.Goleste(); this.txtSkypeReprezentant.Goleste(); this.txtObservatiiReprezentant.Goleste(); } else { this.cboTitulaturaReprezentant.SelectedIndex = lReprezentant.Titulatura; this.txtNumeReprezentant.Text = lReprezentant.Nume; this.txtPrenumeReprezentant.Text = lReprezentant.Prenume; this.txtSupranumeReprezentant.Text = lReprezentant.Porecla; this.txtNumeDeFataReprezentant.Text = lReprezentant.NumeDeFata; this.chkFemininReprezentant.Checked = getSexPersonal(true); this.chkMasculinReprezentant.Checked = getSexPersonal(false); seteazaVizibilitateNumeFata(getSexPersonal(true)); this.cboStareCivilaReprezentant.SelectedIndex = lReprezentant.StareCivila; this.cboNrCopiiReprezentant.SelectedIndex = lReprezentant.NumarCopii; this.txtScoalaReprezentant.Text = lReprezentant.Scoala; if (this.lReprezentant.IdProfesie != 0) { this.ctrlProfesie.Initializeaza(new StructIdDenumire(this.lReprezentant.IdProfesie, BProfesii.getProfesie(this.lReprezentant.IdProfesie, null).Denumire), CEnumerariComune.EnumTipDeschidere.DreaptaJos); } else { this.ctrlProfesie.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); } this.ctrlDataNasteriiReprezentant.DataAfisata = lReprezentant.DataNastere; if (this.lReprezentant.IdTaraNastere != 0) { this.ctrlTara.Initializeaza(new StructIdDenumire(this.lReprezentant.IdTaraNastere, BTari.getTara(this.lReprezentant.IdTaraNastere, null).NumeScurt), CEnumerariComune.EnumTipDeschidere.DreaptaJos); } else { this.ctrlTara.Initializeaza(StructIdDenumire.Empty, CEnumerariComune.EnumTipDeschidere.DreaptaJos); } //this.cboNationalitateReprezentant.DataSource= // this.cboJudetReprezentant.DataSource= //this.cboLocalitateReprezentant.DataSource= this.txtCnpReprezentant.Text = lReprezentant.CNP; this.cboRolReprezentant.SelectedIndex = this.lReprezentant.Rol; this.txtTelefonMobilReprezentant.Text = lReprezentant.TelefonMobil; this.txtTelefonFixReprezentant.Text = lReprezentant.TelefonFix; this.txtFaxReprezentant.Text = lReprezentant.Fax; this.txtEmailReprezentant.Text = lReprezentant.AdresaMail; this.txtContYMReprezentant.Text = lReprezentant.ContYM; this.txtSkypeReprezentant.Text = lReprezentant.ContSkype; this.txtObservatiiReprezentant.Text = lReprezentant.Observatii; } finalizeazaIncarcarea(); }