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
//Get or set BO fields | |
//Instuctions of how to get the dataset follow the link | |
//https://wiki.mysoftwarehouse.gr/docs/enotites/mysoho-ergaleia/customization/mysoho-scripting/business-object-scripting/ | |
// | |
//When you are on frm.CurrentView = fvDetail you can use for set | |
procedure setVals; | |
begin | |
itetrnds.Append; | |
itetrnds.FieldByname('itemid').value:= 12345678; | |
itetrnds.FieldByname('SizeCodeID').value:= 10; |
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'); |
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
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
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 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
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
//Συναλλαγές, εργασία: "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
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
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 |
NewerOlder