Esempio n. 1
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.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);
        }
Esempio n. 3
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;
        }
Esempio n. 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);

            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;
        }
        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;
        }