public void Initializeaza(BListaPreturiStandard pPretLucrare) { base.InitializeazaVariabileleGenerale(); this.lPretLucrare = pPretLucrare; incepeIncarcarea(); if (this.lPretLucrare == null) { this.txtDenumireLucrare.Goleste(); this.txtPrescurtareLucrare.Goleste(); this.txtCodLucrare.Goleste(); this.lblCautaCategorieLucrare.Goleste(); this.txtValoareLucrare.Goleste(); this.chkLucrareEuro.Checked = false; this.chkLucrareRon.Checked = false; this.txtTermenMediuLucrare.Goleste(); this.lblCautaSubcategorieLucrare.Goleste(); } else { this.lColectieLucrariEtape = BLucrariEtape.GetListByParamIdLucrare(this.lPretLucrare.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); FormListaCategorii._SCategorie = BCategorii.getCategorieById(this.lPretLucrare.IdCategorie, null); this.txtDenumireLucrare.Text = this.lPretLucrare.Denumire; this.txtPrescurtareLucrare.Text = this.lPretLucrare.DenumirePrescurtata; this.txtCodLucrare.Text = this.lPretLucrare.CodIntern; this.lblCautaCategorieLucrare.Text = BListaPreturiStandard.getById(BListaPreturiStandard.getByIdCategorie(this.lPretLucrare.IdCategorie, null), null); this.lblCautaSubcategorieLucrare.Text = BListaPreturiStandard.getById(this.lPretLucrare.IdCategorie, null); if (this.lPretLucrare.ValoareEUR != 0) { this.chkLucrareEuro.Checked = true; this.txtValoareLucrare.Text = lPretLucrare.ValoareEUR.ToString(); } else { this.chkLucrareRon.Checked = true; this.txtValoareLucrare.Text = lPretLucrare.ValoareRON.ToString(); } this.txtTermenMediuLucrare.Text = this.lPretLucrare.TermenMediuZile.ToString(); } ConstruiesteColoaneDGV(); ConstruiesteRanduriDGV(); finalizeazaIncarcarea(); }
private void incarcaRand(DataGridViewRow pRand, BListaPreturiStandard pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire; pRand.Cells[EnumColoaneDGV.colPrescurtare.ToString()].Value = pElem.DenumirePrescurtata; pRand.Cells[EnumColoaneDGV.colCod.ToString()].Value = pElem.CodIntern; pRand.Cells[EnumColoaneDGV.colCategorie.ToString()].Value = BListaPreturiStandard.getById(BListaPreturiStandard.getByIdCategorie(pElem.IdCategorie, null), null); pRand.Cells[EnumColoaneDGV.colTermenMediu.ToString()].Value = pElem.TermenMediuZile; pRand.Cells[EnumColoaneDGV.colValoareRon.ToString()].Value = pElem.ValoareRON; pRand.Cells[EnumColoaneDGV.colValoareEuro.ToString()].Value = pElem.ValoareEUR; DataGridViewPersonalizat.InitCelulaStergere(pRand); }