<%@ Register TagPrefix="Hersh" Namespace="Generic" Assembly="GenEditAdd"%>
<HTML>
<script language="VB" runat="server">

Sub page_load(sender As Object, e As EventArgs)



if NOT (isPostBack)
	dim s as string
	dim sql as string
	dim ls_CodeValue as string
	ls_CodeValue = Request.QueryString("code_value")
	
	
	'-- these properties discussed in chapter 7
	SQL = "Select * from masters"
	Gen.sql = SQL
	if cint(ls_codeValue) = 0 then
	  Gen.Where = ""
	else
	   Gen.where= "  Where code_value =" + ls_CodeValue
	end if
	Gen.display = "111110"
	
	Gen.KeyField = "code_value"
	Gen.KeyValue = ls_codeValue
	Gen.ExitPage = "masters.aspx"
	
	'--New properties developed in project 3
	Gen.Insertprocedure = "p_masters"
	Gen.Updateprocedure = "p_masters"
	
	Gen.RequiredFields = "0100000"
	Gen.editable = "1110000"

	s= "code_category;code_value;code_display;Select * from groups;"
	's=s + "code_display;code_display;code_display;Select * from masters;"
	Gen.DropDown = s
		
	Gen.FieldNames ="id;Account Name; Group;Type; Closing Bal;Opening Bal;"
	
end if
end sub



</script>

<BODY>
<form runat = "server" >
<Hersh:GenEditAdd id = "Gen" runat=server 
 ConnStr = "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=ASPNET;User ID=sa;"
 />


</form>

</BODY>
</HTML>
