Beispiel #1
0
        private void DgvListaReprezentanti_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiReprezentanti reprezentantDeSters = this.dgvListaReprezentanti.Rows[pIndexRand].Tag as BClientiReprezentanti;

                if (reprezentantDeSters != null)
                {
                    if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), reprezentantDeSters.Nume.ToString() + " " + reprezentantDeSters.Prenume.ToString()))
                    {
                        reprezentantDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                        ConstruiesteRanduriDGV();
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Beispiel #2
0
        private void DgvListaReprezentanti_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiReprezentanti reprezentantDeModificat = this.dgvListaReprezentanti.Rows[pIndexRand].Tag as BClientiReprezentanti;

                if (reprezentantDeModificat != null)
                {
                    if (FormDetaliuReprezentant.Afiseaza(this.GetFormParinte(), reprezentantDeModificat, this.lClient))
                    {
                        incarcaRand(this.dgvListaReprezentanti.Rows[pIndexRand], reprezentantDeModificat);
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Beispiel #3
0
 public static bool Afiseaza(Form pEcranPariente, BClientiReprezentanti pReprezentant, BClienti pClient)
 {
     using (FormDetaliuReprezentant ecran = new FormDetaliuReprezentant(pReprezentant, pClient))
     {
         ecran.AplicaPreferinteleUtilizatorului();
         return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran));
     }
 }
Beispiel #4
0
        private void initListe()
        {
            Dictionary <int, string> lstReprezentanti = new Dictionary <int, string>();
            Dictionary <int, string> lstCabinete      = new Dictionary <int, string>();

            lstReprezentanti.Add(0, string.Empty);
            lstCabinete.Add(0, string.Empty);

            if (this.lClient != null)
            {
                foreach (var elem in BClientiReprezentanti.GetListByIdClient(this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null))
                {
                    lstReprezentanti.Add(elem.Id, BClientiReprezentanti.getReprezentant(elem.Id, null).GetIdentitateReprezentant());
                }

                foreach (var elem in BClientiCabinete.GetListByIdClient(this.lClient.Id, CDefinitiiComune.EnumStare.Activa, null))
                {
                    lstCabinete.Add(elem.Id, elem.Denumire);
                }
            }

            this.cboStare.BeginUpdate();
            this.cboStare.DataSource = BClientiComenziEtape.StructStareEtapa.GetList();
            this.cboStare.EndUpdate();

            BColectieEtape listaEtape = new BColectieEtape();

            if (this.lLucrareSelectata != null)
            {                                                                        //this.lLucrareSelectata.id
                BColectieLucrariEtape etape = BLucrariEtape.GetListByParamIdLucrare(0, EnumStare.Activa, null);
                if (etape.Count > 0)
                {
                    listaEtape = BEtape.getByListaId(etape.GetListaIdEtape(), null);
                }
                else
                {
                    listaEtape = BEtape.GetListByParam(EnumStare.Activa, null);
                }
            }

            this.cboEtapaCurenta.BeginUpdate();
            this.cboEtapaCurenta.DataSource = listaEtape;
            this.cboEtapaCurenta.EndUpdate();

            /* if (this.lComanda != null)
             * {
             *    if (this.lComanda.IdEtapaSetari > 0)
             *         this.cboEtapaCurenta.SelectedItem = this.lComanda.IdEtapaSetari;
             *     else
             *         this.cboEtapaCurenta.SelectedItem = null;
             *     this.cboStare.SelectedIndex = Convert.ToInt32(this.lComanda.StatusEtapa);
             * }*/

            this.cboEtapaCurenta.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cboStare.DropDownStyle        = ComboBoxStyle.DropDownList;
        }
        private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem)
        {
            pRand.Tag = pElem;

            DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare);
            pRand.Cells[EnumColoaneDGV.colClient.ToString()].Value       = BClienti.getClient(pElem.IdClient, null).Denumire;
            pRand.Cells[EnumColoaneDGV.colReprezentant.ToString()].Value = BClientiReprezentanti.getNumeCompletReprezentant(BClientiReprezentanti.getReprezentant(pElem.IdReprezentantClient, null));
            pRand.Cells[EnumColoaneDGV.colDataPrimire.ToString()].Value  = pElem.DataPrimire;
            pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value   = pElem.DataLaGata;
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value   = pElem.Observatii;
        }
        private void CtrlValidareAnulare_Validare(object sender, EventArgs e)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BColectieClienti listaClientiExistenti = BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

                //List<string> listaDenumireClientiExistenti = listaClientiExistenti.GetDenumireClienti();

                foreach (DataGridViewRow row in this.dgvListaImportClienti.Rows)
                {
                    StructImportClienti client = (StructImportClienti)row.Tag;

                    BClienti clinicaExistenta = listaClientiExistenti.GetPrimaByDenumire(client.DenumireCabinet.ToLower());

                    if (!string.IsNullOrEmpty(client.DenumireCabinet))
                    {
                        if (clinicaExistenta == null)
                        {
                            int idClient = BClienti.Add(client.DenumireCabinet, null);
                            listaClientiExistenti.Add(new BClienti(idClient));

                            BClientiReprezentanti.Add(idClient, client.NumeClient, client.PrenumeClient, string.Empty, null);
                        }
                        else
                        {
                            //Tuple<int, string> listeClientiExistentiDenumire = BClienti.getListaClientiDenumire(client.DenumireCabinet);

                            //List<string> lstMediciExistentiDenumire = BClientiReprezentanti.getListaMediciDenumire(listeClientiExistentiDenumire.Item1);

                            //if (!lstMediciExistentiDenumire.Contains(client.NumeClient + " " + client.PrenumeClient))
                            //{
                            BClientiReprezentanti.Add(clinicaExistenta.Id, client.NumeClient, client.PrenumeClient, string.Empty, null);
                            //}
                        }
                    }
                }

                inchideEcranulOK();
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        internal bool Salveaza()
        {
            bool esteValid = BClientiReprezentanti.SuntInformatiileNecesareCoerente(this.lClient.Id, this.txtNumeReprezentant.Text);

            if (this.lReprezentant == null)
            {
                if (esteValid)
                {
                    BClientiReprezentanti.Add(this.lClient.Id, this.txtCnpReprezentant.Text, this.txtNumeReprezentant.Text, this.txtPrenumeReprezentant.Text, this.ctrlDataNasteriiReprezentant.DataAfisata, getSexSelectat(), this.cboTitulaturaReprezentant.SelectedIndex, this.txtNumeDeFataReprezentant.Text, this.txtSupranumeReprezentant.Text, this.txtTelefonMobilReprezentant.Text, this.txtTelefonFixReprezentant.Text, this.txtFaxReprezentant.Text, this.txtSkypeReprezentant.Text, this.txtContYMReprezentant.Text, this.txtEmailReprezentant.Text, this.cboRolReprezentant.SelectedIndex, this.cboStareCivilaReprezentant.SelectedIndex, this.cboNrCopiiReprezentant.SelectedIndex, this.txtScoalaReprezentant.Text, 0, this.ctrlTara.IdObiectAfisajCorespunzator, 0, 0, this.ctrlProfesie.IdObiectAfisajCorespunzator, this.txtObservatiiReprezentant.Text, null);
                }
                else
                {
                    seteazaAlerta();
                }
            }
            else
            {
                lReprezentant.Titulatura  = this.cboTitulaturaReprezentant.SelectedIndex;
                lReprezentant.Nume        = this.txtNumeReprezentant.Text;
                lReprezentant.Prenume     = this.txtPrenumeReprezentant.Text;
                lReprezentant.Porecla     = this.txtSupranumeReprezentant.Text;
                lReprezentant.NumeDeFata  = this.txtNumeDeFataReprezentant.Text;
                lReprezentant.Sex         = getSexSelectat();
                lReprezentant.StareCivila = this.cboStareCivilaReprezentant.SelectedIndex;
                lReprezentant.NumarCopii  = this.cboNrCopiiReprezentant.SelectedIndex;
                lReprezentant.Scoala      = this.txtScoalaReprezentant.Text;
                lReprezentant.IdProfesie  = this.ctrlProfesie.IdObiectAfisajCorespunzator;
                lReprezentant.DataNastere = this.ctrlDataNasteriiReprezentant.DataAfisata;
                //this.cboNationalitateReprezentant.DataSource=
                lReprezentant.IdTaraNastere = this.ctrlTara.IdObiectAfisajCorespunzator;
                // this.cboJudetReprezentant.DataSource=
                //this.cboLocalitateReprezentant.DataSource=
                lReprezentant.CNP          = this.txtCnpReprezentant.Text;
                lReprezentant.Rol          = this.cboRolReprezentant.SelectedIndex;
                lReprezentant.TelefonMobil = this.txtTelefonMobilReprezentant.Text;
                lReprezentant.TelefonFix   = this.txtTelefonFixReprezentant.Text;
                lReprezentant.Fax          = this.txtFaxReprezentant.Text;
                lReprezentant.AdresaMail   = this.txtEmailReprezentant.Text;
                lReprezentant.ContYM       = this.txtContYMReprezentant.Text;
                lReprezentant.ContSkype    = this.txtSkypeReprezentant.Text;
                lReprezentant.Observatii   = this.txtObservatiiReprezentant.Text;
                if (esteValid)
                {
                    this.lReprezentant.UpdateAll();
                }
                else
                {
                    seteazaAlerta();
                }
            }
            return(esteValid);
        }
        private void incarcaRandMedic(DataGridViewRow pRand, BClientiReprezentanti pElem, BColectieClientiComenzi pListaLucrariMedic)
        {
            pRand.Tag = pElem;

            DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare);
            pRand.Cells[EnumColoaneDGVMedici.colNumePrenume.ToString()].Value = pElem.GetIdentitateReprezentant();
            DataGridViewPersonalizat.InitCeluleTelefonEmail(pRand, pElem.TelefonMobil, pElem.AdresaMail);

            initColoaneUltimaLucrareSiTotal(pRand, pListaLucrariMedic);

            pRand.Cells[EnumColoaneDGVMedici.colObservatii.ToString()].Value = pElem.Observatii;
            DataGridViewPersonalizat.InitCelulaStergere(pRand);
        }
