Exemplo n.º 1
0
        internal bool Salveaza()
        {
            bool esteValid = BUtilizator.SuntInformatiileNecesareCoerente(this.txtNumePersonal.Text, getRol());

            if (this.lUser == null)
            {
                if (esteValid)
                {
                    BUtilizator.Add(this.txtNumePersonal.Text, this.txtPrenumePersonal.Text, this.txtCnpPersonal.Text, this.ctrlDataNasteriiPersonal.DataAfisata, getSexSelectat(), getTitulatura(), this.txtNumeDeFataPersonal.Text, this.txtSupranumePersonal.Text, getStareCivila(), this.cboNrCopiiPersonal.SelectedIndex, this.cboTipEducatiePersonal.SelectedIndex, this.txtScoalaPersonal.Text, 0, 0, 0, 0, getRol(), this.ctrlProfesiePersonal.IdObiectAfisajCorespunzator, this.txtObservatiiPersonal.Text, this.txtTelefonFixPersonal.Text, this.txtTelefonMobilPersonal.Text, string.Empty, this.txtSkypePersonal.Text, string.Empty, this.txtEmailPersonal.Text, string.Empty, string.Empty, 0, this.txtContStomaPersonal.Text, string.Empty, this.ctrlCuloarePersonal.CuloareARGB, this.cboTipActPersonal.SelectedIndex, this.txtSerieActPersonal.Text, this.txtNrActPersonal.Text, 0, 0, this.ctrlDataAngajarePersonal.DataAfisata, this.cboTipContract.SelectedIndex, this.ctrlDataContract.DataAfisata, this.ctrlDataIncetareContract.DataAfisata, CUtil.GetTextInt32(this.txtNrOreNorma.Text), CUtil.GetTextInt32(this.txtNrContract.Text), null, DateTime.Today, DateTime.Today, null, 0, 0, null);
                }
                else
                {
                    seteazaAlerta();
                }
            }
            else
            {
                lUser.Nume                 = this.txtNumePersonal.Text;
                lUser.Titulatura           = getTitulatura();// this.cboTitulaturaPersonal.SelectedIndex;
                lUser.Prenume              = this.txtPrenumePersonal.Text;
                lUser.Porecla              = this.txtSupranumePersonal.Text;
                lUser.Sex                  = getSexSelectat();
                lUser.NumeDeFata           = this.txtNumeDeFataPersonal.Text;
                lUser.StareCivila          = getStareCivila();
                lUser.Educatie             = (EnumNivelScolorizare)this.cboTipEducatiePersonal.GetSelectedValueAsInt32();
                lUser.NumarCopii           = this.cboNrCopiiPersonal.SelectedIndex;
                lUser.CNP                  = this.txtCnpPersonal.Text;
                lUser.TipActIdentitate     = this.cboTipActPersonal.SelectedIndex;
                lUser.SerieActIdentitate   = this.txtSerieActPersonal.Text;
                lUser.NumarActIdentitate   = this.txtNrActPersonal.Text;
                lUser.Scoala               = this.txtScoalaPersonal.Text;
                lUser.IdProfesie           = this.ctrlProfesiePersonal.IdObiectAfisajCorespunzator;
                lUser.DataNastere          = this.ctrlDataNasteriiPersonal.DataAfisata;
                lUser.TelefonMobil         = this.txtTelefonMobilPersonal.Text;
                lUser.TelefonFix           = this.txtTelefonFixPersonal.Text;
                lUser.AdresaMail           = this.txtEmailPersonal.Text;
                lUser.ContSkype            = this.txtSkypePersonal.Text;
                lUser.Culoare              = this.ctrlCuloarePersonal.CuloareARGB;
                lUser.DataAngajare         = this.ctrlDataAngajarePersonal.DataAfisata;
                lUser.ContStoma            = this.txtContStomaPersonal.Text;
                lUser.Observatii           = this.txtObservatiiPersonal.Text;
                lUser.Rol                  = getRol(); //this.cboRolPersonal.GetAs<BDefinitiiGenerale.StructRol>(BDefinitiiGenerale.StructRol.Empty).Id;
                lUser.TipContract          = (BDefinitiiGenerale.EnumTipContract) this.cboTipContract.GetSelectedValueAsInt32();
                lUser.DataContract         = this.ctrlDataContract.DataAfisata;
                lUser.DataIncetareContract = this.ctrlDataIncetareContract.DataAfisata;
                lUser.OreNorma             = CUtil.GetTextInt32(this.txtNrOreNorma.Text);
                lUser.NumarContract        = CUtil.GetTextInt32(this.txtNrContract.Text);
                if (esteValid)
                {
                    this.lUser.UpdateAll();
                }
                else
                {
                    seteazaAlerta();
                }
            }
            return(esteValid);
        }
