/*
 * Author       : futrera
 * Generated on : 23-Nov-2009 00:29:55
 * Version      : 3.0
 */
application "Congreso"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Home
    {
        form  Registro
        {
            
            ID1
            (
                displayname  =  "ID"
                type  =  number
                private  =  true
                defaultvalue  =  1
                width  =  20
            )

            must  have  Nombre
            (
                displayname  =  "NOMBRE"
                type  =  text
            )

            must  have  Apellido_Paterno
            (
                displayname  =  "APELLIDO PATERNO"
                type  =  text
            )

            must  have  Apellido_Materno
            (
                displayname  =  "APELLIDO MATERNO"
                type  =  text
            )

            Ocupaci_n
            (
                displayname  =  "OCUPACION"
                type  =  text
            )

            Empresa_o_Universidad
            (
                displayname  =  "EMPRESA O UNIVERSIDAD"
                type  =  text
            )

            must  have  Tel_fono
            (
                displayname  =  "TELEFONO"
                type  =  text
            )

            must  have  Correo
            (
                displayname  =  "CORREO"
                type  =  email
            )

            Expectativas
            (
                displayname  =  "COMENTARIOS"
                type  =  textarea
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "futrera@indexa.com.mx" 
                                From     :  zoho.adminuserid 
                                Subject  :  "Información" 
                                Message  :  input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Registro_View
        {
            displayname = "Registro View"
            show  all  rows  from  Registro 
            (
                Nombre
                Apellido_Paterno as "Apellido Paterno"
                Apellido_Materno as "Apellido Materno"
                Empresa_o_Universidad as "Empresa o Universidad"
                Tel_fono as "Teléfono"
                Correo
                ID1 as "ID"
                Ocupaci_n as "Ocupación"
                Expectativas
            )
            options
            (
                display rows = 100
            )
        }

    }

}
