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

        //MasterPageType = CurrentPageType;
        CurrentPage = Personas_grid;

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

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

        // Page main processing
        Personas_grid.Page_Main();
    }
        //
        // Validate form
        //
        public bool ValidateForm()
        {
            // Initialize
            gsFormError = "";

            // Check if validation required
            if (!EW_SERVER_VALIDATE) return (ew_Empty(gsFormError));
            if (ew_Empty(Areas.Area.FormValue))
            ew_AddMessage(ref gsFormError, Language.Phrase("EnterRequiredField") + " - " + Areas.Area.FldCaption);

            // Validate detail grid
            if (Areas.CurrentDetailTable == "Personas" && Personas.DetailEdit) {
            Personas_grid = new cPersonas_grid(ParentPage); // Get detail page object (grid)
            Personas_grid.ValidateGridForm();
            Personas_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;
        }
        //
        //  Page class constructor
        //
        public cAreas_edit(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "edit";
            m_PageObjName = "Areas_edit";
            m_PageObjTypeName = "cAreas_edit";

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

            // Initialize table object
            if (Areas == null)
                Areas = new cAreas(this);
            if (Personas_grid == null)
                Personas_grid = new cPersonas_grid(ParentPage);
            if (Personas == null)
                Personas = new cPersonas(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

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

            if (Conn == null)
                Conn = new cConnection();
        }