Exemplo n.º 2
0
        internal bool Salveaza()
        {
            bool esteValid = BUtilizator.SuntInformatiileNecesareCoerente(this.txtNume.Text, getRol());

            if (esteValid)
            {
                string         eroare          = string.Empty;
                EnumSex        sex             = EnumSex.Nedefinit;
                DateTime       dataNasterii    = CConstante.DataNula;
                int            codJudet        = 0;
                int            codLocalitate   = 0;
                EnumTitulatura titulatura      = EnumTitulatura.Nedefinit;
                bool           nascutInRomania = false;
                CCL.iStomaLab.CUtil.ObtineInformatiiCNP(this.txtCnp.Text, ref eroare, ref sex, ref dataNasterii, ref codJudet, ref codLocalitate, ref titulatura, ref nascutInRomania);

                int id = BUtilizator.Add(this.txtNume.Text, this.txtPrenume.Text, this.txtCnp.Text, dataNasterii, sex, titulatura, string.Empty, string.Empty, 0, 0, 0, string.Empty, 0, 0, codJudet, codLocalitate, getRol(), 0, this.txtObservatii.Text, string.Empty, this.txtMobil.Text, string.Empty, string.Empty, string.Empty, this.txtEmail.Text, string.Empty, string.Empty, 0, this.txtContUtilizator.Text, this.txtParola.Text, getCuloareInitiala(), getTipAct(), this.txtSerie.Text, this.txtNr.Text, 0, CUtil.GetAsInt32(this.txtZileConcediu.Text), this.ctrlDataContract.DataAfisata, this.cboTipContract.SelectedIndex, this.ctrlDataContract.DataAfisata, CConstante.DataNula, CUtil.GetAsInt32(this.txtOreNorma.Text), CUtil.GetAsInt32(this.txtNrContract.Text), this.txtEmisDe.Text, this.ctrlValabilitateInceput.DataAfisata, this.ctrlValabilitateSfarsit.DataAfisata, this.txtIban.Text, this.ctrlCautareBanca.IdObiectAfisajCorespunzator,
                                         0, null);

                BUtilizator utilizator = BUtilizator.GetById(id, null);
                utilizator.IdAdresa = getIdAdresa(utilizator.Id);
                utilizator.UpdateAll();
            }
            return(esteValid);
        }
