public static bool Afiseaza(Form pEcranPariente, CDefinitiiComune.EnumRol pRol, int x, int y) { using (FormListaUtilizatori ecran = new FormListaUtilizatori(pRol)) { ecran.Location = new Point(x, y); return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran)); } }
private void LblGasesteUtilizator_DeschideEcranCautare(Control psender, object pxObiectExistent) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); if (FormListaUtilizatori.Afiseaza(this, this.Location.X, this.Location.Y)) { if (FormListaUtilizatori._SUtilizator != null) { this.lblGasesteUtilizator.Text = BUtilizator.GetNumePrenumeUtilizator(FormListaUtilizatori._SUtilizator.Id, null); this.panelDetaliiCheck.Visible = true; BColectiePontaj listaElem = BPontaj.GetListByIdUtilizator(FormListaUtilizatori._SUtilizator.Id, null); if (listaElem.Count > 0) { getDataSourcePentruComboTip(listaElem); this.lblDurata.Visible = true; this.lblUltimulCheck.Visible = true; this.lblUltimulCheck.Text = BDefinitiiGenerale.StructCheckInOut.GetDenumireTip(listaElem[0].TipPontaj) + ": " + getStringFromDate(listaElem[0].DataPontaj); if (listaElem[listaElem.Count - 1].TipPontaj == 2) { this.lblDurata.Text = CUtil.GetTextDurataOreMinute(getNrMinuteZiTerminata(listaElem[0].DataPontaj, listaElem[listaElem.Count - 1].DataPontaj)); } else { this.lblDurata.Text = CUtil.GetTextDurataOreMinute(getNrMinute(listaElem[0].DataPontaj)); } ConstruiesteColoaneDGV(); ConstruiesteRanduriDGV(); this.dgvListaCheckAstazi.ColumnHeadersVisible = false; } else { this.cboTip.DataSource = BDefinitiiGenerale.StructCheckInOut.GetListCheckIn(); this.lblDurata.Visible = false; this.lblUltimulCheck.Visible = false; } this.cboTip.DropDownStyle = ComboBoxStyle.DropDownList; } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }