//
        //  Page class constructor
        //
        public cRegistrosVehiculos_add(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "add";
            m_PageObjName = "RegistrosVehiculos_add";
            m_PageObjTypeName = "cRegistrosVehiculos_add";

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

            // Initialize table object
            if (RegistrosVehiculos == null)
                RegistrosVehiculos = new cRegistrosVehiculos(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

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

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        //  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();
        }
        //
        //  Page class constructor
        //
        public cUserLevels_view(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "view";
            m_PageObjName = "UserLevels_view";
            m_PageObjTypeName = "cUserLevels_view";

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

            // Initialize table object
            if (UserLevels == null)
                UserLevels = new cUserLevels(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

            //CurrentTableType = UserLevels.GetType();
            // Initialize URLs

            string KeyUrl = "";
            if (ew_NotEmpty(ew_Get("UserLevelID"))) {
                RecKey["UserLevelID"] = ew_Get("UserLevelID");
                KeyUrl += "&UserLevelID=" + ew_UrlEncode(RecKey["UserLevelID"]);
            }
            ExportPrintUrl = PageUrl + "export=print" + KeyUrl;
            ExportHtmlUrl = PageUrl + "export=html" + KeyUrl;
            ExportExcelUrl = PageUrl + "export=excel" + KeyUrl;
            ExportWordUrl = PageUrl + "export=word" + KeyUrl;
            ExportXmlUrl = PageUrl + "export=xml" + KeyUrl;
            ExportCsvUrl = PageUrl + "export=csv" + KeyUrl;
            ExportPdfUrl = PageUrl + "export=pdf" + KeyUrl;

            // Connect to database
            if (Conn == null)
                Conn = new cConnection();

            // Export options
            ExportOptions = new cListOptions();
            ExportOptions.Tag = "span";
            ExportOptions.Separator = "  ";
        }
        // Constructor
        public cVehiculosAutorizados_preview(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;

            // Initialize language object
            Language = new cLanguage(this);
        }
        //
        //  Page class constructor
        //
        public cUserLevels_edit(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "edit";
            m_PageObjName = "UserLevels_edit";
            m_PageObjTypeName = "cUserLevels_edit";

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

            // Initialize table object
            if (UserLevels == null)
                UserLevels = new cUserLevels(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

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

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        //  Page class constructor
        //
        public cTiposDocumentos_delete(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "delete";
            m_PageObjName = "TiposDocumentos_delete";
            m_PageObjTypeName = "cTiposDocumentos_delete";

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

            // Initialize table object
            if (TiposDocumentos == null)
                TiposDocumentos = new cTiposDocumentos(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

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

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        //  Page class constructor
        //
        public cHistoricoVehiculos_search(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "search";
            m_PageObjName = "HistoricoVehiculos_search";
            m_PageObjTypeName = "cHistoricoVehiculos_search";

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

            // Initialize table object
            if (HistoricoVehiculos == null)
                HistoricoVehiculos = new cHistoricoVehiculos(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

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

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        //  Page class constructor
        //
        public cHistoricoVehiculos_list(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "list";
            m_PageObjName = "HistoricoVehiculos_list";
            m_PageObjTypeName = "cHistoricoVehiculos_list";

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

            // Initialize table object
            if (HistoricoVehiculos == null)
                HistoricoVehiculos = new cHistoricoVehiculos(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

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

            //CurrentTableType = HistoricoVehiculos.GetType();
            // Initialize URLs

            ExportPrintUrl = PageUrl + "export=print";
            ExportExcelUrl = PageUrl + "export=excel";
            ExportWordUrl = PageUrl + "export=word";
            ExportHtmlUrl = PageUrl + "export=html";
            ExportXmlUrl = PageUrl + "export=xml";
            ExportCsvUrl = PageUrl + "export=csv";
            ExportPdfUrl = PageUrl + "export=pdf";
            AddUrl = "HistoricoVehiculosadd.aspx";
            InlineAddUrl = PageUrl + "a=add";
            GridAddUrl = PageUrl + "a=gridadd";
            GridEditUrl = PageUrl + "a=gridedit";
            MultiDeleteUrl = "HistoricoVehiculosdelete.aspx";
            MultiUpdateUrl = "HistoricoVehiculosupdate.aspx";

            // Connect to database
            if (Conn == null)
                Conn = new cConnection();

            // Initialize list options
            ListOptions = new cListOptions();

            // Export options
            ExportOptions = new cListOptions();
            ExportOptions.Tag = "span";
            ExportOptions.Separator = "  ";
        }
示例#9
0
        //
        //  Page class constructor
        //
        public clogin(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "login";
            m_PageObjName = "login";
            m_PageObjTypeName = "clogin";

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

            // Initialize table object
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);

            // Initialize URLs
            // Connect to database

            if (Conn == null)
                Conn = new cConnection();
        }
        //
        // Page main processing
        //
        public void Page_Main()
        {
            // Try to load ASP.NET Report Maker language file
            // Note: The langauge IDs must be the same in both projects

            if (ew_NotEmpty(ew_GetFieldValue("EWRPT_LANGUAGE_FOLDER")))
            ReportLanguage = new cLanguage(this, Convert.ToString(ew_GetFieldValue("EWRPT_LANGUAGE_FOLDER"))); // ASPX
            GetTableNames(ref TableNames);
            GetTableCaptions(ref TableCaptions);
            GetTableVars(ref TableVars);
            if (!Information.IsArray(TableNames)) {
            FailureMessage = Language.Phrase("NoTableGenerated");
            Page_Terminate("UserLevelslist.aspx"); // Return to list
            }
            Array.Resize(ref Privileges, TableNames.Length);

            // Get action
            if (ew_Empty(ew_Post("a_edit"))) {
            UserLevels.CurrentAction = "I"; // Display with input box

            // Load key from QueryString
            if (ew_NotEmpty(ew_Get("UserLevelID"))) {
                UserLevels.UserLevelID.QueryStringValue = ew_Get("UserLevelID");
            } else {
                Page_Terminate("UserLevelslist.aspx"); // Return to list
            }
            if (UserLevels.UserLevelID.QueryStringValue == "-1") {
                Disabled = " disabled=\"disabled\"";
            } else {
                Disabled = "";
            }
            } else {
            UserLevels.CurrentAction = ew_Post("a_edit");

            // Get fields from form
            UserLevels.UserLevelID.FormValue = ew_Post("x_UserLevelID");
            for (int i = 0; i < TableNames.Length; i++) {
                if (EW_USER_LEVEL_COMPAT)	{
                    Privileges[i] = ew_ConvertToInt(ew_Post("Add_" + i)) + ew_ConvertToInt(ew_Post("Delete_" + i)) + ew_ConvertToInt(ew_Post("Edit_" + i)) + ew_ConvertToInt(ew_Post("List_" + i));
                }	else {
                    Privileges[i] = ew_ConvertToInt(ew_Post("Add_" + i)) + ew_ConvertToInt(ew_Post("Delete_" + i)) + ew_ConvertToInt(ew_Post("Edit_" + i)) + ew_ConvertToInt(ew_Post("List_" + i)) + ew_ConvertToInt(ew_Post("View_" + i)) + ew_ConvertToInt(ew_Post("Search_" + i));
                }
            }
            }
            switch (UserLevels.CurrentAction) {
            case "I":	// Display
                Security.SetUpUserLevelEx(); // Get all user level info
                break;
            case "U":	// Update
                if (EditRow()) { // Update Record based on key
                    SuccessMessage = Language.Phrase("UpdateSuccess"); // Set update success message

                    // Alternatively, comment out the following line to go back to this page
                    Page_Terminate("UserLevelslist.aspx"); // Return to list
                }
                break;
            }
        }
        //
        //  Page class constructor
        //
        public cVehiculosPicoYPlacaHoras_grid(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "grid";
            m_PageObjName = "VehiculosPicoYPlacaHoras_grid";
            m_PageObjTypeName = "cVehiculosPicoYPlacaHoras_grid";

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

            // Initialize table object
            if (VehiculosPicoYPlacaHoras == null)
                VehiculosPicoYPlacaHoras = new cVehiculosPicoYPlacaHoras(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);
            if (VehiculosAutorizados == null)
                VehiculosAutorizados = new cVehiculosAutorizados(this);

            // Table
            m_TableName = "VehiculosPicoYPlacaHoras";
            m_Table = VehiculosPicoYPlacaHoras;
            MasterTable = CurrentTable;

            //MasterTableType = CurrentTableType;
            CurrentTable = VehiculosPicoYPlacaHoras;

            //CurrentTableType = VehiculosPicoYPlacaHoras.GetType();
            VehiculosPicoYPlacaHoras.LoadDetailParms();
            if (ew_NotEmpty(ew_Get("confirmpage")))
                ConfirmPage = ew_ConvertToBool(ew_Get("confirmpage"));
            if (VehiculosPicoYPlacaHoras.CurrentMasterTable == "VehiculosAutorizados") {
                VehiculosPicoYPlacaHoras.IdVehiculoAutorizado.FldIsDetailKey = true;
                if (ew_NotEmpty(ew_Get("IdVehiculoAutorizado"))) {
                    VehiculosPicoYPlacaHoras.IdVehiculoAutorizado.CurrentValue = ew_Get("IdVehiculoAutorizado");
                    VehiculosPicoYPlacaHoras.IdVehiculoAutorizado.SessionValue = VehiculosPicoYPlacaHoras.IdVehiculoAutorizado.CurrentValue;
                }
            }

            // Initialize URLs
            // Connect to database

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

            // Initialize list options
            ListOptions = new cListOptions();
        }
        //
        //  Page class constructor
        //
        public cPersonas_grid(AspNetMaker9_ControlVehicular APage)
        {
            m_ParentPage = APage;
            m_Page = this;
            m_PageID = "grid";
            m_PageObjName = "Personas_grid";
            m_PageObjTypeName = "cPersonas_grid";

            // 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);

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

            //MasterTableType = CurrentTableType;
            CurrentTable = Personas;

            //CurrentTableType = Personas.GetType();
            Personas.LoadDetailParms();
            if (ew_NotEmpty(ew_Get("confirmpage")))
                ConfirmPage = ew_ConvertToBool(ew_Get("confirmpage"));
            if (Personas.CurrentMasterTable == "Areas") {
                Personas.IdArea.FldIsDetailKey = true;
                if (ew_NotEmpty(ew_Get("IdArea"))) {
                    Personas.IdArea.CurrentValue = ew_Get("IdArea");
                    Personas.IdArea.SessionValue = Personas.IdArea.CurrentValue;
                }
            }

            // Initialize URLs
            // Connect to database

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

            // Initialize list options
            ListOptions = new cListOptions();
        }