Картотека банков

1. Имя файла: onl_ban.gml

gml [ color "lightgray" pixmap { return( PMAPS.."purple_marble.png") }
    grid [ color "pink" ]
    frame [ name "onl_ban" maximizable "true" iconifiable "true"
	title "Картотека банков" modal "false"
	menubar [
	    include [
		src {
		    indexes = {
			{ name="b_mfo => 'MFO'       ", enable=true },
			{ name="b_ks => 'KS'       ", enable=true },
			count = 2
		    }
		    view = Bank
		    data = "bank"
		    base = bank
		    return( DEMO.."ils.gml")
		}
	    ]
	    include [
		src {
		    view = Bank
		    data = "bank"
		    base = bank
		    return( DEMO.."navi.gml")
		}
	    ]
	    menu [ str "Помощь" icon { return( ICONS.."help.png") }
		item [ str "Список полей"
		    src {
			fields = {
				"MFOS         C     6  0	- МФО старое",
				"ADR          C    29		- Город",
				"BAN          C     4		- Признак банка",
				"TEL          C     6  0	- Телетайп",
				"IND          C     6  0	- Почтовый индекс",
				"FKB          C     1  0	- Признак филиала",
				"MFO          C     9  0	- МФО",
				"NAI          C    40		- Наименование",
				"NRKC         C     9  0	- МФО РКЦ (=МФО для РКЦ)",
				"KR           C     2  0	- ????????????????????",
				"KS           C    20  0	- Кор. счет (0 для РКЦ)",
			    count = 11
			}
			title = "BANK.DBF"
			return( DEMO.."dbh.gml")
		    }
		]
	    ]
	    menu [ str "Выход" icon { return( ICONS.."exit.png") }
		item [ str "Выход"
		    include [
			str { onl_ban:close() }
		    ]
		]
	    ]
	]
	include [
	    src { return( DEMO.."l_ban.gml") }
	]
    ]
    rect [ color "black" ]
]

2. Имя файла: l_ban.gml

font [ name "Serif" size 16
    include [
	src { return( BASE.."bank_0.gml") }
    ]
    box [ type "col"
	include [
	    src { 
		task = "onl_ban.gml"
		data = "bank"
		base = bank
		return( DEMO.."header.gml")
	    }
	]
	list [ name "Bank" rows 20 cols 4
#	    border "boxraised" title "Банки"
	    selected [
		include [
		    str { bank.select = Bank:getSelectedIndex() + 1 }
		]
		emit [ signal "SELECTED" ]
	    ]
	    key [ name "F1"
		message [ title "Диалог" type "info" window "false"
		    str { return( "Номер записи " .. bank [bank.select].recno) }
		]
	    ]
	    include [
		src {
		    view = Bank
		    data = "bank"
		    base = bank
		    return( DEMO.."page.gml")
		}
	    ]
	    key [ name "ESCAPE"
		include [
		    str { onl_ban:close() }
		]
	    ]
	    head [
		field [ len 6 align "right" str "N п/п" ]
		field [ len 9 align "right" str "БИК" ]
		field [ len 20 str "Корреспондент.счет" ]
		field [ len 30 str "Наименование банка" ]
	    ]
	    repeat [ name "J" from 1 step 1 until { return( bank.count) }
		item [
		    field [ align "right" str { return( bank [J:getValue()].recno) } ]
		    field [ align "right" str { return( bank [J:getValue()].mfo) } ]
		    field [ str { return( bank [J:getValue()].ks) } ]
		    field [ str { return( bank [J:getValue()].nai) } ]
		]
	    ]
	    count { return( bank.count) }
	    select { return( bank.select - 1) }
	]
	box [ type "row"
	    label [ color "blue" str "Адрес:" ]
	    space [ type "rigid" w 10 ]
	    label [ name "Adr" len 30 border "boxsunken"
		str { return( bank [bank.select].adr) }
	    ]
	    space [ type "glue" ]
	    label [ color "blue" str "Индекс:" ]
	    space [ type "rigid" w 10 ]
	    label [ name "Ind" len 7 border "boxsunken"
		str { return( bank [bank.select].ind) }
	    ]
	    space [ type "glue" ]
	]
    ]
    event [ signal "SELECTED"
	include [
	    str {
		Base:refresh()
		Adr:refresh()
		Ind:refresh()
	    }
	]
    ]
]