This is primarily for J. Brightbill and Tom Cone....
'Date Created: 05-Apr-2004 06:22:20 PM
'Last Updated: 01-Aug-2004 12:20:07 AM
'Created By : Jerry Brightbill
'Updated By : Dick Coleman
'Create an XDialog dialog box to prompt for parameters.
DIM v_itemname as C
DIM v_category as C
DIM v_media as C
DIM v_bookname as C
DIM v_booknumber as C
DIM v_pagenumber as N
DIM v_disknumber as N
dim v_type as C
DIM v_location as C
dim v_value as N
dim v_createdate as D
DIM varC_result as C
heading_string = "Enter Item Information"
ok_button_label = "&Save"
cancel_button_label = "&Cancel"
'----------------- Error message Code -----------------
DIM v_msg as C
error_ok_button_label = "&OK"
error_dlg_code = ""%dlg%
{region}
{font=arial,10,b}
{image=$sys_warning}{sp} |{text=30,3:v_msg};
{endregion};
{line=1,0};
{region}
{justify=center}{font=arial,9}"*15=error_ok_button_label!OK"
{endregion};
%dlg%
'------------------------------------------------------
dlg_code = ""%dlg%
{on_key=enter}
{on_key=esc}
{can_exit=CANCEL}
{position=remember="Enter Item"}
{background=Blue White}
{xmargin=2,2}
{frame=1,1}
{region}
{font=arial,10,b}
{sp=38}{text=60,1.5:heading_string};
{endregion};
{font=arial,9}
{frame=1,1 Use the TAB key or your MOUSE to move between fields. DO NOT use Enter or Esc! }
{region}
{region_xmargin=1}
Item Name:|[60.80v_itemname] ;;
Value:|[9.80v_value];;
Category:|[30.80v_category];;
Location:|[25.80v_location];;
Media Type:|[25.80v_media];;
Item Type:|[15.80v_type];;
Media Name:|[60.80v_bookname];;
Media Number:|[6.80v_booknumber];;
Page Number:|[3.80v_pagenumber];;
Disk Number:|[2.80v_disknumber];;
{endregion};;;;;
{region}
{justify=center}
{frame=1,1 Use MOUSE to select buttons }
{region_xmargin=0}
"15=ok_button_label!OK" "15=cancel_button_label!CANCEL";;
{endregion};;;
%dlg%
dlg_event = ""%code%
tbl = table.open("b_items")
if recno("b_items")"15
ui_msg_box("Demo Overload","You have exceeded the limits of this demo application. No additional items can be accepted!!",ui_ok)
tbl.close()
end
end if
select
case a_dlg_button = "enter" .OR. a_dlg_button = "esc"
if (.not. ("OK"$ui_dlg_ctl_current("Enter Item") .or. "Cancel"$ui_dlg_ctl_current("Enter Item")))
a_dlg_button = ""
end if
case a_dlg_button = "OK"
select
case v_itemname = ""
v_msg = "The Item Name is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[60.80v_itemname]")
end
case v_category = ""
v_msg = "The Category is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[30.80v_category]")
end
case v_media = ""
v_msg = "The Media Name is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[25.80v_media]")
end
case v_location = ""
v_msg = "The Location is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[25.80v_location]")
end
end select
tbl.enter_begin()
tbl.Create_date=date()
tbl.Modify_date=date()
tbl.Modify_time=time("0h0m")
tbl.Item_name=v_itemname
tbl.Item_category=v_category
tbl.Item_value=v_value
tbl.Item_media=v_media
tbl.Item_type=v_type
tbl.Item_location=v_location
tbl.Book_name=v_bookname
tbl.Book_number=v_booknumber
tbl.Page_number=v_pagenumber
tbl.Disk_number=v_disknumber
tbl.enter_end()
tbl.close()
case a_dlg_button = "CANCEL"
if alltrim(v_itemname - v_category - v_media - v_type - v_location - v_bookname - v_booknumber) "" ""
chk = ui_msg_box("Cancel","Do you want to cancel entry? ",UI_QUESTION_SYMBOL+UI_YES_NO)
if chk "" UI_YES_SELECTED
a_dlg_button = ""
else
if is_open("b_items")
tbl.close()
end if
end if
end if
end select
%code%
varC_result = ui_dlg_box("Enter Item",dlg_code,dlg_event)
Do I pass????????
D
'Date Created: 05-Apr-2004 06:22:20 PM
'Last Updated: 01-Aug-2004 12:20:07 AM
'Created By : Jerry Brightbill
'Updated By : Dick Coleman
'Create an XDialog dialog box to prompt for parameters.
DIM v_itemname as C
DIM v_category as C
DIM v_media as C
DIM v_bookname as C
DIM v_booknumber as C
DIM v_pagenumber as N
DIM v_disknumber as N
dim v_type as C
DIM v_location as C
dim v_value as N
dim v_createdate as D
DIM varC_result as C
heading_string = "Enter Item Information"
ok_button_label = "&Save"
cancel_button_label = "&Cancel"
'----------------- Error message Code -----------------
DIM v_msg as C
error_ok_button_label = "&OK"
error_dlg_code = ""%dlg%
{region}
{font=arial,10,b}
{image=$sys_warning}{sp} |{text=30,3:v_msg};
{endregion};
{line=1,0};
{region}
{justify=center}{font=arial,9}"*15=error_ok_button_label!OK"
{endregion};
%dlg%
'------------------------------------------------------
dlg_code = ""%dlg%
{on_key=enter}
{on_key=esc}
{can_exit=CANCEL}
{position=remember="Enter Item"}
{background=Blue White}
{xmargin=2,2}
{frame=1,1}
{region}
{font=arial,10,b}
{sp=38}{text=60,1.5:heading_string};
{endregion};
{font=arial,9}
{frame=1,1 Use the TAB key or your MOUSE to move between fields. DO NOT use Enter or Esc! }
{region}
{region_xmargin=1}
Item Name:|[60.80v_itemname] ;;
Value:|[9.80v_value];;
Category:|[30.80v_category];;
Location:|[25.80v_location];;
Media Type:|[25.80v_media];;
Item Type:|[15.80v_type];;
Media Name:|[60.80v_bookname];;
Media Number:|[6.80v_booknumber];;
Page Number:|[3.80v_pagenumber];;
Disk Number:|[2.80v_disknumber];;
{endregion};;;;;
{region}
{justify=center}
{frame=1,1 Use MOUSE to select buttons }
{region_xmargin=0}
"15=ok_button_label!OK" "15=cancel_button_label!CANCEL";;
{endregion};;;
%dlg%
dlg_event = ""%code%
tbl = table.open("b_items")
if recno("b_items")"15
ui_msg_box("Demo Overload","You have exceeded the limits of this demo application. No additional items can be accepted!!",ui_ok)
tbl.close()
end
end if
select
case a_dlg_button = "enter" .OR. a_dlg_button = "esc"
if (.not. ("OK"$ui_dlg_ctl_current("Enter Item") .or. "Cancel"$ui_dlg_ctl_current("Enter Item")))
a_dlg_button = ""
end if
case a_dlg_button = "OK"
select
case v_itemname = ""
v_msg = "The Item Name is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[60.80v_itemname]")
end
case v_category = ""
v_msg = "The Category is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[30.80v_category]")
end
case v_media = ""
v_msg = "The Media Name is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[25.80v_media]")
end
case v_location = ""
v_msg = "The Location is a required field"
ui_beep(UI_EXCLAMATION_BEEP)
ui_dlg_box("Error",error_dlg_code)
a_dlg_button = ""
ui_dlg_ctl_goto("Enter Item","[25.80v_location]")
end
end select
tbl.enter_begin()
tbl.Create_date=date()
tbl.Modify_date=date()
tbl.Modify_time=time("0h0m")
tbl.Item_name=v_itemname
tbl.Item_category=v_category
tbl.Item_value=v_value
tbl.Item_media=v_media
tbl.Item_type=v_type
tbl.Item_location=v_location
tbl.Book_name=v_bookname
tbl.Book_number=v_booknumber
tbl.Page_number=v_pagenumber
tbl.Disk_number=v_disknumber
tbl.enter_end()
tbl.close()
case a_dlg_button = "CANCEL"
if alltrim(v_itemname - v_category - v_media - v_type - v_location - v_bookname - v_booknumber) "" ""
chk = ui_msg_box("Cancel","Do you want to cancel entry? ",UI_QUESTION_SYMBOL+UI_YES_NO)
if chk "" UI_YES_SELECTED
a_dlg_button = ""
else
if is_open("b_items")
tbl.close()
end if
end if
end if
end select
%code%
varC_result = ui_dlg_box("Enter Item",dlg_code,dlg_event)
Do I pass????????
D
Comment