This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure SendEmail; | |
var | |
fs: tfileStream; | |
s: string; | |
begin | |
if not IsNull(newvalue) then begin | |
fs:= tfilestream.create('c:\htmlEmail.html', fmOpenRead); | |
fs.read(s, fs.size); | |
fs.free; | |
prg.SendEmail('xxx@gmail.com', '', '', 'subject', s, '', true, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure msXMLTest; | |
var | |
root, | |
r: variant; | |
xDoc: variant; | |
begin | |
xDoc:= CreateOleObject('MSXML2.DOMDocument'); //microsoft xml | |
xDoc.async:= false; | |
xDoc.load('D:\demo\delphi\x8.xml'); //load from file | |
//xDoc.load('https://software-solutions-online.com/feed/'); //load from http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Procedure callAction; | |
var | |
act: TActAction; | |
begin | |
try | |
act:= TActAction.Create(nil); | |
act.load('{39929405-B13F-4113-930F-375FFF08E587}'); | |
act.run(true,true); | |
except | |
act.free; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Συναλλαγές, εργασία: "show φορμα" , στη φόρμα πατώντας κλικ εμφανίζει την εικόνα τους είδους (αν έχει) | |
var | |
f: Tform; | |
cImage: TImage; | |
procedure DoClick2; | |
begin | |
f.visible:= true; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
c: TWinControl; | |
ds :TDataSet | |
begin | |
c:= frm.GetControlFromLi('xxx'); | |
ds:= prg.QueryDataSet(frm; 'select ***', Params); | |
c.SetDS(ds) | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure init; | |
begin | |
ItemBarCodeDS.IndexFieldNames:= 'ColorCode;SizeID'; //by color and size | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure textXML; | |
var | |
fs: tfilestream; | |
s: string; | |
r: variant; | |
begin | |
//TEST table is "create table _testXML(id int identity not null primary key, data varchar(max), datXML XML)" | |
// | |
//upload xml file to server | |
fs:= tfilestream.create('D:\demo\delphi\Synapse https\test1\sendInvoice.xml',fmOpenRead); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure AddComboItem(c: TADC_ComboBox;const name, value: string); | |
begin | |
TstringList(c.propbyname['items']).add(name); | |
TstringList(c.propbyname['values']).add(value); | |
end; | |
procedure execForm; | |
var | |
btn: TControl; | |
cb: TADC_ComboBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function base64(user, pass, sn:string): string; | |
begin | |
result:= 'Basic '+ Prg.QueryValues('Select x.A from' | |
+' (SELECT CAST(:0 as varbinary(max)) FOR XML PATH(''''), BINARY BASE64) x(A)', user+':'+pass+'#'+sn); | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//When to be visible the task | |
Procedure UpdTrnCus(indi: TADC_IndirectlyTask); | |
begin | |
indi.Visible:= (frm.CurrentView = fvDetail); | |
end; | |
//Procedure for execute | |
procedure ExecTrnCus(); | |
begin | |
showmessage('bla bla bla'); |
OlderNewer