unit noticias;
interface
uses
System.Collections, System.ComponentModel,
System.Data, System.Drawing, System.Web, System.Web.SessionState,
System.Web.UI, System.Web.UI.WebControls, System.Web.UI.HtmlControls,
System.Data.Common, Borland.Data.Provider, Borland.Data.Common,
System.Globalization, Borland.Data.Web, System.Configuration;
type
TWebNoticias = class(
System.Web.UI.Page)
{$REGION
'Designer Managed Code'}
strict private
procedure InitializeComponent;
procedure
DBWebGrid1_SelectedIndexChanged(sender: System.Object; e:
System.EventArgs);
procedure
DBWebDataSource1_OnApplyChangesRequest(sender: System.Object; e:
Borland.Data.Web.WebControlEventArgs);
procedure
DBWebCheckBox1_CheckedChanged(sender: System.Object; e:
System.EventArgs);
procedure Button1_Click(sender:
System.Object; e: System.EventArgs);
procedure
Button2_Click(sender: System.Object; e: System.EventArgs);
procedure DBWebNavigator1_Click(sender: System.Object; e:
Borland.Data.Web.DBWebButtonClickArgs);
{$ENDREGION}
strict
private
procedure Page_Load(sender: System.Object; e:
System.EventArgs);
strict protected
BdpDataAdapter1: Borland.Data.Provider.BdpDataAdapter;
bdpSelectCommand1: Borland.Data.Provider.BdpCommand;
bdpInsertCommand1: Borland.Data.Provider.BdpCommand;
bdpUpdateCommand1: Borland.Data.Provider.BdpCommand;
bdpDeleteCommand1: Borland.Data.Provider.BdpCommand;
bdpConnection1: Borland.Data.Provider.BdpConnection;
dsNoticias: System.Data.DataSet;
DataTable1:
System.Data.DataTable;
DataColumn1:
System.Data.DataColumn;
DataColumn2:
System.Data.DataColumn;
DataColumn3:
System.Data.DataColumn;
DataColumn4:
System.Data.DataColumn;
DataColumn5:
System.Data.DataColumn;
DataColumn6:
System.Data.DataColumn;
DataColumn7:
System.Data.DataColumn;
DataColumn8:
System.Data.DataColumn;
DataColumn9:
System.Data.DataColumn;
DataColumn10:
System.Data.DataColumn;
DataColumn11:
System.Data.DataColumn;
DBWebDataSource1:
Borland.Data.Web.DBWebDataSource;
DBWebGrid1:
Borland.Data.Web.DBWebGrid;
DBWebNavigator1:
Borland.Data.Web.DBWebNavigator;
DBWebMemo2:
Borland.Data.Web.DBWebMemo;
Button1:
System.Web.UI.WebControls.Button;
Button2:
System.Web.UI.WebControls.Button;
DBWebTextBox1:
Borland.Data.Web.DBWebTextBox;
DBWebTextBox3:
Borland.Data.Web.DBWebTextBox;
DBWebTextBox2:
Borland.Data.Web.DBWebTextBox;
DBWebMemo1:
Borland.Data.Web.DBWebMemo;
DBWebMemo3:
Borland.Data.Web.DBWebMemo;
DBWebMemo4:
Borland.Data.Web.DBWebMemo;
DBWebCheckBox1:
Borland.Data.Web.DBWebCheckBox;
procedure OnInit(e:
EventArgs); override;
private
{ Private
Declarations }
public
{ Public Declarations
}
end;
implementation
uses menu, Global;
{$REGION 'Designer Managed Code'}
/// <summary>
/// Required
method for Designer support -- do not modify
/// the contents of this method
with the code editor.
/// </summary>
procedure
TWebNoticias.InitializeComponent;
type
TArrayOfSystem_Data_Common_DataTableMapping = array of
System.Data.Common.DataTableMapping;
TArrayOfSystem_Data_Common_DataColumnMapping = array of
System.Data.Common.DataColumnMapping;
TArrayOfSystem_Data_DataTable =
array of System.Data.DataTable;
TArrayOfSystem_Data_DataColumn = array
of System.Data.DataColumn;
TArrayOfSystem_Data_Constraint = array of
System.Data.Constraint;
TArrayOfString = array of string;
TArrayOfWideChar = array of WideChar;
TArrayOfByte = array of
Byte;
var
configurationAppSettings:
System.Configuration.AppSettingsReader;
begin
configurationAppSettings :=
System.Configuration.AppSettingsReader.Create;
Self.BdpDataAdapter1 :=
Borland.Data.Provider.BdpDataAdapter.Create;
Self.dsNoticias :=
System.Data.DataSet.Create;
Self.DataTable1 :=
System.Data.DataTable.Create;
Self.DataColumn1 :=
System.Data.DataColumn.Create;
Self.DataColumn2 :=
System.Data.DataColumn.Create;
Self.DataColumn3 :=
System.Data.DataColumn.Create;
Self.DataColumn4 :=
System.Data.DataColumn.Create;
Self.DataColumn5 :=
System.Data.DataColumn.Create;
Self.DataColumn6 :=
System.Data.DataColumn.Create;
Self.DataColumn7 :=
System.Data.DataColumn.Create;
Self.DataColumn8 :=
System.Data.DataColumn.Create;
Self.DataColumn9 :=
System.Data.DataColumn.Create;
Self.DataColumn10 :=
System.Data.DataColumn.Create;
Self.DataColumn11 :=
System.Data.DataColumn.Create;
Self.bdpDeleteCommand1 :=
Borland.Data.Provider.BdpCommand.Create;
Self.bdpConnection1 :=
Borland.Data.Provider.BdpConnection.Create;
Self.bdpInsertCommand1 :=
Borland.Data.Provider.BdpCommand.Create;
Self.bdpSelectCommand1 :=
Borland.Data.Provider.BdpCommand.Create;
Self.bdpUpdateCommand1 :=
Borland.Data.Provider.BdpCommand.Create;
Self.DBWebDataSource1 :=
Borland.Data.Web.DBWebDataSource.Create;
(System.ComponentModel.ISupportInitialize(Self.BdpDataAdapter1)).BeginInit;
(System.ComponentModel.ISupportInitialize(Self.dsNoticias)).BeginInit;
(System.ComponentModel.ISupportInitialize(Self.DataTable1)).BeginInit;
(System.ComponentModel.ISupportInitialize(Self.DBWebDataSource1)).BeginInit;
Include(Self.DBWebGrid1.SelectedIndexChanged,
Self.DBWebGrid1_SelectedIndexChanged);
Include(Self.DBWebNavigator1.Click, Self.DBWebNavigator1_Click);
Include(Self.Button1.Click, Self.Button1_Click);
Include(Self.Button2.Click, Self.Button2_Click);
//
//
BdpDataAdapter1
//
Self.BdpDataAdapter1.Active :=
False;
Self.BdpDataAdapter1.DataSet := Self.dsNoticias;
Self.BdpDataAdapter1.DataTable := Self.DataTable1;
Self.BdpDataAdapter1.DeleteCommand := Self.bdpDeleteCommand1;
Self.BdpDataAdapter1.InsertCommand := Self.bdpInsertCommand1;
Self.BdpDataAdapter1.MaxRecords := 0;
Self.BdpDataAdapter1.MissingMappingAction :=
System.Data.MissingMappingAction.Error;
Self.BdpDataAdapter1.MissingSchemaAction :=
System.Data.MissingSchemaAction.Error;
Self.BdpDataAdapter1.SelectCommand := Self.bdpSelectCommand1;
Self.BdpDataAdapter1.StartRecord := 0;
Self.BdpDataAdapter1.TableMappings.AddRange(TArrayOfSystem_Data_Common_DataTableMapping.Create(System.Data.Common.DataTableMapping.Create('T'
+
'able', 'noticias',
TArrayOfSystem_Data_Common_DataColumnMapping.Create(System.Data.Common.DataColumnMapping.Create('i'
+
'd', 'id'), System.Data.Common.DataColumnMapping.Create('tit'
+
'ulo_br', 'titulo_br'), System.Data.Common.DataColumnMapping.Create('t'
+
'itulo_ing', 'titulo_ing'), System.Data.Common.DataColumnMapping.Create('t'
+
'itulo_esp', 'titulo_esp'), System.Data.Common.DataColumnMapping.Create('n'
+
'oticia_br', 'noticia_br'), System.Data.Common.DataColumnMapping.Create('n'
+
'oticia_ing', 'noticia_ing'), System.Data.Common.DataColumnMapping.Create('n'
+
'oticia_esp', 'noticia_esp'), System.Data.Common.DataColumnMapping.Create('i'
+
'magem', 'imagem'), System.Data.Common.DataColumnMapping.Create('d'
+
'ata_entrada', 'data_entrada'), System.Data.Common.DataColumnMapping.Create('d'
+
'ata_saida', 'data_saida'), System.Data.Common.DataColumnMapping.Create('h'
+
'tml', 'html')))));
Self.BdpDataAdapter1.UpdateCommand :=
Self.bdpUpdateCommand1;
//
// dsNoticias
//
Self.dsNoticias.DataSetName := 'NewDataSet';
Self.dsNoticias.Locale :=
System.Globalization.CultureInfo.Create('pt-BR');
Self.dsNoticias.Tables.AddRange(TArrayOfSystem_Data_DataTable.Create(Self.DataTable1));
//
// DataTable1
//
Self.DataTable1.Columns.AddRange(TArrayOfSystem_Data_DataColumn.Create(Self.DataColumn1,
Self.DataColumn2,
Self.DataColumn3, Self.DataColumn4, Self.DataColumn5,
Self.DataColumn6,
Self.DataColumn7, Self.DataColumn8, Self.DataColumn9,
Self.DataColumn10,
Self.DataColumn11));
Self.DataTable1.Constraints.AddRange(TArrayOfSystem_Data_Constraint.Create(System.Data.UniqueConstraint.Create('C'
+
'onstraint1',
TArrayOfString.Create('id'), True)));
Self.DataTable1.PrimaryKey :=
TArrayOfSystem_Data_DataColumn.Create(Self.DataColumn1);
Self.DataTable1.TableName := 'noticias';
//
//
DataColumn1
//
Self.DataColumn1.AllowDBNull :=
False;
Self.DataColumn1.ColumnName := 'id';
Self.DataColumn1.DataType := TypeOf(Integer);
//
//
DataColumn2
//
Self.DataColumn2.AllowDBNull :=
False;
Self.DataColumn2.ColumnName := 'titulo_br';
Self.DataColumn2.MaxLength := 200;
//
//
DataColumn3
//
Self.DataColumn3.AllowDBNull :=
False;
Self.DataColumn3.ColumnName := 'titulo_ing';
Self.DataColumn3.MaxLength := 200;
//
//
DataColumn4
//
Self.DataColumn4.AllowDBNull :=
False;
Self.DataColumn4.ColumnName := 'titulo_esp';
Self.DataColumn4.MaxLength := 50;
//
//
DataColumn5
//
Self.DataColumn5.AllowDBNull :=
False;
Self.DataColumn5.ColumnName := 'noticia_br';
Self.DataColumn5.DataType := TypeOf(TArrayOfWideChar);
//
// DataColumn6
//
Self.DataColumn6.AllowDBNull :=
False;
Self.DataColumn6.ColumnName := 'noticia_ing';
Self.DataColumn6.DataType := TypeOf(TArrayOfWideChar);
//
// DataColumn7
//
Self.DataColumn7.AllowDBNull :=
False;
Self.DataColumn7.ColumnName := 'noticia_esp';
Self.DataColumn7.DataType := TypeOf(TArrayOfWideChar);
//
// DataColumn8
//
Self.DataColumn8.ColumnName :=
'imagem';
Self.DataColumn8.DataType := TypeOf(TArrayOfByte);
//
// DataColumn9
//
Self.DataColumn9.AllowDBNull := False;
Self.DataColumn9.ColumnName :=
'data_entrada';
Self.DataColumn9.DataType :=
TypeOf(System.DateTime);
//
// DataColumn10
//
Self.DataColumn10.AllowDBNull := False;
Self.DataColumn10.ColumnName := 'data_saida';
Self.DataColumn10.DataType := TypeOf(System.DateTime);
//
// DataColumn11
//
Self.DataColumn11.AllowDBNull :=
False;
Self.DataColumn11.ColumnName := 'html';
Self.DataColumn11.MaxLength := 1;
//
//
bdpDeleteCommand1
//
Self.bdpDeleteCommand1.CommandOptions
:= nil;
Self.bdpDeleteCommand1.CommandText := 'DELETE FROM noticias
WHERE id = ?';
Self.bdpDeleteCommand1.CommandType :=
System.Data.CommandType.Text;
Self.bdpDeleteCommand1.Connection :=
Self.bdpConnection1;
Self.bdpDeleteCommand1.ParameterCount :=
(SmallInt(1));
Self.bdpDeleteCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i'
+
'dOriginal',
Borland.Data.Common.BdpType.Int32, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'id',
System.Data.DataRowVersion.Original, nil));
Self.bdpDeleteCommand1.SchemaName := nil;
Self.bdpDeleteCommand1.Transaction := nil;
Self.bdpDeleteCommand1.UpdatedRowSource :=
System.Data.UpdateRowSource.Both;
//
//
bdpConnection1
//
Self.bdpConnection1.ConnectionOptions :=
(string(configurationAppSettings.GetValue('b' +
'dpConnection1.ConnectionOptions', TypeOf(string))));
Self.bdpConnection1.ConnectionString :=
(string(configurationAppSettings.GetValue('b' +
'dpConnection1.ConnectionString', TypeOf(string))));
//
//
bdpInsertCommand1
//
Self.bdpInsertCommand1.CommandOptions
:= nil;
Self.bdpInsertCommand1.CommandText := 'INSERT INTO noticias
(id, titulo_br' +
', titulo_ing, titulo_esp, noticia_br, noticia_ing,
noticia_esp, imagem, d' +
'ata_entrada, data_saida, html ) VALUES ( ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
Self.bdpInsertCommand1.CommandType :=
System.Data.CommandType.Text;
Self.bdpInsertCommand1.Connection :=
Self.bdpConnection1;
Self.bdpInsertCommand1.ParameterCount :=
(SmallInt(11));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i'
+
'd', Borland.Data.Common.BdpType.Int32,
Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'id',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_br',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
200, 'titulo_br',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_ing',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
200, 'titulo_ing',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_esp',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(50)), (Byte(0)),
50, 'titulo_esp',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_br',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_br',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_ing',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_ing',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_esp',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_esp',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i'
+
'magem', Borland.Data.Common.BdpType.Blob,
Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'imagem',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('d'
+
'ata_entrada',
Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'data_entrada',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('d'
+
'ata_saida',
Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'data_saida',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('h'
+
'tml',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(1)), (Byte(0)),
1, 'html',
System.Data.DataRowVersion.Current, nil));
Self.bdpInsertCommand1.SchemaName := nil;
Self.bdpInsertCommand1.Transaction := nil;
Self.bdpInsertCommand1.UpdatedRowSource :=
System.Data.UpdateRowSource.None;
//
//
bdpSelectCommand1
//
Self.bdpSelectCommand1.CommandOptions
:= nil;
Self.bdpSelectCommand1.CommandText := 'SELECT id, titulo_br,
titulo_ing, t' +
'itulo_esp, noticia_br, noticia_ing, noticia_esp,
imagem, data_entrada, da' +
'ta_saida, html FROM noticias';
Self.bdpSelectCommand1.CommandType := System.Data.CommandType.Text;
Self.bdpSelectCommand1.Connection := Self.bdpConnection1;
Self.bdpSelectCommand1.ParameterCount := (SmallInt(0));
Self.bdpSelectCommand1.SchemaName := nil;
Self.bdpSelectCommand1.Transaction := nil;
Self.bdpSelectCommand1.UpdatedRowSource :=
System.Data.UpdateRowSource.None;
//
//
bdpUpdateCommand1
//
Self.bdpUpdateCommand1.CommandOptions
:= nil;
Self.bdpUpdateCommand1.CommandText := 'UPDATE noticias SET
titulo_br = ?, ' +
'titulo_ing = ?, titulo_esp = ?, noticia_br = ?,
noticia_ing = ?, noticia_' +
'esp = ?, imagem = ?, html = ? WHERE id =
?';
Self.bdpUpdateCommand1.CommandType :=
System.Data.CommandType.Text;
Self.bdpUpdateCommand1.Connection :=
Self.bdpConnection1;
Self.bdpUpdateCommand1.ParameterCount :=
(SmallInt(9));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_br',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
200, 'titulo_br',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_ing',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
200, 'titulo_ing',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t'
+
'itulo_esp',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(50)), (Byte(0)),
50, 'titulo_esp',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_br',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_br',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_ing',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_ing',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n'
+
'oticia_esp',
Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'noticia_esp',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i'
+
'magem', Borland.Data.Common.BdpType.Blob,
Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'imagem',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('h'
+
'tml',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(1)), (Byte(0)),
1, 'html',
System.Data.DataRowVersion.Current, nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i'
+
'dOriginal',
Borland.Data.Common.BdpType.Int32, Borland.Data.Common.BdpType.Unknown,
0,
System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
0, 'id',
System.Data.DataRowVersion.Original, nil));
Self.bdpUpdateCommand1.SchemaName := nil;
Self.bdpUpdateCommand1.Transaction := nil;
Self.bdpUpdateCommand1.UpdatedRowSource :=
System.Data.UpdateRowSource.None;
//
//
DBWebDataSource1
//
Self.DBWebDataSource1.AutoRefresh :=
True;
Self.DBWebDataSource1.AutoUpdateCache := True;
Self.DBWebDataSource1.DataSource := Self.DataTable1;
Self.DBWebDataSource1.ErrorDlgBackColor := System.Drawing.Color.Azure;
Self.DBWebDataSource1.ErrorDlgBorderColor := System.Drawing.Color.Red;
Self.DBWebDataSource1.ErrorDlgForeColor := System.Drawing.Color.Black;
Include(Self.DBWebDataSource1.OnApplyChangesRequest,
Self.DBWebDataSource1_OnApplyChangesRequest);
Include(Self.Load,
Self.Page_Load);
(System.ComponentModel.ISupportInitialize(Self.BdpDataAdapter1)).EndInit;
(System.ComponentModel.ISupportInitialize(Self.dsNoticias)).EndInit;
(System.ComponentModel.ISupportInitialize(Self.DataTable1)).EndInit;
(System.ComponentModel.ISupportInitialize(Self.DBWebDataSource1)).EndInit;
end;
{$ENDREGION}
procedure TWebNoticias.Page_Load(sender: System.Object; e:
System.EventArgs);
begin
// TODO: Put user code to initialize the
page here
// if not IsPostBack then
DataBind;
end;
procedure TWebNoticias.OnInit(e: EventArgs);
begin
//
// Required for Designer support
//
InitializeComponent;
inherited OnInit(e);
BdpDataAdapter1.Active:=true;
end;
procedure TWebNoticias.DBWebNavigator1_Click(sender: System.Object; e:
Borland.Data.Web.DBWebButtonClickArgs);
begin
if
dsNoticias.HasChanges then
BdpDataAdapter1.AutoUpdate;
end;
procedure TWebNoticias.Button2_Click(sender: System.Object; e:
System.EventArgs);
begin
if dsNoticias.HasChanges then
dsNoticias.RejectChanges;
end;
procedure TWebNoticias.Button1_Click(sender: System.Object; e:
System.EventArgs);
begin
if dsNoticias.HasChanges
then
BdpDataAdapter1.AutoUpdate;
end;
procedure TWebNoticias.DBWebCheckBox1_CheckedChanged(sender: System.Object;
e: System.EventArgs);
begin
end;
procedure TWebNoticias.DBWebDataSource1_OnApplyChangesRequest(sender:
System.Object;
e:
Borland.Data.Web.WebControlEventArgs);
begin
BdpDataAdapter1.update(dsNoticias);
end;
end.