Beispiel #9
0
        private void ConstruiesteRanduriDGV()
        {
            this.dgvListaReprezentanti.IncepeContructieRanduri();

            var listaElem = BClientiReprezentanti.getById(lClient.Id, null);

            foreach (var elem in listaElem)
            {
                incarcaRand(this.dgvListaReprezentanti.Rows[this.dgvListaReprezentanti.Rows.Add()], elem);
            }

            this.dgvListaReprezentanti.FinalizeazaContructieRanduri();

            this.lblTotalReprezentanti.Text = "Total reprezentanti:" + this.dgvListaReprezentanti.RowCount.ToString();
        }
Beispiel #10
0
        private FormDetaliuReprezentant(BClientiReprezentanti pReprezentant, BClienti pClient)
        {
            this.DoubleBuffered = true;
            InitializeComponent();

            this.lReprezentant = pReprezentant;
            this.lClient       = pClient;

            if (!CCL.UI.IHMUtile.SuntemInDebug())
            {
                adaugaHandlere();
                initTextML();

                this.CentratCuDeplasare();
            }
        }
        private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem)
        {
            pRand.Tag = pElem;

            DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare);
            pRand.Cells[EnumColoaneDGV.colNumeReprezentant.ToString()].Value = BClientiReprezentanti.getReprezentant(pElem.IdReprezentantClient, null).Nume + " " + BClientiReprezentanti.getReprezentant(pElem.IdReprezentantClient, null).Prenume;
            pRand.Cells[EnumColoaneDGV.colNumePacient.ToString()].Value      = pElem.NumePacient;
            if (CUtil.isNotNull(pElem.DataPrimire))
            {
                pRand.Cells[EnumColoaneDGV.colDataPrimire.ToString()].Value = pElem.DataPrimire;
            }
            if (CUtil.isNotNull(pElem.DataLaGata))
            {
                pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value = pElem.DataLaGata;
            }
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii;
            DataGridViewPersonalizat.InitCelulaStergere(pRand);
        }
