Вверх ↑
Ответов: 254
Рейтинг: 6
#1: 2014-01-31 19:13:28 ЛС | профиль | цитата
не думал, что все так сложно
------------ Дoбавленo в 19.13:
Add(MainForm,11607186,147,28)
{
 Width=1001
 Height=669
 Caption="график вакцинации"
 Position=1
 Point(doVisible)
 Point(onClose)
 link(onCreate,7309284:doEvent1,[])
}
Add(ComboBox,11406695,21,420)
{
 Left=330
 Top=115
 Width=110
 Height=21
 Strings=#8:корпус 1|8:корпус 2|8:корпус 3|8:корпус 4|8:корпус 5|
 Text="корпус"
 Point(EditText)
}
Add(MTStrTbl,5113738,518,301)
{
 @Color=43520
 Left=20
 Top=150
 Width=255
 Height=455
 Name="вакцинация"
 Columns=#15:мероприятие=150|17:возраст (дни)=100|
 Redaction=0
 TextAlign=2
 Point(doSetFocus)
 Point(onSelect)
 Point(doVisible)
}
Add(Edit,16767801,126,252)
{
 Left=96
 Top=75
 Width=185
 Text="0"
 DataType=2
}
Add(Button,12084787,7,315)
{
 Left=45
 Top=110
 Width=195
 Height=30
 TabOrder=-1
 Caption="добавить"
 Point(doSetFocus)
 link(onClick,6806148:doEvent2,[])
}
Add(ComboBox,4864849,84,252)
{
 Left=80
 Top=45
 Width=200
 Height=21
 Text="выбрать"
 Point(EditText)
 link(Str,147619:Text,[])
}
Add(DatePicker,9450650,133,406)
{
 Left=595
 Top=115
 Width=110
 Height=21
 Font=[MS Sans Serif,6,0,0,1]
 Point(doLeft)
 Point(doTop)
 Point(doSetFocus)
 Point(doBringToFront)
 Point(DateTime)
 Point(doSendToBack)
 Point(DateInt)
}
Add(DS_SQLite,6991059,266,42)
{
 @Color=5636095
 Name="11"
 FileName="777.db"
 Point(onError)
 link(onOpen,13846613:doExec,[])
}
Add(DSC_Exec,13846613,308,42)
{
 @Color=5636095
 SQL="CREATE TABLE IF NOT EXISTS [vakcina] (\r\n[id] INTEGER  PRIMARY KEY AUTOINCREMENT NOT NULL,\r\n[name] TEXT,\r\n[number] INTEGER);\r\n\r\nCREATE TABLE IF NOT EXISTS [grafikdata] (\r\n[id] INTEGER  PRIMARY KEY AUTOINCREMENT NOT NULL,\r\n[name] TEXT,\r\n[vozrast] REAL,\r\n[golov] REAL,\r\n[dtime] REAL,\r\n[dtime2] REAL);\r\n\r\nCREATE TABLE IF NOT EXISTS [grafikname] (\r\n[id] INTEGER  PRIMARY KEY AUTOINCREMENT NOT NULL,\r\n[name] TEXT,\r\n[vozrast1] TEXT,\r\n[golov1] TEXT,\r\n[ups] TEXT,\r\n[ups2] TEXT);"
 DSManager="11"
}
Add(DSC_Exec,7884957,210,301)
{
 @Color=5636095
 DSManager="11"
 link(onExec,8725656:doEvent2,[])
}
Add(FormatStr,8126504,119,308)
{
 DataCount=4
 Mask="INSERT INTO [vakcina] ([name], [number]) VALUES('%1', '%2');  "
 link(onFString,7884957:doExec,[(181,314)(181,307)])
 link(Str1,4864849:String,[(125,303)(97,303)])
 link(Str2,16767801:Text,[])
}
Add(MST_DB,953009,476,301)
{
 @Color=43520
 MSTControl="вакцинация"
 Point(doClear)
}
Add(DSC_Query,11511635,343,308)
{
 @Color=5636095
 SQL="SELECT [name], [number] from [vakcina]"
 DSManager="11"
 link(onQuery,953009:doAddRow,[(425,314)(425,307)])
}
Add(Label,2084213,84,147)
{
 Left=10
 Top=45
 Width=64
 Height=17
 Caption="мероприятие"
}
Add(Label,6975909,119,147)
{
 Left=10
 Top=75
 Width=78
 Height=17
 Caption="возраст (дней)"
}
Add(Hub,7309284,196,42)
{
 OutCount=4
 link(onEvent1,6991059:doOpen,[])
 link(onEvent2,10771421:doEvent1,[(262,55)(262,545)])
 link(onEvent3,8725656:doEvent1,[(256,62)(256,300)])
}
Add(Hub,6806148,56,308)
{
 InCount=2
 OutCount=1
 link(onEvent1,8126504:doString,[])
}
Add(Edit,269458,63,420)
{
 Left=715
 Top=115
 Width=95
 Text="100"
 DataType=2
}
Add(Edit,147619,84,203)
{
 Left=10
 Top=10
 Width=210
 Height=25
 Text="наименование"
}
Add(Button,11276043,35,252)
{
 Left=225
 Top=10
 Height=25
 Caption="ввод"
 link(onClick,4864849:doAdd,[])
}
Add(MTStrTbl,15761846,952,448)
{
 @Color=5592575
 Left=440
 Top=150
 Width=535
 Height=455
 Name="график"
 Columns=#6:корпус|4:дата|9:поголовье|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|0:|
 TextAlign=2
 Point(doVisible)
}
Add(Button,949453,70,546)
{
 Left=450
 Top=115
 Width=135
 TabOrder=-1
 Caption="рассчитать"
 link(onClick,11771530:doString,[])
}
Add(DSC_Exec,12182020,196,546)
{
 @Color=5636095
 DSManager="11"
 link(onExec,10771421:doEvent2,[])
}
Add(FormatStr,11771530,112,546)
{
 DataCount=4
 Mask="INSERT INTO [grafikdata] ([name], [golov], [dtime], [dtime2]) VALUES('%1', '%2', '%3', '%4');"
 link(onFString,12182020:doExec,[])
 link(Str1,11406695:String,[(118,537)(34,537)])
 link(Str2,269458:Text,[(125,496)(69,496)])
 link(Str3,9450650:DateInt,[(132,498)(146,498)])
}
Add(MST_DB,10553212,952,406)
{
 @Color=5592575
 MSTControl="график"
 Point(doClearAll)
 Point(doClear)
}
Add(Hub,10771421,315,539)
{
 InCount=2
 link(onEvent1,12922371:doQuery,[])
}
Add(DSC_Query,12922371,357,539)
{
 @Color=5636095
 SQL="SELECT \r\n[name],\r\nstrftime("%d.%m.%Y",1721424,5 + [dtime2]),\r\nstrftime('%J',date('now','localtime')) - strdtime('%J',date(dtime+1721424,5)),\r\n[golov],\r\nstrftime("%d.%m.%Y",1721424,5 + [dtime] + (SELECT [number] from [vakcina])) from [grafikdata];"
 DSManager="11"
 link(onQuery,5578107:doEvent1,[(415,545)(415,510)])
}
Add(Hub,8725656,301,294)
{
 InCount=2
 link(onEvent1,953009:doClear,[(395,300)(395,321)])
 link(onEvent2,11511635:doQuery,[(329,307)(329,314)])
}
Add(Hub,5578107,441,504)
{
 link(onEvent1,10553212:doClearAll,[(469,510)(469,426)])
 link(onEvent2,11633575:doSeparateMT,[])
}
Add(MT_MultiData,11633575,483,511)
{
 Count=5
 link(onData1,9985032:doStrCatDlm,[])
 link(onData2,14607746:doStrCatDlm,[])
 link(onData3,12415690:doStrCatDlm,[])
 link(onData4,1383077:doStrCatDlm,[])
 link(onData5,11906350:doStrCatDlm,[])
}
Add(StrCatDelim,9985032,539,511)
{
 Delimiter=","
 link(onStrCatDlm,9836615:doDelete,[(625,517)(625,376)])
 link(Str1,9985032:Result,[(545,499)(533,499)(533,555)(545,555)])
}
Add(StrCatDelim,14607746,588,518)
{
 link(onStrCatDlm,5968434:doEvent2,[])
 link(Str1,14607746:Result,[(594,506)(582,506)(582,562)(594,562)])
}
Add(StrCatDelim,12415690,637,525)
{
 link(onStrCatDlm,5968434:doEvent3,[])
 link(Str1,12415690:Result,[(643,513)(631,513)(631,569)(643,569)])
}
Add(StrCatDelim,1383077,686,532)
{
 link(onStrCatDlm,5968434:doEvent4,[])
 link(Str1,1383077:Result,[(692,520)(680,520)(680,576)(692,576)])
}
Add(StrCatDelim,11906350,735,539)
{
 link(onStrCatDlm,5968434:doEvent5,[])
 link(Str1,11906350:Result,[(741,527)(729,527)(729,583)(741,583)])
}
Add(Hub,5968434,784,511)
{
 InCount=5
 link(onEvent1,918758:doDelete,[])
}
Add(Delete,918758,819,511)
{
 link(onDelete,12399264:doMTString,[])
}
Add(MT_String,12399264,868,497)
{
 link(onResult,10553212:doAddRow,[(926,503)(926,412)])
}
Add(Delete,9836615,679,370)
{
 link(onDelete,10070428:doMTString,[])
}
Add(MT_String,10070428,728,356)
{
 link(onResult,10553212:doAddCols,[(856,362)(856,419)])
}



я собрал схему по картинке, но она не работает.
карма: 0

0