zhorik5 писал(а):
у меня блок с MATH число строк для другой формыzhorik5 писал(а):
переделал свою форму по образу и подобию вроде работаетUPDATE kontragenti SET [nazvanie]='%1',
[polnoe_naimenovanie]='%2',
[angl_nazvanie]='%3',
[adres] ='%4',
[inn] ='%5',
[kpp] ='%6',
[raschetniy_schet] ='%7',
[bank] ='%8',
[kor_schet] ='%9',
[bik] ='%10',
[email] ='%11',
[telefon] ='%12',
[kontact_lico] ='%13',
[ispolzovat_price] ='%14',
[cod_clienta] ='%15',
[zapravshik] ='%16',
[primechanie] ='%17'
WHERE [nomer]=(SELECT max(nomer) FROM kontragenti);
--- Добавлено в 2017-12-11 18:30:53
А вроде можно и так: (строка в FormatStr)
INSERT INTO kontragenti values((SELECT max(nomer)+1 from kontragenti),'%1','%2','%3','%4','%5','%6','%7','%8','%9','%10','%11','%12','%13','%14','%15','%16','%17');
без всякой предвариловки.
--- Добавлено в 2017-12-11 18:46:27
Вот как-то так
Add(ChildForm,9467718,756,189)
{
FirstUsage=0
}
BEGIN_SDK
Add(EditMulti,2379941,21,7)
{
EventCount=6
WorkCount=1
DataCount=1
VarCount=2
Width=944
Height=767
link(doWork1,14021805:doShowModal,[(115,13)(115,237)])
link(Var1,16034921:Index,[(27,629)(741,629)])
link(Var2,13311944:Var1,[(34,649)])
}
Add(MainForm,14021805,210,203)
{
Left=35
Top=105
Width=807
Height=383
Visible=1
Point(onClose)
Point(doShowModal)
link(onActivate,11585841:doEvent1,[(306,209)(306,139)])
link(onDeactivate,2379941:onEvent4,[(775,216)(775,34)])
link(onCreate,15049992:doOpen,[])
link(onClose,15049992:doClose,[])
}
Add(Edit,8193515,616,280)
{
Left=220
Top=210
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,4896915,623,315)
{
Left=220
Top=245
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,7707199,630,350)
{
Left=220
Top=280
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,15698063,651,455)
{
Left=615
Top=70
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Label,3448287,910,168)
{
Left=10
Top=10
Width=154
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Название фирмы партнера"
}
Add(Label,12074310,903,217)
{
Left=10
Top=50
Width=176
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Полное Наименование фирмы"
}
Add(Label,16429677,903,259)
{
Left=10
Top=85
Width=156
Height=39
Font=[Times New Roman,10,1,0,204]
Caption="Английское Наименование (Обязательно!)"
}
Add(Label,4932833,910,308)
{
Left=10
Top=140
Width=39
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Адрес"
}
Add(Label,1072301,903,350)
{
Left=10
Top=170
Width=31
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="ИНН"
}
Add(Label,11865404,910,392)
{
Left=10
Top=210
Width=30
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="КПП"
}
Add(Label,3469290,910,476)
{
Left=10
Top=245
Width=91
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Расчетный счет"
}
Add(Label,15736005,924,525)
{
Left=410
Top=10
Width=56
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Кор. счет"
}
Add(Label,1739345,910,434)
{
Left=10
Top=280
Width=30
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Банк"
}
Add(Button,7503969,84,378)
{
Left=600
Top=305
Width=85
Height=35
Enabled=1
Caption="ОК"
Point(doEnabled)
link(onClick,13004597:doEvent1,[])
}
Add(Button,13679188,119,245)
{
Left=695
Top=305
Width=85
Height=35
Caption="ОТМЕНА"
link(onClick,13117481:doEvent1,[(167,251)(167,293)])
}
Add(Edit,8947271,581,63)
{
Left=220
Top=10
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
Point(doSetFocus)
link(onChange,13466306:doMultiReplace,[(622,69)(622,44)(513,44)(513,167)])
}
Add(DS_SQLite,15049992,259,217)
{
Name="global"
FileName=".\global.db"
WaitClose=0
link(onOpen,942555:doEvent1,[])
}
Add(Hub,14982477,196,385)
{
OutCount=3
link(onEvent1,13117481:doEvent3,[(222,391)(222,349)(170,349)(170,307)])
link(onEvent2,8675650:doString,[(284,398)(284,699)])
link(onEvent3,2379941:onEvent1,[(724,405)(724,13)])
}
Add(Hub,13117481,182,287)
{
InCount=3
link(onEvent1,14021805:doClose,[(203,293)(203,230)])
}
Add(Label,772740,917,518)
{
Left=410
Top=40
Width=28
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="БИК"
}
Add(Label,71411,910,511)
{
Left=410
Top=70
Width=44
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="E@mail"
}
Add(Label,9676561,903,504)
{
Left=410
Top=135
Width=98
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Контактное лицо"
}
Add(Label,3842413,896,497)
{
Left=410
Top=105
Width=53
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Телефон"
}
Add(Label,1664523,889,490)
{
Left=410
Top=175
Width=116
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Использовать прайс"
}
Add(Label,13024792,882,483)
{
Left=410
Top=210
Width=71
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Код клиента"
}
Add(Label,11531711,875,476)
{
Left=410
Top=245
Width=148
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Закрепленный заправщик"
}
Add(Label,5124501,868,469)
{
Left=410
Top=280
Width=75
Height=19
Font=[Times New Roman,10,0,0,204]
Caption="Примечание"
}
Add(Edit,9848688,595,161)
{
Left=220
Top=90
Width=160
Font=[Times New Roman,10,0,0,204]
Enabled=1
Text=""
Point(doSetFocus)
link(onChange,4175374:In,[])
}
Add(ComboBox,11496103,875,609)
{
Left=615
Top=245
Width=160
Height=21
Font=[Times New Roman,10,0,0,204]
Strings=#3:Нет|
Text=""
DataType=1
Point(Handle)
Point(Index)
Point(onSelect)
}
Add(Edit,11868430,588,98)
{
Left=220
Top=50
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,3983540,756,532)
{
Left=615
Top=210
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,797990,917,637)
{
Left=615
Top=280
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,7914082,658,490)
{
Left=615
Top=105
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,9688994,665,532)
{
Left=615
Top=135
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,9606788,637,385)
{
Left=615
Top=10
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,12710250,644,420)
{
Left=615
Top=40
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,6824894,602,196)
{
Left=220
Top=130
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(Edit,8358532,609,238)
{
Left=220
Top=170
Width=160
Font=[Times New Roman,10,0,0,204]
Text=""
}
Add(DSC_Exec,1263187,840,693)
{
DSManager="parent.parent.global"
}
Add(DSC_Query,14112046,812,609)
{
SQL="SELECT fio FROM sotrudniki"
DSManager="parent.parent.global"
link(onQuery,11496103:doAdd,[])
}
Add(LineBreak,4208848,770,609)
{
link(Out,14112046:doQuery,[])
Primary=[8707490,-434,-392]
}
Add(GetDataEx,13311944,581,644)
{
link(Data,8947271:Text,[])
}
Add(ComboBox,16034921,714,490)
{
Left=615
Top=170
Width=160
Height=21
Font=[Times New Roman,10,0,0,204]
Text=""
DataType=1
Point(Handle)
Point(Index)
Point(onSelect)
}
Add(Hub,942555,308,217)
{
link(onEvent1,8707490:In,[])
link(onEvent2,13711868:In,[])
}
Add(DSC_Query,1590475,749,336)
{
SQL="SELECT naimenovanie FROM kategory_price"
DSManager="parent.parent.global"
link(onQuery,16034921:doAdd,[(821,342)(821,496)])
}
Add(LineBreak,15005630,693,336)
{
link(Out,1590475:doQuery,[])
Primary=[13711868,-357,-112]
}
Add(Button,1036844,105,455)
{
Left=515
Top=305
Width=75
Height=35
Enabled=1
Caption="Добавить"
Point(doEnabled)
link(onClick,7304843:doEvent1,[(145,461)(145,440)])
}
Add(Hub,13004597,133,378)
{
link(onEvent1,13117481:doEvent2,[(165,384)(165,300)])
link(onEvent2,3255284:doEvent1,[])
}
Add(Hub,3255284,168,385)
{
InCount=2
OutCount=1
link(onEvent1,14982477:doEvent1,[])
}
Add(ChildForm,8146851,308,574)
{
FirstUsage=0
link(onEvent1,2379941:onEvent5,[(789,580)(789,41)])
link(onEvent2,2379941:onEvent6,[(789,587)(789,48)])
link(Data1,5483149:Var1,[(314,383)])
}
BEGIN_SDK
Add(EditMulti,14390227,21,21)
{
EventCount=2
WorkCount=1
DataCount=1
Width=1315
Height=788
link(doWork1,1590239:doShowModal,[(73,27)(73,195)])
}
Add(ChildPanel,12795484,28,203)
{
link(onEvent1,11900977:doEvent2,[(68,209)(68,321)(94,321)(94,244)])
link(onEvent2,7738847:doEvent1,[(65,216)(65,265)])
link(onEvent3,16211581:doEvent2,[])
}
BEGIN_SDK
Add(EditMulti,5115687,21,21)
{
EventCount=3
}
Add(Panel,11032594,35,105)
{
Top=472
Width=364
Height=41
Align=4
}
Add(Button,12090924,44,30)
{
Left=10
Top=5
Width=70
Height=35
Caption="Сохранить"
link(onClick,5115687:onEvent1,[(198,36)(198,27)])
}
Add(Button,2547117,171,51)
{
Left=265
Top=5
Width=70
Height=35
Caption="Отмена"
link(onClick,5115687:onEvent2,[(262,57)(262,34)])
}
Add(Button,9624714,249,112)
{
Left=145
Top=5
Width=60
Height=35
Caption="Очистить"
link(onClick,5115687:onEvent3,[(287,118)(287,41)])
}
END_SDK
Add(ChildPanel,15552921,399,301)
{
link(onEvent1,6215464:doMT_Add,[(461,307)(461,244)])
}
BEGIN_SDK
Add(EditMulti,4159810,21,21)
{
EventCount=1
}
Add(Panel,7378138,35,105)
{
Width=364
Height=55
Align=2
BorderWidth=0
BevelWidth=0
}
Add(Label,1814261,69,27)
{
Left=5
Top=10
Width=91
Height=17
Caption="Заполнить ценой"
}
Add(DSC_Query,8435477,203,42)
{
SQL="SELECT nomer, vid_rabot, model, partner FROM price"
DSManager="parent.parent.parent.parent.global"
link(onQuery,10526459:doEvent1,[(275,48)(275,90)])
}
Add(Button,15192029,140,42)
{
Left=235
Top=5
Width=115
Height=25
Caption="Партнер"
link(onClick,8435477:doQuery,[])
}
Add(Button,13220521,140,91)
{
Left=105
Top=5
Width=60
Height=25
Caption="Розница"
link(onClick,8548199:doQuery,[])
}
Add(DSC_Query,8548199,203,91)
{
SQL="SELECT nomer, vid_rabot, model, roznica FROM price"
DSManager="parent.parent.parent.parent.global"
link(onQuery,10526459:doEvent2,[])
}
Add(Hub,10526459,280,84)
{
InCount=2
OutCount=1
link(onEvent1,4159810:onEvent1,[(308,90)(308,27)])
}
Add(Label,1868121,14,35)
{
Top=35
Width=365
Height=17
Caption="При заполнении прайса обязательно выберите любую строку таблицы"
}
END_SDK
Add(MainForm,1590239,140,161)
{
Left=35
Top=105
Width=372
Height=547
Visible=1
Point(doShowModal)
link(onActivate,14390227:onEvent1,[(754,167)(754,27)])
link(onCreate,14519631:doOpen,[(177,181)(177,230)])
}
Add(DS_SQLite,14519631,189,224)
{
Name="global"
FileName=".\global.db"
link(onOpen,6626196:doEvent1,[])
}
Add(StringTableMT,6215464,490,203)
{
Top=55
Width=364
Height=417
Align=5
Columns=#4:№=25|6:Услуга|6:Модель|7:Цена=35|
StrDelimiter="\9"
Redaction=0
Grid=0
IconsCheck=[]
MiscIcons=[]
Icons=[]
Point(doMT_Add)
Point(Strings)
Point(Index)
Point(onDblClick)
Point(Cell)
Point(onChange)
Point(onLineChange)
link(onClick,12604284:doEvent1,[])
link(onDblClick,12604284:doEvent2,[])
link(onChange,12604284:doEvent3,[])
link(onLineChange,12604284:doEvent4,[])
}
Add(Hub,6626196,252,224)
{
}
Add(Hub,11900977,105,231)
{
InCount=2
link(onEvent1,1590239:doClose,[(123,237)(123,188)])
link(onEvent2,14390227:onEvent2,[(727,244)(727,34)])
}
Add(Hub,7738847,70,259)
{
link(onEvent1,11900977:doEvent1,[(105,265)])
link(onEvent2,16211581:doEvent1,[(287,272)(287,216)])
}
Add(ArrayRW,494619,609,203)
{
link(onRead,12314249:doSplit,[])
link(Array,6215464:Strings,[(615,191)(563,191)(563,260)(510,260)])
}
Add(MultiStrPart,12314249,672,203)
{
Char="\9"
Count=4
link(onSplit,5925683:doString,[(716,209)(716,265)(660,265)(660,300)])
}
Add(FormatStr,5925683,672,294)
{
DataCount=4
Mask="UPDATE price SET '%2'='%4' WHERE nomer=%1"
Point(FString)
link(onFString,5428505:doExec,[])
link(Str1,12314249:Part1,[])
link(Str2,14390227:Data1,[(685,158)(27,158)])
link(Str4,12314249:Part4,[])
}
Add(DSC_Exec,5428505,742,294)
{
DSManager="parent.parent.parent.global"
link(SQL,5925683:FString,[(748,282)(713,282)(713,338)(678,338)])
}
Add(Hub,12604284,546,203)
{
InCount=4
OutCount=1
link(onEvent1,494619:doRead,[])
}
Add(Hub,16211581,427,210)
{
InCount=2
OutCount=1
link(onEvent1,6215464:doClear,[])
}
END_SDK
Add(Hub,7304843,154,434)
{
OutCount=3
link(onEvent1,3255284:doEvent2,[(180,440)(180,419)(156,419)(156,398)])
link(onEvent2,8146851:doWork1,[(238,447)(238,580)])
link(onEvent3,7503969:doEnabled,[(180,454)(180,419)(72,419)(72,384)])
}
Add(Hub,11585841,371,133)
{
OutCount=3
link(onEvent1,5259777:doEvent1,[(451,139)(451,76)])
link(onEvent2,2379941:onEvent3,[(847,146)(847,27)])
}
Add(Hub,5259777,546,70)
{
link(onEvent1,8947271:doText,[(570,76)(570,69)])
link(onEvent2,8947271:doSetFocus,[])
}
Add(LineBreak,8843422,35,455)
{
link(Out,1643356:doEvent1,[])
Primary=[4175374,616,-294]
}
Add(CheckBox,16362267,84,511)
{
Left=5
Top=315
Width=505
Caption="Если Вы заполнили все данные поставьте пожалуйста флажок и нажмите кнопку ДОБАВИТЬ"
link(onCheck,1643356:doEvent2,[(128,517)(128,493)(72,493)(72,468)])
}
Add(Hub,1643356,84,455)
{
InCount=2
OutCount=1
link(onEvent1,1036844:doEnabled,[])
}
Add(FormatStr,8675650,581,693)
{
DataCount=17
Mask="INSERT INTO kontragenti values((SELECT max(nomer)+1 from kontragenti),'%1','%2','%3','%4','%5','%6','%7','%8','%9','%10','%11','%12','%13','%14','%15','%16','%17'); "
link(onFString,1263187:doExec,[])
link(Str1,13311944:Var2,[])
link(Str2,11868430:Text,[])
link(Str3,5483149:Var2,[])
link(Str4,6824894:Text,[])
link(Str5,8358532:Text,[])
link(Str6,8193515:Text,[])
link(Str7,4896915:Text,[])
link(Str8,7707199:Text,[])
link(Str9,9606788:Text,[])
link(Str10,12710250:Text,[])
link(Str11,15698063:Text,[])
link(Str12,7914082:Text,[])
link(Str13,9688994:Text,[])
link(Str14,16034921:String,[(678,616)(727,616)])
link(Str15,3983540:Text,[(685,653)(762,653)])
link(Str16,11496103:String,[(692,672)(888,672)])
link(Str17,797990:Text,[(699,683)(923,683)])
}
Add(GetDataEx,5483149,595,378)
{
link(Data,9848688:Text,[])
}
Add(MultiReplace,13466306,539,161)
{
ReplaceList="а=a; б=b; в=v; г=g; д=d; е=e; ё=yo; ж=zh; з=z;\r\nи=i; й=y; к=k; л=l; м=m; н=n; о=o; п=p; р=r;\r\nс=s; т=t; у=u; ф=f; х=h; ц=c; ч=ch; ш=sh; щ=shch;\r\nь='; ы=q; ъ='; э=ye; ю=yu; я=ya; А=A; Б=B; В=V;\r\nГ=G; Д=D; Е=E; Ё=Yo; Ж=Zh; З=Z; И=I; Й=Y; К=K;\r\nЛ=L; М=M; Н=N; О=O; П=P; Р=R; С=S; Т=T; У=U;\r\nФ=F; Х=H; Ц=C; Ч=Ch; Ш=Sh; Щ=Shch; Ь='; Ы=Q; Ъ=';\r\nЭ=Ye; Ю=Yu; Я=Ya;"
link(onResult,9848688:doText,[])
}
END_SDK