//
    // ASP.NET Page_Load event
    //
    protected void Page_Load(object sender, System.EventArgs e)
    {
        // Page init
        VehiculosAutorizados_grid = new cVehiculosAutorizados_grid(this);
        MasterPage = CurrentPage;

        //MasterPageType = CurrentPageType;
        CurrentPage = VehiculosAutorizados_grid;

        //CurrentPageType = VehiculosAutorizados_grid.GetType();
        VehiculosAutorizados_grid.Page_Init();

        // Set buffer/cache option
        Response.Buffer = EW_RESPONSE_BUFFER;

        // Page main processing
        VehiculosAutorizados_grid.Page_Main();
    }
        //
        //  Page class constructor
        //
        public cPersonas_add(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "add";
            m_PageObjName = "Personas_add";
            m_PageObjTypeName = "cPersonas_add";

            // Initialize language object
            if (Language == null)
                Language = new cLanguage(this);

            // Initialize table object
            if (Personas == null)
                Personas = new cPersonas(this);
            if (Areas == null)
                Areas = new cAreas(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);
            if (VehiculosAutorizados_grid == null)
                VehiculosAutorizados_grid = new cVehiculosAutorizados_grid(ParentPage);
            if (VehiculosAutorizados == null)
                VehiculosAutorizados = new cVehiculosAutorizados(this);

            // Table
            m_TableName = "Personas";
            m_Table = Personas;
            CurrentTable = Personas;

            //CurrentTableType = Personas.GetType();
            // Initialize URLs
            // Connect to database

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        // Validate form
        //
        public bool ValidateForm()
        {
            // Initialize
            gsFormError = "";

            // Check if validation required
            if (!EW_SERVER_VALIDATE) return (ew_Empty(gsFormError));
            if (ew_Empty(Personas.IdArea.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Personas.IdArea.FldCaption);
            if (ew_Empty(Personas.IdCargo.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Personas.IdCargo.FldCaption);
            if (ew_Empty(Personas.Documento.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Personas.Documento.FldCaption);
            if (ew_Empty(Personas.Persona.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Personas.Persona.FldCaption);
            if (ew_Empty(Personas.Activa.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Personas.Activa.FldCaption);

            // Validate detail grid
            if (Personas.CurrentDetailTable == "VehiculosAutorizados" && VehiculosAutorizados.DetailAdd) {
            VehiculosAutorizados_grid = new cVehiculosAutorizados_grid(ParentPage); // Get detail page object (grid)
            VehiculosAutorizados_grid.ValidateGridForm();
            VehiculosAutorizados_grid.Dispose();
            }

            // Return validate result
            bool Valid = (ew_Empty(gsFormError));

            // Form_CustomValidate event
            string sFormCustomError = "";
            Valid = Valid && Form_CustomValidate(ref sFormCustomError);
            ew_AddMessage(ref gsFormError, sFormCustomError);
            return Valid;
        }