www.pudn.com > Source.rar > Unit16.pas, change:2007-02-04,size:2408b


unit Unit16; 
 
interface 
 
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,  
  Buttons, ExtCtrls, Mask, DBCtrls, Dialogs, ExtDlgs, ComCtrls,db; 
 
type 
  TSoceite = class(TForm) 
    BitBtn1: TBitBtn; 
    BitBtn2: TBitBtn; 
    OpenPicture: TOpenPictureDialog; 
    PageControl1: TPageControl; 
    TabSheet1: TTabSheet; 
    TabSheet2: TTabSheet; 
    DBImage1: TDBImage; 
    BitBtn3: TBitBtn; 
    BitBtn4: TBitBtn; 
    DBEdit11: TDBEdit; 
    Label12: TLabel; 
    Label13: TLabel; 
    DBText1: TDBText; 
    Label1: TLabel; 
    DBEdit1: TDBEdit; 
    Label2: TLabel; 
    DBEdit2: TDBEdit; 
    Label14: TLabel; 
    DBEdit12: TDBEdit; 
    Label3: TLabel; 
    DBEdit13: TDBEdit; 
    Label15: TLabel; 
    Label16: TLabel; 
    Label17: TLabel; 
    DBEdit14: TDBEdit; 
    DBEdit15: TDBEdit; 
    DBEdit16: TDBEdit; 
    Label18: TLabel; 
    Label7: TLabel; 
    DBEdit6: TDBEdit; 
    Label11: TLabel; 
    DBEdit10: TDBEdit; 
    Label4: TLabel; 
    GroupBox2: TGroupBox; 
    Label8: TLabel; 
    Label9: TLabel; 
    Label10: TLabel; 
    DBEdit7: TDBEdit; 
    DBEdit8: TDBEdit; 
    DBEdit9: TDBEdit; 
    Panel1: TPanel; 
    Shape1: TShape; 
    Label5: TLabel; 
    Image1: TImage; 
    procedure BitBtn1Click(Sender: TObject); 
    procedure BitBtn2Click(Sender: TObject); 
    procedure BitBtn3Click(Sender: TObject); 
    procedure BitBtn4Click(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  Soceite: TSoceite; 
 
implementation 
 
uses Unit3; 
 
{$R *.dfm} 
 
procedure TSoceite.BitBtn1Click(Sender: TObject); 
begin 
if data.Dossiers.State=dsedit then 
data.Dossiers.Post; 
close; 
end; 
 
procedure TSoceite.BitBtn2Click(Sender: TObject); 
begin 
data.Dossiers.Cancel; 
close; 
end; 
 
procedure TSoceite.BitBtn3Click(Sender: TObject); 
begin 
if OpenPicture.Execute then 
data.DossiersLOGO.LoadFromFile(OpenPicture.FileName); 
 
end; 
 
procedure TSoceite.BitBtn4Click(Sender: TObject); 
begin 
data.DossiersLOGO.Clear; 
end; 
 
procedure TSoceite.FormClose(Sender: TObject; var Action: TCloseAction); 
begin 
if data.Dossiers.State=dsedit Then Begin 
    if MessageDlg('Confirmer la sauvegarde',mtConfirmation, [mbYes, mbNo], 0) = mrYes then 
    data.Dossiers.Post ELSE data.Dossiers.Cancel; 
end; 
end; 
 
end.