protected void btnModifica_Click(object sender, ImageClickEventArgs e) { if (ModificaButtonClicked != null) { DealerBusiness dealerBusiness = new DealerBusiness(); int idDealer = Convert.ToInt32(IDDealerBusiness); string codiceDealer = txtCodiceDealer.Text; string ragioneSociale = txtRagioneSociale.Text; string indirizzo = txtIndirizzo.Text; ModificheDealerBusinessEventArgs args = new ModificheDealerBusinessEventArgs(idDealer, codiceDealer, ragioneSociale, indirizzo); ModificaButtonClicked(sender, args); } }
private void PopupModificheDealerBusiness_ModificaButtonClicked(object sender, UserControl.RagioniSocialiCorrelate.ModificheDealerBusinessEventArgs e) { try { AnagraficaDealerClassLib.DealerBusiness dealerBusiness = new AnagraficaDealerClassLib.DealerBusiness(); dealerBusiness.IDDealerBusiness = Convert.ToInt32(e.IDDealerBusiness); dealerBusiness.Indirizzo = e.Indirizzo; dealerBusiness.Nome = e.RagioneSociale; dealerBusiness.Codice = e.Codice; proxyMtd.UpdateDealerBusiness(dealerBusiness); DealerTableBusiness = proxyMtd.GetAllDealerBusiness(); gvDealerBusiness.DataSource = DealerTableBusiness; gvDealerBusiness.DataBind(); dealerBusinessUpdatePanel.Update(); } catch (Exception ex) { PopupMessaggio.ShowMsgBox(ex.Message, true); } }