private void incarcaRand(DataGridViewRow pRand, BUtilizator pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colCuloare.ToString()].Style.BackColor = BDefinitiiGenerale.getCuloareDinARGB(pElem.Culoare); pRand.Cells[EnumColoaneDGV.colNume.ToString()].Value = pElem.Nume; pRand.Cells[EnumColoaneDGV.colPrenume.ToString()].Value = pElem.Prenume; if (CUtil.isNotNull(pElem.DataNastere)) { pRand.Cells[EnumColoaneDGV.colDataNastere.ToString()].Value = pElem.DataNastere; } pRand.Cells[EnumColoaneDGV.colTelefonFix.ToString()].Value = pElem.TelefonFix; pRand.Cells[EnumColoaneDGV.colCnp.ToString()].Value = pElem.CNP; DataGridViewPersonalizat.InitCeluleTelefonEmail(pRand, pElem.TelefonMobil, pElem.AdresaMail); DataGridViewPersonalizat.InitCelulaStergere(pRand); }
private void incarcaRand(DataGridViewRow pRand, BClientiCabinete pElem, BAdrese pAdresa) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire; pRand.Cells[EnumColoaneDGV.colAdresa.ToString()].Value = pAdresa.ToString(); var lstComenziCabinet = BClientiComenzi.getById(this.lClient.Id, pElem.Id, null); if (lstComenziCabinet.Count != 0) { pRand.Cells[EnumColoaneDGV.colUltimaComanda.ToString()].Value = lstComenziCabinet[lstComenziCabinet.Count - 1].DataPrimire; } pRand.Cells[EnumColoaneDGV.colTotalComenzi.ToString()].Value = BClientiComenzi.getById(this.lClient.Id, pElem.Id, null).Count; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
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); }
private void incarcaRand(DataGridViewRow pRand, BClientiPlati pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colData.ToString()].Value = pElem.DataPlata; pRand.Cells[EnumColoaneDGV.colModalitate.ToString()].Value = BDefinitiiGenerale.StructModalitatePlata.GetStringByEnum((BDefinitiiGenerale.EnumModalitatePlata)pElem.ModalitatePlata); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colValoare.ToString(), pElem.SumaPlatita, CDefinitiiComune.EnumTipMoneda.Lei); pRand.Cells[EnumColoaneDGV.colClinica.ToString()].Value = pElem.DenumireClient; pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii; pRand.Cells[EnumColoaneDGV.colCursBNR.ToString()].Value = pElem.CursBNR; DataGridViewPersonalizat.InitCelulaStergere(pRand); DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetaliiClinica.ToString()); }
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 incarcaRand(DataGridViewRow pRand, BLocatii pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire; //pRand.Cells[EnumColoaneDGV.colInitiala.ToString()].Value = pElem.InitialaLocatie; pRand.Cells[EnumColoaneDGV.colDenumireFiscala.ToString()].Value = pElem.DenumireFiscala; pRand.Cells[EnumColoaneDGV.colInfoContact.ToString()].Value = pElem.InfoContact; pRand.Cells[EnumColoaneDGV.colSerieFacturi.ToString()].Value = pElem.SerieFacturi; pRand.Cells[EnumColoaneDGV.colNumarulUltimeiFacturi.ToString()].Value = pElem.NumarUltimaFactura; pRand.Cells[EnumColoaneDGV.colSerieChitante.ToString()].Value = pElem.SerieChitante; pRand.Cells[EnumColoaneDGV.colNumarulUltimeiChitante.ToString()].Value = pElem.NumarUltimaChitanta; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
private void incarcaRand(DataGridViewRow pRand, BClientiFacturi pElem, BColectieClientiComenzi pListaLucrari, BColectieClientiPlatiComenzi pListaPlatiPeFact) { pRand.Tag = pElem; double valoare = pListaLucrari.GetValoareTotalaFactura(CDefinitiiComune.EnumTipMoneda.Lei, pElem.CursBNR); double achitat = pListaPlatiPeFact.GetValoarePlatita(); DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); if (pElem.EsteFiscalizata()) { pRand.Cells[EnumColoaneDGV.colTipDocument.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Factura); DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colTipDocument.ToString()); } else { pRand.Cells[EnumColoaneDGV.colTipDocument.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Proforma); DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colTipDocument.ToString()); } pRand.Cells[EnumColoaneDGV.colDataEmiterii.ToString()].Value = pElem.DataFactura; pRand.Cells[EnumColoaneDGV.colSerieFactura.ToString()].Value = pElem.SerieFactura; pRand.Cells[EnumColoaneDGV.colNumarFactura.ToString()].Value = pElem.NumarFactura; pRand.Cells[EnumColoaneDGV.colClinica.ToString()].Value = pElem.DenumireClient; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colValoare.ToString(), valoare, CDefinitiiComune.EnumTipMoneda.Lei); //pRand.Cells[EnumColoaneDGV.colValoare.ToString()].Value = ; if (pElem.MonedaFactura != CDefinitiiComune.EnumTipMoneda.Lei) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colValoare.ToString()); } pRand.Cells[EnumColoaneDGV.colValoare.ToString()].ToolTipText = CUtil.GetValoareMonetara(valoare, pElem.MonedaFactura); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colAchitat.ToString(), achitat, CDefinitiiComune.EnumTipMoneda.Lei); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colRestPlata.ToString(), valoare - achitat, CDefinitiiComune.EnumTipMoneda.Lei); pRand.Cells[EnumColoaneDGV.colCursBNR.ToString()].Value = pElem.CursBNR; pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii; DataGridViewPersonalizat.InitCelulaStergere(pRand); DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetaliiClinica.ToString()); }
private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colTotalEtape.ToString()); pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].Value = pElem.DenumireLucrare; pRand.Cells[EnumColoaneDGV.colNrElemente.ToString()].Value = pElem.NrElemente.ToString(); if (pElem.IdReprezentantClient != 0) { pRand.Cells[EnumColoaneDGV.colNumeMedic.ToString()].Value = pElem.GetIdentitateMedic(); } pRand.Cells[EnumColoaneDGV.colNumePacient.ToString()].Value = pElem.NumePacient; pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = pElem.GetIdentitateTehnician(); 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; } if (pElem.IdEtapaSetari != 0) { pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].Value = BEtape.GetEtapaById(pElem.IdEtapaSetari, EnumStare.Activa, null).Denumire; } pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii; if (CUtil.isNotNull(pElem.DataFactura)) { pRand.Cells[EnumColoaneDGV.colDataFactura.ToString()].Value = pElem.DataFactura; } DataGridViewPersonalizat.InitCelulaStergere(pRand); }
private void incarcaRand(DataGridViewRow pRand, BClientiFacturi pElem, BColectieClientiComenzi pListaLucrari, BColectieClientiPlatiComenzi pListaPlatiPeFact) { pRand.Tag = pElem; double valoare = pListaLucrari.GetValoareTotalaFactura(CDefinitiiComune.EnumTipMoneda.Lei, pElem.CursBNR); double achitat = pListaPlatiPeFact.GetValoarePlatita(); //pListaPlatiPeFact.GetSumaPlatita(); DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGVFacturi.colDataEmiterii.ToString()].Value = pElem.DataFactura; pRand.Cells[EnumColoaneDGVFacturi.colTipDocument.ToString()].Value = pElem.ToStringTipDocument(); pRand.Cells[EnumColoaneDGVFacturi.colSerieFactura.ToString()].Value = pElem.SerieFactura; pRand.Cells[EnumColoaneDGVFacturi.colNumarFactura.ToString()].Value = pElem.NumarFactura != 0 ? pElem.NumarFactura: pElem.Id; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colValoare.ToString(), valoare, CDefinitiiComune.EnumTipMoneda.Lei); if (pElem.MonedaFactura != CDefinitiiComune.EnumTipMoneda.Lei) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGVFacturi.colValoare.ToString()); } pRand.Cells[EnumColoaneDGVFacturi.colValoare.ToString()].ToolTipText = CUtil.GetValoareMonetara(valoare, pElem.MonedaFactura); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colPlatit.ToString(), achitat, CDefinitiiComune.EnumTipMoneda.Lei); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colRest.ToString(), valoare - achitat, CDefinitiiComune.EnumTipMoneda.Lei); if (valoare - achitat != 0) { DataGridViewPersonalizat.SeteazaCuloareTextCelula(pRand, EnumColoaneDGVFacturi.colRest.ToString(), Color.Red); } else { DataGridViewPersonalizat.SeteazaCuloareTextCelula(pRand, EnumColoaneDGVFacturi.colRest.ToString(), Color.Black); } pRand.Cells[EnumColoaneDGVFacturi.colCursBNR.ToString()].Value = pElem.CursBNR; pRand.Cells[EnumColoaneDGVFacturi.colObservatii.ToString()].Value = pElem.Observatii; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
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; if (pElem.IdCategorie != 0) { BCategorii categorie = BCategorii.getCategorieById(pElem.IdCategorie, null); if (categorie.IdCategorie != 0) { pRand.Cells[EnumColoaneDGV.colCategorie.ToString()].Value = BCategorii.getCategorieById(categorie.IdCategorie, null).Denumire; pRand.Cells[EnumColoaneDGV.colSubcategorie.ToString()].Value = categorie.Denumire; } else { pRand.Cells[EnumColoaneDGV.colCategorie.ToString()].Value = categorie.Denumire; pRand.Cells[EnumColoaneDGV.colSubcategorie.ToString()].Value = string.Empty; } } else { pRand.Cells[EnumColoaneDGV.colCategorie.ToString()].Value = string.Empty; pRand.Cells[EnumColoaneDGV.colSubcategorie.ToString()].Value = string.Empty; } pRand.Cells[EnumColoaneDGV.colTermenMediu.ToString()].Value = pElem.TermenMediuZile; pRand.Cells[EnumColoaneDGV.colValoareRon.ToString()].Value = pElem.GetEtichetaRon(); pRand.Cells[EnumColoaneDGV.colValoareEuro.ToString()].Value = pElem.GetEtichetaEuro(); DataGridViewPersonalizat.InitCelulaStergere(pRand); }
private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem) { pRand.Tag = pElem; //asa era initial pRand.Tag = new Tuple<BClientiComenzi, BListaPreturiStandard, BListaPreturiClienti>(pElem, pElem2, pElemClient); idclient = pElem.IdClient; idlucrare = pElem.IdLucrare; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); DataGridViewPersonalizat.SeteazaCuloareFundalCelula(pRand, EnumColoaneDGV.colCuloareTehnician.ToString(), BDefinitiiGenerale.getCuloareDinARGB(pElem.CuloareTehnician)); pRand.Cells[EnumColoaneDGV.colCuloareTehnician.ToString()].ToolTipText = pElem.GetIdentitateTehnician(); pRand.Cells[EnumColoaneDGV.colCodLucrareClient.ToString()].Value = pElem.Id; pRand.Cells[EnumColoaneDGV.colCodComanda.ToString()].Value = pElem.CodLucrare; pRand.Cells[EnumColoaneDGV.colClient.ToString()].Value = pElem.GetDenumireClinicaCabinet(); DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colFisaClient.ToString()); if (pElem.IdReprezentantClient != 0) { pRand.Cells[EnumColoaneDGV.colMedic.ToString()].Value = pElem.GetIdentitateMedic(); } else { pRand.Cells[EnumColoaneDGV.colMedic.ToString()].Value = string.Empty; } if (pElem.Urgent) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colLucrare.ToString()); pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].ToolTipText = string.Format("{0} - {1}", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Urgent), pElem.DenumireLucrare); } else { DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colLucrare.ToString()); pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].ToolTipText = pElem.DenumireLucrare; } pRand.Cells[EnumColoaneDGV.colCuloare.ToString()].Value = pElem.Culoare; pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].Value = pElem.GetDenumirePrescurtata(); pRand.Cells[EnumColoaneDGV.colNrElemente.ToString()].Value = pElem.NrElemente.ToString(); if (pElem.IdEtapaCurenta != 0) { pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].Value = pElem.DenumireEtapa; } else { pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].Value = string.Empty; } if (pElem.Refacere) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colEtapaCurenta.ToString()); pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].ToolTipText = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Refacere); } else { DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colEtapaCurenta.ToString()); } if (pElem.IdTehnician != 0) { pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = pElem.GetIdentitateTehnician(); } else { pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = string.Empty; } pRand.Cells[EnumColoaneDGV.colStare.ToString()].Value = pElem.StatusEtapaEticheta; if (pElem.DataSfarsitEtapa != CConstante.DataNula) { pRand.Cells[EnumColoaneDGV.colTermen.ToString()].Value = pElem.DataSfarsitEtapa; pRand.Cells[EnumColoaneDGV.colTermen.ToString()].ToolTipText = CUtil.GetNumeZiSaptamana(pElem.DataSfarsitEtapa.DayOfWeek); if (pElem.DataSfarsitEtapa <= DateTime.Today && !pElem.Acceptata) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colTermen.ToString()); } else { DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colTermen.ToString()); } } DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colTotalEtape.ToString()); pRand.Cells[EnumColoaneDGV.colDataPrimire.ToString()].Value = pElem.DataPrimire; if (pElem.DataLaGata != CConstante.DataNula) { pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value = pElem.DataLaGata; } else { pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value = string.Empty; } if (pElem.DataLaGata.Date <= DateTime.Today && !pElem.Acceptata) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colDataLaGata.ToString()); } else { DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colDataLaGata.ToString()); } pRand.Cells[EnumColoaneDGV.colNumePacient.ToString()].Value = pElem.GetNumePrenumePacient(); pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii; pRand.Cells[EnumColoaneDGV.colDataCreare.ToString()].Value = pElem.DataCreare; if (pElem.IdFactura > 0) { DataGridViewPersonalizat.SeteazaOK(pRand, EnumColoaneDGV.colNumePacient.ToString()); } BListaPreturiClienti pElemClient = BListaPreturiClienti.GetPretClient(pElem.IdLucrare, pElem.IdClient, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); pRand.Cells[EnumColoaneDGV.colMoneda.ToString()].Value = pElem.GetEtichetaMoneda(); pRand.Cells[EnumColoaneDGV.colValoareInitiala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareInitiala, pElem.Moneda); double pretLista = pElem.ValoareInitiala; double pretNegociat = pElem.ValoareFinala; double diferenta = pretLista - pretNegociat; double ajustare = CUtil.GetProcentDinTotal(diferenta, pretLista); pRand.Cells[EnumColoaneDGV.colDiscount.ToString()].Value = CUtil.GetValoareMonetara(ajustare); // BListaPreturiClienti.GetEtichetaAjustare(); //daca este reducere, atunci % cu minus si alerta text cu rosu if (pretNegociat < pretLista) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colDiscount.ToString()); } else { DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colDiscount.ToString()); } pRand.Cells[EnumColoaneDGV.colValoareFinala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareFinala, pElem.Moneda); DataGridViewPersonalizat.InitCelulaStergere(pRand); }