<!--- If form is being submitted, commit changes to the database --->
<CFIF CGI.REQUEST_METHOD is "Post">
  <CFGRIDUPDATE
    DATASOURCE="ows"
    TABLENAME="Actors"
    GRID="ActorGrid"
    KEYONLY="No">
</CFIF>

<!--- Get list of Actors from database --->
<CFQUERY NAME="GetActors" DATASOURCE="ows">
  SELECT * FROM Actors
  ORDER BY NameFirst, NameLast
</CFQUERY>


<HTML>
<HEAD><TITLE>Orange Whip Studios Actors Stable</TITLE></HEAD>
<BODY>
<H2>Orange Whip Studios Actors Stable</H2>


<!--- Data entry form --->
<CFFORM ACTION="#CGI.SCRIPT_NAME#" METHOD="Post">

  <!--- Grid control for expenses --->
  <CFGRID 
    NAME="ActorGrid" 
    QUERY="GetActors" 
    WIDTH="425"
    HEIGHT="300"
    ROWHEADERS="No"
    COLHEADERBOLD="Yes"
    COLHEADERALIGN="CENTER"
    SELECTMODE="EDIT"
    INSERT="Yes"
    DELETE="Yes"
    INSERTBUTTON="Add New Actor"
    DELETEBUTTON="Delete Selected Actor">
    <!--- Hidden column for ActorID - does not actually get displayed --->
    <CFGRIDCOLUMN 
      NAME="ActorID"
      DISPLAY="No">
    <!--- Column for actor's first name --->
    <CFGRIDCOLUMN 
      NAME="NameFirst"
      HEADER="First Name"
      WIDTH="100">
    <!--- Column for actor's last name --->
    <CFGRIDCOLUMN 
      NAME="NameLast"
      HEADER="Last Name"
      WIDTH="100"
      BOLD="Yes">
    <!--- Column for actor's age--->
    <CFGRIDCOLUMN 
      NAME="Age"
      HEADER="Age"
      WIDTH="50"
      NUMBERFORMAT="999.">
    <!--- Column for babe factor --->
    <CFGRIDCOLUMN 
      NAME="IsTotalBabe"
      HEADER="Hottie"
      WIDTH="50"
      TYPE="boolean">
    <!--- Column for gender --->
    <CFGRIDCOLUMN 
      NAME="Gender"
      HEADER="Sex"
      WIDTH="100"
      VALUES="M,F"
      VALUESDISPLAY="Actor,Actress">
  </CFGRID>

  <P><INPUT TYPE="Submit" VALUE="Submit Changes">
</CFFORM>

</BODY>
</HTML>