private void BtnAdaugaEtapa_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); if (SalveazaNull()) { if (FormListaEtape.Afiseaza(this.GetFormParinte())) { this.lColectieEtape = FormListaEtape._SColectieEtape; ConstruiesteRanduriDGV(); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void initRezumatEtape(List <int> pListaIdEtape, Dictionary <int, int> pDictEtapeNrElem) { BColectieEtape listaEtape = BEtape.getByListaId(pListaIdEtape, null); Dictionary <int, string> dictIdDenumire = listaEtape.GetAsDictIdDenumire(); this.ctrlRezumatEtape.Initializeaza(dictIdDenumire, pDictEtapeNrElem, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Etape), false); }
public static BEtape Afiseaza(Form pEcranPariente, BColectieEtape pColectieEtapeSelectate) { using (FormListaEtape ecran = new FormListaEtape(pColectieEtapeSelectate)) { ecran.AplicaPreferinteleUtilizatorului(); CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran); return(ecran.lEtapa); } }
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 FormListaEtape(BColectieEtape pColectieEtape) { this.DoubleBuffered = true; InitializeComponent(); this.lColectieEtape = pColectieEtape; if (!CCL.UI.IHMUtile.SuntemInDebug()) { adaugaHandlere(); initTextML(); this.CentratCuDeplasare(); } }
private void ConstruiesteRanduriDGV(BColectieEtape pListaEtape) { this.dgvListaEtape.IncepeContructieRanduri(); foreach (var elem in pListaEtape) { incarcaRand(this.dgvListaEtape.Rows[this.dgvListaEtape.Rows.Add()], elem); } this.dgvListaEtape.FinalizeazaContructieRanduri(); int totalEtape = pListaEtape.Count; this.lblTotalEtape.Text = totalEtape.ToString() + " etape"; }
public void Initializeaza(BListaPreturiStandard pLucrare) { base.InitializeazaVariabileleGenerale(); this.lLucrare = pLucrare; incepeIncarcarea(); if (this.lLucrare == null) { this.cboListaEtape.AllowModification(false); } else { BColectieEtape listaEtape = new BColectieEtape(); if (this.lLucrare != null) { BColectieLucrariEtape etape = BLucrariEtape.GetListByParamIdLucrare(this.lLucrare.Id, EnumStare.Activa, null); if (etape.Count > 0) { listaEtape = BEtape.getByListaId(etape.GetListaIdEtape(), null); } else { listaEtape = BEtape.GetListByParam(EnumStare.Activa, null); } } this.cboListaEtape.BeginUpdate(); this.cboListaEtape.DataSource = listaEtape; this.cboListaEtape.EndUpdate(); this.cboListaEtape.SelectedItem = null; this.cboListaEtape.AllowModification(true); } finalizeazaIncarcarea(); }
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() { base.InitializeazaVariabileleGenerale(); incepeIncarcarea(); if (this.lLucrare == null) { this.txtDenumireLucrare.Goleste(); this.txtPrescurtareLucrare.Goleste(); this.txtCodLucrare.Goleste(); this.lblCautaCategorieLucrare.Goleste(); this.ctrlValoareMonetara.Initializeaza(null); this.txtTermenMediuLucrare.Goleste(); this.lblCautaSubcategorieLucrare.Goleste(); } else { this.lColectieLucrariEtape = BLucrariEtape.GetListByParamIdLucrare(this.lLucrare.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); foreach (var etapa in this.lColectieLucrariEtape) { this.lColectieEtape.Adauga(BEtape.GetEtapaById(etapa.IdEtapa, EnumStare.Activa, null)); } this.lColectieEtapeTemp = this.lColectieEtape; this.txtDenumireLucrare.Text = this.lLucrare.Denumire; this.txtPrescurtareLucrare.Text = this.lLucrare.DenumirePrescurtata; this.txtCodLucrare.Text = this.lLucrare.CodIntern; if (this.lLucrare.IdCategorie != 0) { this.lCategorie = BCategorii.getCategorieById(this.lLucrare.IdCategorie, null); this.lblCautaCategorieLucrare.ObiectAfisajCorespunzator = this.lCategorie; this.lblCautaCategorieLucrare.Tag = this.lCategorie; if (this.lCategorie.IdCategorie > 0) { BCategorii categ = BCategorii.getCategorieById(this.lCategorie.IdCategorie, null); this.lblCautaCategorieLucrare.ObiectAfisajCorespunzator = categ; this.lblCautaCategorieLucrare.Text = categ.Denumire; this.lblCautaSubcategorieLucrare.ObiectAfisajCorespunzator = this.lCategorie; this.lblCautaSubcategorieLucrare.Text = this.lCategorie.Denumire; } else { this.lblCautaCategorieLucrare.Text = this.lCategorie.Denumire; this.lblCautaSubcategorieLucrare.Goleste(); } } if (this.lLucrare.ValoareEUR != 0) { Tuple <double, EnumTipMoneda> tupleValoareMonetara = new Tuple <double, EnumTipMoneda>(this.lLucrare.ValoareEUR, EnumTipMoneda.Euro); this.ctrlValoareMonetara.Initializeaza(tupleValoareMonetara); } else { Tuple <double, EnumTipMoneda> tupleValoareMonetara = new Tuple <double, EnumTipMoneda>(this.lLucrare.ValoareRON, EnumTipMoneda.Lei); this.ctrlValoareMonetara.Initializeaza(tupleValoareMonetara); } this.txtTermenMediuLucrare.Text = this.lLucrare.TermenMediuZile.ToString(); } ConstruiesteColoaneDGV(); ConstruiesteRanduriDGV(); finalizeazaIncarcarea(); }