Beispiel #12
0
        private void incarcaRand(DataGridViewRow pRand, BClientiReprezentanti pElem)
        {
            pRand.Tag = pElem;

            DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare);
            pRand.Cells[EnumColoaneDGV.colNumePrenume.ToString()].Value = pElem.Nume + " " + pElem.Prenume;
            DataGridViewPersonalizat.InitCeluleTelefonEmail(pRand, pElem.TelefonMobil, pElem.AdresaMail);

            var lstComenziReprezentanti = BClientiComenzi.getByIdReprezentant(this.lClient.Id, pElem.Id, null);

            if (lstComenziReprezentanti.Count != 0)
            {
                pRand.Cells[EnumColoaneDGV.colUltimaComanda.ToString()].Value = lstComenziReprezentanti[lstComenziReprezentanti.Count - 1].DataPrimire;
            }
            pRand.Cells[EnumColoaneDGV.colTotalComenzi.ToString()].Value = BClientiComenzi.GetListByParamIdClientReprezentant(this.lClient.Id, pElem.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null).Count;
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value   = pElem.Observatii;
            DataGridViewPersonalizat.InitCelulaStergere(pRand);
        }
        private void DgvLista_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (this.lOptiune == EnumOptiuneAfisare.Medici)
                {
                    BClientiReprezentanti reprezentantDeModificat = this.dgvLista.Rows[pIndexRand].Tag as BClientiReprezentanti;

                    if (reprezentantDeModificat != null && !this.btnActiviInactivi.Selectat)
                    {
                        if (FormDetaliuReprezentant.Afiseaza(this.GetFormParinte(), reprezentantDeModificat, this.lClient))
                        {
                            incarcaRandMedic(this.dgvLista.Rows[pIndexRand], reprezentantDeModificat, BClientiComenzi.GetListByParam(this.lClient.Id, reprezentantDeModificat.Id, -1, CDefinitiiComune.EnumStare.Activa, null));
                        }
                    }
                }
                else
                {
                    BClientiCabinete cabinetDeModificat = this.dgvLista.Rows[pIndexRand].Tag as BClientiCabinete;

                    if (cabinetDeModificat != null && !this.btnActiviInactivi.Selectat)
                    {
                        if (FormDetaliuCabinet.Afiseaza(this.GetFormParinte(), this.lClient, cabinetDeModificat))
                        {
                            incarcaRand(this.dgvLista.Rows[pIndexRand], cabinetDeModificat, BClientiComenzi.GetListByParam(this.lClient.Id, -1, cabinetDeModificat.Id, CDefinitiiComune.EnumStare.Activa, null));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Beispiel #14
0
        public void Initializeaza(BClienti pClinica)
        {
            base.InitializeazaVariabileleGenerale();

            this.lClinica = pClinica;

            incepeIncarcarea();
            if (this.lClinica == null)
            {
                this.cboListaMediciClinica.AllowModification(false);
            }
            else
            {
                this.cboListaMediciClinica.BeginUpdate();
                this.cboListaMediciClinica.DataSource = BClientiReprezentanti.GetListByIdClient(this.lClinica.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);
                this.cboListaMediciClinica.EndUpdate();
                this.cboListaMediciClinica.SelectedItem = null;
                this.cboListaMediciClinica.AllowModification(true);
            }

            finalizeazaIncarcarea();
        }
Beispiel #15
0
        internal bool Salveaza()
        {
            bool esteValid = BClientiReprezentanti.SuntInformatiileNecesareCoerente(this.lClient.Id, this.txtNumeReprezentant.Text);

            if (this.lReprezentant == null)
            {
                if (esteValid)
                {
                    BClientiReprezentanti.Add(this.lClient.Id, this.txtCnpReprezentant.Text, this.txtNumeReprezentant.Text, this.txtPrenumeReprezentant.Text, this.ctrlDataNasteriiReprezentant.DataAfisata, getSexSelectat(), this.cboTitulaturaReprezentant.SelectedIndex, string.Empty, string.Empty, this.txtTelefonMobilReprezentant.Text, string.Empty, string.Empty, string.Empty, string.Empty, this.txtEmailReprezentant.Text, CDefinitiiComune.EnumRol.MedicTitular, 0, 0, string.Empty, 0, 0, 0, 0, 0, this.txtObservatiiReprezentant.Text, null);
                }
                else
                {
                    seteazaAlerta();
                }
            }
            else
            {
                lReprezentant.Titulatura  = this.cboTitulaturaReprezentant.SelectedIndex;
                lReprezentant.Nume        = this.txtNumeReprezentant.Text;
                lReprezentant.Prenume     = this.txtPrenumeReprezentant.Text;
                lReprezentant.Sex         = getSexSelectat();
                lReprezentant.DataNastere = this.ctrlDataNasteriiReprezentant.DataAfisata;
                lReprezentant.CNP         = this.txtCnpReprezentant.Text;
                //lReprezentant.Rol = this.cboRolReprezentant.SelectedIndex;
                lReprezentant.TelefonMobil = this.txtTelefonMobilReprezentant.Text;
                lReprezentant.AdresaMail   = this.txtEmailReprezentant.Text;
                lReprezentant.Observatii   = this.txtObservatiiReprezentant.Text;
                if (esteValid)
                {
                    this.lReprezentant.UpdateAll();
                }
                else
                {
                    seteazaAlerta();
                }
            }
            return(esteValid);
        }
Beispiel #16
0
        internal bool Salveaza()
        {
            bool esteOk = false;

            if (this.ctrlCautaClinica.AreValoare())
            {
                esteOk = BClientiReprezentanti.SuntInformatiileNecesareCoerente(this.ctrlCautaClinica.IdObiectAfisajCorespunzator, this.txtNume.Text);

                if (esteOk)
                {
                    BClientiReprezentanti.Add(this.ctrlCautaClinica.IdObiectAfisajCorespunzator, this.txtNume.Text, this.txtPrenume.Text, this.txtTelefon.Text, null);
                }
                else
                {
                    seteazaAlerta();
                }
            }
            else
            {
                seteazaAlerta();
            }
            return(esteOk);
        }
        private void ConstruiesteRanduriDGVMedici()
        {
            var listaElem = BClientiReprezentanti.GetListByIdClient(lClient.Id, CDefinitiiComune.EnumStare.Toate, null);

            if (listaElem.ContineElementeDeactivate())
            {
                this.btnActiviInactivi.Visible = true;
            }
            else
            {
                this.btnActiviInactivi.Visible  = false;
                this.btnActiviInactivi.Selectat = false;
            }


            if (!this.btnActiviInactivi.Selectat)
            {
                ConstruiesteRanduriDGVMedici(listaElem.GetListaActive());
            }
            else
            {
                ConstruiesteRanduriDGVMedici(listaElem.GetListaInactive());
            }
        }
Beispiel #18
0
        private void initListe()
        {
            Dictionary <int, string> lstReprezentanti = new Dictionary <int, string>();
            Dictionary <int, string> lstCabinete      = new Dictionary <int, string>();

            lstReprezentanti.Add(0, string.Empty);
            lstCabinete.Add(0, string.Empty);

            foreach (var elem in BClientiReprezentanti.GetListByParamIdClient(this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null))
            {
                lstReprezentanti.Add(elem.Id, BClientiReprezentanti.getNumeCompletReprezentant(elem));
            }
            foreach (var elem in BClientiCabinete.GetListByParamIdClient(this.lClient.Id, CDefinitiiComune.EnumStare.Activa, null))
            {
                lstCabinete.Add(elem.Id, elem.Denumire);
            }

            this.cboComandaReprezentant.DataSource    = new BindingSource(lstReprezentanti, null);
            this.cboComandaReprezentant.DisplayMember = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Value);
            this.cboComandaReprezentant.ValueMember   = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Key);

            this.cboCabinet.DataSource    = new BindingSource(lstCabinete, null);
            this.cboCabinet.DisplayMember = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Value);
            this.cboCabinet.ValueMember   = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Key);

            if (this.lComanda != null)
            {
                if (this.lClient.IdRecomandant != 0)
                {
                    this.cboComandaReprezentant.Text = BClientiReprezentanti.getNumeCompletReprezentant(BClientiReprezentanti.getReprezentant(this.lClient.IdRecomandant, null));
                }
            }

            this.cboComandaReprezentant.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cboCabinet.DropDownStyle             = ComboBoxStyle.DropDownList;
        }