Exemplo n.º 3
0
        internal bool Salveaza()
        {
            bool esteValid = BUtilizator.SuntInformatiileNecesareCoerente(this.txtNumePersonal.Text, this.txtPrenumePersonal.Text, this.cboRolPersonal.SelectedIndex);

            if (this.lUser == null)
            {
                if (esteValid)
                {
                    BUtilizator.Add(this.txtNumePersonal.Text, this.txtPrenumePersonal.Text, this.txtCnpPersonal.Text, this.ctrlDataNasteriiPersonal.DataAfisata, getSexSelectat(), this.cboTitulaturaPersonal.SelectedIndex, this.txtNumeDeFataPersonal.Text, this.txtSupranumePersonal.Text, this.cboStareCivilaPersonal.SelectedIndex, this.cboNrCopiiPersonal.SelectedIndex, this.cboTipEducatiePersonal.SelectedIndex, this.txtScoalaPersonal.Text, 0, 0, 0, 0, this.cboRolPersonal.SelectedIndex, this.ctrlProfesiePersonal.IdObiectAfisajCorespunzator, this.txtObservatiiPersonal.Text, this.txtTelefonFixPersonal.Text, this.txtTelefonMobilPersonal.Text, this.txtFaxPersonal.Text, this.txtSkypePersonal.Text, this.txtContYMPersonal.Text, this.txtEmailPersonal.Text, this.txtPaginaWebPersonal.Text, this.txtInfoContactPersonal.Text, 0, this.txtContStomaPersonal.Text, this.txtParolaPersonal.Text, this.ctrlCuloarePersonal.CuloareARGB, this.cboTipActPersonal.SelectedIndex, this.txtSerieActPersonal.Text, this.txtNrActPersonal.Text, 0, 0, this.ctrlDataAngajarePersonal.DataAfisata, this.cboTipContract.SelectedIndex, this.ctrlDataContract.DataAfisata, this.ctrlDataIncetareContract.DataAfisata, CUtil.GetTextInt32(this.txtNrOreNorma.Text), this.txtNrContract.Text, null);
                }
                else
                {
                    seteazaAlerta();
                }
            }
            else
            {
                lUser.Nume               = this.txtNumePersonal.Text;
                lUser.Titulatura         = this.cboTitulaturaPersonal.SelectedIndex;
                lUser.Prenume            = this.txtPrenumePersonal.Text;
                lUser.Porecla            = this.txtSupranumePersonal.Text;
                lUser.Sex                = getSexSelectat();
                lUser.NumeDeFata         = this.txtNumeDeFataPersonal.Text;
                lUser.StareCivila        = this.cboStareCivilaPersonal.SelectedIndex;
                lUser.Educatie           = this.cboTipEducatiePersonal.SelectedIndex;
                lUser.NumarCopii         = this.cboNrCopiiPersonal.SelectedIndex;
                lUser.CNP                = this.txtCnpPersonal.Text;
                lUser.TipActIdentitate   = this.cboTipActPersonal.SelectedIndex;
                lUser.SerieActIdentitate = this.txtSerieActPersonal.Text;
                lUser.NumarActIdentitate = this.txtNrActPersonal.Text;
                lUser.Scoala             = this.txtScoalaPersonal.Text;
                lUser.IdProfesie         = this.ctrlProfesiePersonal.IdObiectAfisajCorespunzator;
                lUser.DataNastere        = this.ctrlDataNasteriiPersonal.DataAfisata;
                //this.cboNationalitatePersonal.DataSource=BDefinitiiGenerale.nat
                // lUser.IdImagineCurenta = this.ctrlImaginePersonal.IdPoza;
                // this.txtTaraPersonal.Goleste();
                // this.txtJudetPersonal.Goleste();
                // this.txtLocalitatePersonal.Text = lUser.IdLocalitateNastere.ToString();
                lUser.TelefonMobil         = this.txtTelefonMobilPersonal.Text;
                lUser.TelefonFix           = this.txtTelefonFixPersonal.Text;
                lUser.Fax                  = this.txtFaxPersonal.Text;
                lUser.AdresaMail           = this.txtEmailPersonal.Text;
                lUser.ContYM               = this.txtContYMPersonal.Text;
                lUser.PaginaWeb            = this.txtPaginaWebPersonal.Text;
                lUser.ContSkype            = this.txtSkypePersonal.Text;
                lUser.InfoContact          = this.txtInfoContactPersonal.Text;
                lUser.Culoare              = this.ctrlCuloarePersonal.CuloareARGB;
                lUser.DataAngajare         = this.ctrlDataAngajarePersonal.DataAfisata;
                lUser.ContStoma            = this.txtContStomaPersonal.Text;
                lUser.ParolaStoma          = this.txtParolaPersonal.Text;
                lUser.Observatii           = this.txtObservatiiPersonal.Text;
                lUser.Rol                  = this.cboRolPersonal.SelectedIndex;
                lUser.TipContract          = this.cboTipContract.SelectedIndex;
                lUser.DataContract         = this.ctrlDataContract.DataAfisata;
                lUser.DataIncetareContract = this.ctrlDataIncetareContract.DataAfisata;
                lUser.OreNorma             = CUtil.GetTextInt32(this.txtNrOreNorma.Text);
                lUser.NumarContract        = this.txtNrContract.Text;
                if (esteValid)
                {
                    this.lUser.UpdateAll();
                }
                else
                {
                    seteazaAlerta();
                }
            }
            return(esteValid);
        }