private void OnRowSelected(RowEventArgs e) { EventHandler<RowEventArgs> rowSelected = this.RowSelected; if (rowSelected != null) { rowSelected(this, e); } }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.IsDataRow) { var item = e.Row.ListObject as FascicoloImmobiliareDTO; if (item != null) { item.Stato = "U"; _dirty = true; } } }
private void lista_AfterRowUpdate(object sender, RowEventArgs e) { var premio = (PremioAssicurativoDTO)e.Row.ListObject; DateTime? dataPagamento = null; if (premio.DataPagamento != null) dataPagamento = premio.DataPagamento; decimal? importo = null; if (premio.ImportoPagamento != null) importo = (decimal)premio.ImportoPagamento; if (dataPagamento != null && importo != null) { _contratto.DataPagamentoPremio = dataPagamento.Value; _contratto.ImportoPremio = importo.Value; } }
private void listaRateAfterRowUpdate(object sender, RowEventArgs e) { var dettaglio = (PianoRatealeDettaglioDTO)e.Row.ListObject; if (Gipasoft.Library.Conversione.IsSqlSmallDateTime(dettaglio.DataScadenza)) { if ((DateTime) e.Row.Cells["DataScadenza"].Value != (DateTime) e.Row.Cells["DataScadenza"].OriginalValue) { var messageAuth = getRateCondominiService().IsAllowUpdateDataPianoRateale(_pianoRateale, dettaglio.ID, dettaglio.DataScadenza); if (!string.IsNullOrEmpty(messageAuth.FatalMessage)) { CommonMessages.DisplayWarning(string.Format("Non è ammesso l'aggiornamento della rata:{0}{1}", Environment.NewLine, messageAuth.FatalMessage)); LoadData(_condominio, _esercizio); } else{ var result = DialogResult.Yes; if (!string.IsNullOrEmpty(messageAuth.WarnMessage)) result = CommonMessages.DisplayConfirm(string.Format("Avvertimenti per l'aggiornamento della rata:{0}{1}{0}Vuoi confermare l'aggiornamento?", Environment.NewLine, messageAuth.WarnMessage)); if (result == DialogResult.Yes) { if (!_rateDaAggiornare.Contains(dettaglio)) _rateDaAggiornare.Add(dettaglio); } } } else { if (!_rateDaAggiornare.Contains(dettaglio)) _rateDaAggiornare.Add(dettaglio); } } else CommonMessages.DisplayWarning(string.Format("La data {0} non è corretta", dettaglio.DataScadenza)); }
private void listaBeforeRowActivate(object sender, RowEventArgs e) { var disposizionePagamentoDTO = e.Row.ListObject as DisposizionePagamentoDTO; if (disposizionePagamentoDTO != null) OnSelectCondominio(new SelectCondominioArgs(getCondominioService().GetById(disposizionePagamentoDTO.IdCondominio, true), null)); }
private void contiAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.IsDataRow) { if (e.Row.Band.Key == "ContoDTO") { var conto = e.Row.ListObject as ContoDTO; if (conto != null) { if (!_contiDaAggiornare.Contains(conto)) _contiDaAggiornare.Add(conto); if (e.Row.Cells.Exists("DeletedColumn")) e.Row.Cells["DeletedColumn"].Hidden = false; if (conto.Tipo == TipoContoEconomicoEnum.Undefined) conto.Tipo = TipoContoEconomicoEnum.Economico; } } if (e.Row.Band.Key == "SottoConti" && e.Row.ParentRow != null) { var conto = e.Row.ParentRow.ListObject as ContoDTO; var sottoConto = e.Row.ListObject as SottoContoDTO; if (conto != null && sottoConto != null) { if (!_contiDaAggiornare.Contains(conto)) _contiDaAggiornare.Add(conto); if (conto.SottoConti == null) conto.SottoConti = new List<SottoContoDTO>(); if (!conto.SottoConti.Contains(sottoConto)) conto.SottoConti.Add(sottoConto); if (e.Row.Cells.Exists("DeletedColumn")) e.Row.Cells["DeletedColumn"].Hidden = false; } } } }
private void ripartizioneDettaglioAfterRowUpdate(object sender, RowEventArgs e) { try { var movimento = e.Row.ListObject as MovimentoContabileDTO; if (movimento != null) { if (movimento.NumeroRiga == null) movimento.NumeroRiga = e.Row.ListIndex + 1; setDettaglioResiduo(); enableBtnConferma(); // Se non è stata inserita alcuna descrizione per default utilizzo la descrizione del dettaglio if (!_condominio.DescrizioneSpeseAutomatica && (string.IsNullOrEmpty(e.Row.Cells["Descrizione"].Value?.ToString()))) { if (!string.IsNullOrEmpty(descrizioneDettaglio.Text)) e.Row.Cells["Descrizione"].Value = descrizioneDettaglio.Text.Trim(); } int? currentRowIndex = null; if (ripartizioneDettaglio?.ActiveRow != null) currentRowIndex = ripartizioneDettaglio.ActiveRow.Index; addMovimento(movimento); if (currentRowIndex != null) ripartizioneDettaglio.Rows[currentRowIndex.Value].Activate(); } } catch (Exception ex) { _log.ErrorFormat("Errore dopo l'update di una riga - {0} - spesa:{1} - azienda:{2}", ex, Utility.GetMethodDescription(), _spesa?.ID.ToString() ?? "<NULL>", Security.Login.Instance.CurrentLogin().Azienda); } }
///<summary>Raises the RowInvalidated event.</summary> ///<param name="e">A RowEventArgs object that provides the event data.</param> protected internal virtual void OnRowInvalidated(RowEventArgs e) { if (RowInvalidated != null) RowInvalidated(this, e); }
private void listaAfterRowInsert(object sender, RowEventArgs e) { listaDoubleClickRow(sender, null); }
private void OnRowActivated(object sender, RowEventArgs e) { this.ActivatedRows.Insert(0, e.Row.DataContext as MyBusinessObject); }
/// <summary> /// Handles the Edit event of the gSteps control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gSteps_Edit(object sender, RowEventArgs e) { NavigateToLinkedPage(AttributeKey.DetailPage, PageParameterKey.StepId, e.RowKeyId, PageParameterKey.StepTypeId, _stepType.Id); }
private void scadenzeAfterRowUpdate(object sender, RowEventArgs e) { if(e.Row.IsDataRow) setRowLayout(e.Row); }
/// <summary> /// Handles the Click event of the delete/archive button in the grid /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gGroups_DeleteOrArchive(object sender, RowEventArgs e) { var rockContext = new RockContext(); GroupService groupService = new GroupService(rockContext); GroupMemberService groupMemberService = new GroupMemberService(rockContext); AuthService authService = new AuthService(rockContext); Group group = null; GroupMember groupMember = null; if (GroupListGridMode == GridListGridMode.GroupsPersonMemberOf) { // the DataKey Id of the grid is GroupMemberId groupMember = groupMemberService.Get(e.RowKeyId); if (groupMember != null) { group = groupMember.Group; } } else { // the DataKey Id of the grid is GroupId group = groupService.Get(e.RowKeyId); } if (group != null) { bool isSecurityRoleGroup = group.IsSecurityRole || group.GroupType.Guid.Equals(Rock.SystemGuid.GroupType.GROUPTYPE_SECURITY_ROLE.AsGuid()); if (GroupListGridMode == GridListGridMode.GroupsPersonMemberOf) { // Grid is in 'Groups that Person is member of' mode GroupMemberHistoricalService groupMemberHistoricalService = new GroupMemberHistoricalService(rockContext); bool archive = false; if (group.GroupType.EnableGroupHistory == true && groupMemberHistoricalService.Queryable().Any(a => a.GroupMemberId == groupMember.Id)) { // if the group has GroupHistory enabled, and this group member has group member history snapshots, they were prompted to Archive archive = true; } else { if (!(group.IsAuthorized(Authorization.EDIT, this.CurrentPerson) || group.IsAuthorized(Authorization.MANAGE_MEMBERS, this.CurrentPerson))) { mdGridWarning.Show("You are not authorized to delete members from this group", ModalAlertType.Information); return; } string errorMessage; if (!groupMemberService.CanDelete(groupMember, out errorMessage)) { mdGridWarning.Show(errorMessage, ModalAlertType.Information); return; } } int groupId = groupMember.GroupId; if (archive) { // NOTE: Delete will AutoArchive, but since we know that we need to archive, we can call .Archive directly groupMemberService.Archive(groupMember, this.CurrentPersonAliasId, true); } else { groupMemberService.Delete(groupMember, true); } rockContext.SaveChanges(); } else { // Grid is in 'Group List' mode bool archive = false; var groupMemberHistoricalService = new GroupHistoricalService(rockContext); if (group.GroupType.EnableGroupHistory == true && groupMemberHistoricalService.Queryable().Any(a => a.GroupId == group.Id)) { // if the group has GroupHistory enabled and has history snapshots, and they were prompted to Archive archive = true; } if (archive) { if (!group.IsAuthorized(Authorization.EDIT, this.CurrentPerson)) { mdGridWarning.Show("You are not authorized to archive this group", ModalAlertType.Information); return; } // NOTE: groupService.Delete will automatically Archive instead Delete if this Group has GroupHistory enabled, but since this block has UI logic for Archive vs Delete, we can do a direct Archive groupService.Archive(group, this.CurrentPersonAliasId, true); } else { if (!group.IsAuthorized(Authorization.EDIT, this.CurrentPerson)) { mdGridWarning.Show("You are not authorized to delete this group", ModalAlertType.Information); return; } string errorMessage; if (!groupService.CanDelete(group, out errorMessage)) { mdGridWarning.Show(errorMessage, ModalAlertType.Information); return; } groupService.Delete(group, true); } } rockContext.SaveChanges(); if (isSecurityRoleGroup) { Rock.Security.Authorization.Clear(); } } BindGrid(); }
/// <summary> /// Handles the Edit event of the gBinaryFileType control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gBinaryFileType_Edit(object sender, RowEventArgs e) { NavigateToLinkedPage("DetailPage", "binaryFileTypeId", e.RowKeyId); }
/// <summary> /// Handles the Edit event of the gLayouts control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gLayouts_Edit(object sender, RowEventArgs e) { NavigateToLinkedPage("DetailPage", "layoutId", e.RowKeyId); }
/// <summary> /// Handles the Edit event of the gItems control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gItems_Edit(object sender, RowEventArgs e) { NavigateToDetailPage(e.RowKeyId); }
/// <summary> /// Handles the Edit event of the rGrid control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Rock.Controls.RowEventArgs"/> instance containing the event data.</param> protected void rGrid_Edit(object sender, RowEventArgs e) { ShowEdit(e.RowKeyId); }
private void listaSpeseAfterRowUpdate(object sender, RowEventArgs e) { if (riepilogoSpeseSubentroDTOBindingSource.Count > 0) listaRiepilogoAfterRowUpdate(sender, new RowEventArgs(listaRiepilogo.Rows[0])); }
protected void rGrid_Edit(object sender, RowEventArgs e) { ShowEdit(( int )rGrid.DataKeys[e.RowIndex]["id"]); }
protected void gReport_OpenWorkflow(object sender, RowEventArgs e) { }
/// <summary> /// Handles the Edit event of the gPrayerComments control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gPrayerComments_Edit(object sender, RowEventArgs e) { // NOTE: DataKeys for Grid has two fields "id,entityId" NavigateToLinkedPage("DetailPage", "noteId", (int)e.RowKeyValues["id"], "prayerRequestId", (int)e.RowKeyValues["entityid"]); }
/// <summary> /// Handles the RowSelected event of the rGridAssetStorageProvider control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param> protected void rGridAssetStorageProvider_RowSelected(object sender, RowEventArgs e) { NavigateToLinkedPage(AttributeKey.DetailPage, new Dictionary <string, string> { { "assetStorageProviderId", e.RowKeyValue.ToString() } }); }
/// <summary>Behandelt das AfterRowInsert Ereignis des ultraGridErnaehrung Controls.</summary> /// <param name="sender">Die Quelle des Ereignisses.</param> /// <param name="e">Die <see cref="RowEventArgs"/> Instanz, welche die Ereignisdaten enthält.</param> private void OnUltraGridErnaehrungAfterRowInsert(object sender, RowEventArgs e) { }
private void ultraGrid1_BeforeRowActivate(object sender, RowEventArgs e) { preWeighTime = ultraGrid1.ActiveRow != null && ultraGrid1.ActiveRow.Index > -1 ? ultraGrid1.ActiveRow.Cells["FD_WEIGHTTIME"].Value.ToString() : ""; }
/// <summary> /// Handles the RowSelected event of the rGridBatch control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param> protected void rGridBatch_Edit(object sender, RowEventArgs e) { ShowDetailForm((int)rGridBatch.DataKeys[e.RowIndex]["id"]); }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { var fascicolo = (FascicoloCondominioDTO)e.Row.ListObject; fascicolo.Stato = "U"; _parentForm.SetDirty(true); _isDirty = true; }
/// <summary> /// Handles the Edit event of the gGroupType control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gGroupType_Edit(object sender, RowEventArgs e) { NavigateToLinkedPage("DetailPage", "groupTypeId", e.RowKeyId); }
private void scadenzeAfterRowUpdate(object sender, RowEventArgs e) { try { if(string.IsNullOrEmpty(e.Row.DataErrorInfo.RowError)) { var dto = e.Row.ListObject as ScadenzaFatturaDTO; if (dto != null) { var scad = dto; scad.Stato = "U"; if (scad.Pagamenti == null || scad.Pagamenti.Count == 0) scad.StatoScadenza = StatoSpesaEnum.Inserita; } } e.Row.DataErrorInfo.ResetRowError(); } catch (Exception ex) { _log.Error("Errore non previsto nell'aggiornamento di una scadenza - " + Utility.GetMethodDescription() + " - idSpesa:" + _spesa.ID + " - azienda:" + Security.Login.Instance.CurrentLogin().Azienda, ex); } }
protected virtual void OnToolTipRequired(MouseEventArgs aMouse) { if (this.RowEntered != null) { RowEventArgs e = new RowEventArgs(this.m_SelectedRowIdx, aMouse); this.ToolTipRequired(this, e); } }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { if(e.Row.IsDataRow && e.Row.ListObject is DocumentoDTO) { var documento = e.Row.ListObject as DocumentoDTO; if (_documentiDaAggiornare.Contains(documento)) _documentiDaAggiornare.Remove(documento); _documentiDaAggiornare.Add(documento); } }
private void listaContiPatrimonialiAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.IsDataRow) { if (e.Row.Band.Key == "ContoDTO" && e.Row.ListObject != null && e.Row.ListObject is ContoDTO) { var conto = (ContoDTO)e.Row.ListObject; conto.IsDeleteAllow = true; conto.CustomField = true; if (!_contiDaAggiornare.Contains(conto)) _contiDaAggiornare.Add(conto); e.Row.Cells["DeletedColumn"].Hidden = false; if (conto.Tipo == TipoContoEconomicoEnum.Undefined) conto.Tipo = TipoContoEconomicoEnum.Patrimoniale; } if (e.Row.Band.Key == "SottoConti" && e.Row.ListObject != null && e.Row.ListObject is SottoContoDTO) { var conto = (ContoDTO)e.Row.ParentRow.ListObject; if (!_contiDaAggiornare.Contains(conto)) _contiDaAggiornare.Add(conto); var sottoConto = (SottoContoDTO)e.Row.ListObject; if (conto.SottoConti == null) conto.SottoConti = new List<SottoContoDTO>(); if (!conto.SottoConti.Contains(sottoConto)) conto.SottoConti.Add(sottoConto); if(e.Row.Cells.Exists("DeletedColumn")) e.Row.Cells["DeletedColumn"].Hidden = false; } } }
private void listaBeforeRowActivate(object sender, RowEventArgs e) { if (e.Row.IsDataRow) OnSelectCondominio(new SelectCondominioArgs(getCondominioService().GetById(((DisposizionePagamentoDTO)e.Row.ListObject).IdCondominio, true), null)); }
private void listaContiAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.ListObject != null) { var movimento = e.Row.ListObject as MovimentoContabileGestioneDTO; if (movimento != null) movimento.Stato = "U"; } }
//private void conti_DoubleClickRow(object sender, DoubleClickRowEventArgs e) //{ // if (e.Row.IsDataRow && e.Row.Band.Index == 0) // { // if (e.Row.ListObject is ContoDTO) // { // ContoDTO conto = (ContoDTO)e.Row.ListObject; // DettaglioConto form = new DettaglioConto(conto); // form.Show(); // } // } //} private void listaContiPatrimonialiAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.IsDataRow) { var conto = e.Row.ListObject as ContoDTO; if (conto != null) { if (!_contiDaAggiornare.Contains(conto)) _contiDaAggiornare.Add(conto); conto.Tipo = TipoContoEconomicoEnum.Patrimoniale; } } }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { if (e.Row.ParentRow != null && e.Row.ParentRow.Band.Index == 0) setImportoConto(e.Row.ParentRow); }
private void listaRiepilogoAfterRowUpdate(object sender, RowEventArgs e) { _spesaUscente = 0; if (e.Row.Cells["ImportoUscente"].Value != null && e.Row.Cells["ImportoUscente"].Value != DBNull.Value) _spesaUscente += (decimal)e.Row.Cells["ImportoUscente"].Value;_spesaEntrante = 0; if (e.Row.Cells["ImportoEntrante"].Value != null && e.Row.Cells["ImportoEntrante"].Value != DBNull.Value) _spesaEntrante += (decimal)e.Row.Cells["ImportoEntrante"].Value; riepilogoSpeseSubentroDTOBindingSource.DataSource = getSubentroService().GetRiepilogoCalcoloSubentro(_esercizio, _personaUscente, _personaUscente.ID, _unitaImmobiliari, (List<CalcoloSubentroDTO>)calcoloSubentroDTOBindingSource.DataSource, _spesaUscente, _spesaEntrante, null); setRiepilogoImporti(); }
protected void gReport_RowSelected(object sender, RowEventArgs e) { Response.Redirect("~/Pastoral/Homebound/" + e.RowKeyId); }
private void listaVersamentiAfterRowUpdate(object sender, RowEventArgs e) { try { var versamento = e.Row.ListObject as VersamentoSoggettoDTO; if (versamento != null) { if (!_updatedRows.Contains(versamento)) _updatedRows.Add(versamento); } } catch (Exception ex) { _log.ErrorFormat("Errore dopo l'update di una riga - {0} - azienda:{1}", ex, Utility.GetMethodDescription(), Security.Login.Instance.CurrentLogin().Azienda); throw; } }
private void gridView_FocusedRowLoaded(object sender, RowEventArgs e) { if (IsAsyncServerMode()) { OnFocusedObjectChanged(); OnSelectionChanged(); } }
private void listaConti_BeforeRowActivate(object sender, RowEventArgs e) { sceltaFornitoreCombo1.CurrentEditRow = e.Row; }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { if(_condominio != null) _condominio.Stato = "U"; }
private void dettaglioSpesaAfterRowUpdate(object sender, RowEventArgs e) { calcolaImportiTotali(); }
private void listaAfterRowUpdate(object sender, RowEventArgs e) { if (_validateModello) { var modello = e.Row.ListObject as ModelloLetteraDTO; if (validateModello(modello) && !_updated.Contains(modello)) _updated.Add(modello); } }
/// <summary> /// Fired after a row receive the focus /// </summary> /// <param name="e"></param> protected virtual void OnFocusRowEntered(RowEventArgs e) { if (FocusRowEntered != null) FocusRowEntered(this, e); }
/// <summary> /// Handles the RowSelected event of the gBatchList control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param> protected void gBatchList_Edit(object sender, RowEventArgs e) { NavigateToLinkedPage("DetailPage", "batchId", e.RowKeyId); }