Beispiel #19
0
        private void initListe()
        {
            Dictionary <int, string> lstReprezentanti = new Dictionary <int, string>();
            Dictionary <int, string> lstCabinete      = new Dictionary <int, string>();

            //Dictionary<int, string> lstEtape = new Dictionary<int, string>();

            lstReprezentanti.Add(0, string.Empty);
            lstCabinete.Add(0, string.Empty);
            //lstEtape.Add(0, string.Empty);

            foreach (var elem in BClientiReprezentanti.GetListByIdClient(this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null))
            {
                lstReprezentanti.Add(elem.Id, BClientiReprezentanti.getReprezentant(elem.Id, null).GetIdentitateReprezentant());
            }
            foreach (var elem in BClientiCabinete.GetListByIdClient(this.lClient.Id, CDefinitiiComune.EnumStare.Activa, null))
            {
                lstCabinete.Add(elem.Id, elem.Denumire);
            }

            this.cboStare.BeginUpdate();
            this.cboStare.DataSource = BClientiComenziEtape.StructStareEtapa.GetList();
            this.cboStare.EndUpdate();

            BColectieEtape listaEtape = new BColectieEtape();

            if (this.lLucrareSelectata != null)
            {
                BColectieLucrariEtape etape = BLucrariEtape.GetListByParamIdLucrare(this.lLucrareSelectata.Id, EnumStare.Activa, null);
                if (etape.Count > 0)
                {
                    listaEtape = BEtape.getByListaId(etape.GetListaIdEtape(), null);
                    //foreach (var elem in etape)
                    //{
                    //    lstEtape.Add(elem.IdEtapa, BEtape.GetEtapaById(elem.IdEtapa, EnumStare.Activa, null).Denumire);
                    //}
                }
                else
                {
                    listaEtape = BEtape.GetListByParam(EnumStare.Activa, null);
                    //foreach (var elem in etapeStandard)
                    //{
                    //    lstEtape.Add(elem.Id, elem.Denumire);
                    //}
                }
            }

            this.cboComandaReprezentant.DataSource    = new BindingSource(lstReprezentanti, null);
            this.cboComandaReprezentant.DisplayMember = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Value);
            this.cboComandaReprezentant.ValueMember   = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Key);

            this.cboCabinet.DataSource    = new BindingSource(lstCabinete, null);
            this.cboCabinet.DisplayMember = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Value);
            this.cboCabinet.ValueMember   = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Key);

            vizibilitateZonaCabinete(lstCabinete.Count > 1);
            vizibilitateZonaMedici(lstReprezentanti.Count > 1);

            this.cboEtapaCurenta.BeginUpdate();
            this.cboEtapaCurenta.DataSource = listaEtape;
            this.cboEtapaCurenta.EndUpdate();

            if (this.lComanda != null)
            {
                if (this.lComanda.IdReprezentantClient != 0)
                {
                    this.cboComandaReprezentant.SelectedValue = this.lComanda.IdReprezentantClient;
                }
                if (this.lComanda.IdCabinet != 0)
                {
                    this.cboCabinet.SelectedValue = this.lComanda.IdCabinet;
                }
                if (this.lComanda.IdEtapaSetari > 0)
                {
                    this.cboEtapaCurenta.SelectedItem = this.lComanda.IdEtapaSetari;
                }
                else
                {
                    this.cboEtapaCurenta.SelectedItem = null;
                }
                this.cboStare.SelectedIndex = Convert.ToInt32(this.lComanda.StatusEtapa);
            }

            this.cboComandaReprezentant.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cboCabinet.DropDownStyle             = ComboBoxStyle.DropDownList;
            this.cboEtapaCurenta.DropDownStyle        = ComboBoxStyle.DropDownList;
            this.cboStare.DropDownStyle = ComboBoxStyle.DropDownList;
        }
        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();
        }
        private void DgvLista_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (this.lOptiune == EnumOptiuneAfisare.Medici)
                {
                    BClientiReprezentanti reprezentantDeSters = pDGVSender.Rows[pIndexRand].Tag as BClientiReprezentanti;

                    if (reprezentantDeSters != null)
                    {
                        if (!this.btnActiviInactivi.Selectat)
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), reprezentantDeSters.ToString()))
                            {
                                reprezentantDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                                ConstruiesteRanduriDGVMedici();
                            }
                        }
                        else
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), reprezentantDeSters.ToString()))
                            {
                                reprezentantDeSters.Close(false, string.Empty, null);
                                ConstruiesteRanduriDGVMedici();
                            }
                        }
                    }
                }
                else if (this.lOptiune == EnumOptiuneAfisare.Cabinete)
                {
                    BClientiCabinete cabinetDeSters = this.dgvLista.Rows[pIndexRand].Tag as BClientiCabinete;

                    if (cabinetDeSters != null)
                    {
                        if (!this.btnActiviInactivi.Selectat)
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), cabinetDeSters.Denumire))
                            {
                                cabinetDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                                ConstruiesteRanduriDGVCabinete();
                            }
                        }
                        else
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), cabinetDeSters.Denumire))
                            {
                                cabinetDeSters.Close(false, string.Empty, null);
                                ConstruiesteRanduriDGVCabinete();
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }