コード例 #1
0
ファイル: EditContab.aspx.cs プロジェクト: dev191/le-fco
        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);
            }
        }
コード例 #2
0
ファイル: EditContab.aspx.cs プロジェクト: dev191/le-fco
        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);
            }
        }