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;
        }
示例#2
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;
        }