private void Aggiorna() { Classi.ClassiAnagrafiche.Contab _Contab = new TheSite.Classi.ClassiAnagrafiche.Contab(); this.txtsdescrizione.DBDefaultValue = DBNull.Value; this.txtsdescrizione.Text = this.txtsdescrizione.Text.Trim(); int i_RowsAffected = 0; S_Controls.Collections.S_ControlsCollection _SCollection = new S_Controls.Collections.S_ControlsCollection(); _SCollection.AddItems(this.PanelEdit.Controls); try { if (itemId == 0) { i_RowsAffected = _Contab.Execute_rev(_SCollection, 0, "Insert"); } else { i_RowsAffected = _Contab.Execute_rev(_SCollection, itemId, "Update"); } Server.Transfer("Contab.aspx"); } catch (Exception ex) { string s_Err = ex.Message.ToString().ToUpper(); PanelMess.ShowError(s_Err, true); } }
private void btnsElimina_Click(object sender, System.EventArgs e) { Classi.ClassiAnagrafiche.Contab _Contab = new TheSite.Classi.ClassiAnagrafiche.Contab(); this.txtsdescrizione.DBDefaultValue = DBNull.Value; this.txtsdescrizione.Text = this.txtsdescrizione.Text.Trim(); int i_RowsAffected = 0; S_Controls.Collections.S_ControlsCollection _SCollection = new S_Controls.Collections.S_ControlsCollection(); _SCollection.AddItems(this.PanelEdit.Controls); try { i_RowsAffected = _Contab.Execute_rev(_SCollection, itemId, "Delete"); Server.Transfer("Contab.aspx"); } catch (Exception ex) { string s_Err = ex.Message.ToString().ToUpper(); PanelMess.ShowError(s_Err, true); } }