Beispiel #1
0
        public void cUsuariostoolStripMenuItem_ItemClicked(object sender, EventArgs e)
        {
            var cusuarios = new cUsuarios();

            cusuarios.MdiParent = this;
            cusuarios.Show();
        }
Beispiel #2
0
        //Usuarios Consultas
        private void UsuarioStripMenuItem_ItemCliked(object sender, EventArgs e)
        {
            var usuario = new cUsuarios();

            usuario.MdiParent = this;
            usuario.Show();
        }
Beispiel #3
0
        private void ConsultarUsuariosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cUsuarios consulta = new cUsuarios();

            consulta.MdiParent = this;
            consulta.Show();
        }
Beispiel #4
0
        private void ConsultaUsuariosToolStripMenuItem_ItemClicked(object sender, EventArgs e)
        {
            var Usuarios = new cUsuarios();

            Usuarios.MdiParent = this;
            Usuarios.Show();
        }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["v"] != null)
            {
                switch (Convert.ToChar(Request.QueryString["v"].ToString()))
                {
                case '0':
                    mvUsuarios.ActiveViewIndex = 0;
                    if (idUsuario.Text == "0" || idUsuario.Text == "")
                    {
                    }
                    else
                    {
                    }
                    rellenaDropDown();
                    break;

                case '1':

                    mvUsuarios.ActiveViewIndex = 1;

                    break;
                }
                else if (txtTipoUs.Visible && txtTipoUs1.Visible && txtTipoUs2.Visible && txtTipoUs3.Visible && !txtTipoUs4.Visible && !txtTipoUs5.Visible && !txtTipoUs6.Visible && !txtTipoUs7.Visible)
                {
                    roles    = new int[4];
                    roles[0] = Convert.ToInt32(txtTipoUs.SelectedValue);
                    roles[1] = Convert.ToInt32(txtTipoUs1.SelectedValue);
                    roles[2] = Convert.ToInt32(txtTipoUs2.SelectedValue);
                    roles[3] = Convert.ToInt32(txtTipoUs3.SelectedValue);
                }
                else if (txtTipoUs.Visible && txtTipoUs1.Visible && txtTipoUs2.Visible && !txtTipoUs3.Visible && !txtTipoUs4.Visible && !txtTipoUs5.Visible && !txtTipoUs6.Visible && !txtTipoUs7.Visible)
                {
                    roles    = new int[3];
                    roles[0] = Convert.ToInt32(txtTipoUs.SelectedValue);
                    roles[1] = Convert.ToInt32(txtTipoUs1.SelectedValue);
                    roles[2] = Convert.ToInt32(txtTipoUs2.SelectedValue);
                }
                else if (txtTipoUs.Visible && txtTipoUs1.Visible && !txtTipoUs2.Visible && !txtTipoUs3.Visible && !txtTipoUs4.Visible && !txtTipoUs5.Visible && !txtTipoUs6.Visible && !txtTipoUs7.Visible)
                {
                    roles    = new int[2];
                    roles[0] = Convert.ToInt32(txtTipoUs.SelectedValue);
                    roles[1] = Convert.ToInt32(txtTipoUs1.SelectedValue);
                }
                else if (txtTipoUs.Visible && !txtTipoUs1.Visible && !txtTipoUs2.Visible && !txtTipoUs3.Visible && !txtTipoUs4.Visible && !txtTipoUs5.Visible && !txtTipoUs6.Visible && !txtTipoUs7.Visible)
                {
                    roles    = new int[1];
                    roles[0] = Convert.ToInt32(txtTipoUs.SelectedValue);
                }
                cUsuarios obj = new cUsuarios(0, txtnombre.Text, txtApPa.Text, txtApMa.Text, txtRFC.Text, txtTelefono.Text, txtCorreo.Text, roles, Convert.ToInt32(txtOficina.SelectedValue), txtIngreso.Text, txtContra1.Text, txtFoto.FileName, 1);
                obj.GuardaUsuario(Convert.ToInt32(Session["idUsuario"]));
            }
            else
            {
                String alert = "$.alert({title: 'Oh!',theme: 'material',content: 'No es un archivo de imagen válido',buttons:{cerrar: {text:'Cerrar',btnClass:'btn-info'}}}); ";
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", alert, true);
            }
        }
 protected void Regis_Click(object sender, EventArgs e)
 {
     if (userPass.Text == userPassConf.Text)
     {
         photo.SaveAs(System.AppDomain.CurrentDomain.BaseDirectory + userName.Text.Trim());
         if (photo.FileName.Trim().IndexOf(".jpg") > -1 || photo.FileName.Trim().IndexOf(".png") > -1 || photo.FileName.Trim().IndexOf(".gif") > -1)
         {
             cUsuarios obj     = new cUsuarios(0, name.Text, lastName.Text, sureName.Text, email.Text, userName.Text, userPass.Text, "images/Profiles/" + photo.FileName.Trim(), 0);
             String    mensaje = obj.GuardaUsuario();
             if (mensaje == "Usuario Registrado Correctamente")
             {
                 String script = "$.confirm({title: 'Genial!',    content: 'Usuario registrado correctamente',theme: 'material',buttons: {ok:{ btnClass: 'btn btn-info',action: function(window.location.replace('" + Request.ApplicationPath + "Default.aspx');){ }   }}}); ";
                 ScriptManager.RegisterStartupScript(this, GetType(), "ServerControlScript", script, true);
             }
             else if (mensaje == "Usuario Registrado Anteriormente")
             {
                 String script = "$.confirm({title: 'Error!',    content: 'Nombre de usuario o correo registrado anteriormente',theme: 'material',buttons: {ok:{ btnClass: 'btn btn-info',action: function(){ }   }}}); ";
                 ScriptManager.RegisterStartupScript(this, GetType(),
                                                     "ServerControlScript", script, true);
             }
         }
         else
         {
             String script = "$.confirm({title: 'Error!',    content: 'La extensión del archivo debe ser .jpg, .png o .gif',theme: 'material',buttons: {ok:{ btnClass: 'btn btn-info',action: function(){ }   }}}); ";
             ScriptManager.RegisterStartupScript(this, GetType(),
                                                 "ServerControlScript", script, true);
         }
     }
     else
     {
         String script = "$.confirm({title: 'Error!',    content: 'Las contraseñas no coinciden',theme: 'material',buttons: {ok:{ btnClass: 'btn btn-info',action: function(){ }   }}}); ";
         ScriptManager.RegisterStartupScript(this, GetType(),
                                             "ServerControlScript", script, true);
     }
 }
        private void UsuariosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cUsuarios frm = new cUsuarios();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.Show();
        }
    private void TraeDireccion()
    {
        cUsuarios cu = new cUsuarios(Convert.ToInt32(lblidUsuario.Text));

        gvDireccion.DataSource = cu.TraeInfoUsuario(3);
        gvDireccion.DataBind();
    }
Beispiel #9
0
        private void ConsultaDeUsuarioToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cUsuarios cusuario = new cUsuarios();

            cusuario.MdiParent = this;
            cusuario.Show();
        }
    protected void btnBuscar_Click(object sender, EventArgs e)
    {
        cUsuarios cu = new cUsuarios();

        gvUsuarios.DataSource = cu.TraeInfoUsuario(txtBusqueda.Text);
        gvUsuarios.DataBind();
    }
Beispiel #11
0
        private void usuariosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            cUsuarios cUsuarios = new cUsuarios();

            cUsuarios.MdiParent = this;
            cUsuarios.Show();
        }
    private void TraeMediosContacto()
    {
        cUsuarios cu = new cUsuarios(Convert.ToInt32(lblidUsuario.Text));

        gvMedioContacto.DataSource = cu.TraeInfoUsuario(4);
        gvMedioContacto.DataBind();
    }
        private void ButtonCUsuarios_Click_1(object sender, EventArgs e)
        {
            cUsuarios ver = new cUsuarios();

            ver.MdiParent = this;
            ver.Show();
        }
Beispiel #14
0
        private void ConsultasToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            cUsuarios c = new cUsuarios();

            c.MdiParent     = this;
            c.StartPosition = FormStartPosition.CenterScreen;
            c.Show();
        }
    private void TraePersona()
    {
        cUsuarios cu = new cUsuarios();

        cu.PersonID           = 0;
        gvUsuarios.DataSource = cu.TraeInfoUsuario(0);
        gvUsuarios.DataBind();
    }
    protected void btnGuardarMedio_Click(object sender, EventArgs e)
    {
        cUsuarios cu      = new cUsuarios(Convert.ToInt32(lblidUsuario.Text));
        String    Mensaje = cu.GuardaContacto(0, Convert.ToInt32(ddlMedio.SelectedValue.ToString()), txtValorMedio.Text);

        ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
        TraeMediosContacto();
    }
Beispiel #17
0
 void FrmCadUsuariosLoad(object sender, EventArgs e)
 {
     usuarios    = new cUsuarios();
     this.Cursor = Cursors.WaitCursor;
     usuarios.Carrega(dgvCadastro, "");
     this.Cursor = Cursors.Default;
     DesabilitaEdicaoLocal();
 }
    protected void bntnGuardarDireccion_Click(object sender, EventArgs e)
    {
        cUsuarios cu      = new cUsuarios(Convert.ToInt32(lblidUsuario.Text));
        String    Mensaje = cu.GuardaDireccion(Convert.ToInt32(lblidDireccion.Text), txtCalleNumero.Text, ddlColonia.SelectedValue.ToString(), txtCP.Text, txtEntidadFederativa.Text, txtMunicipio.Text);

        ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
        TraeDireccion();
    }
Beispiel #19
0
        private void UsuariosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            cUsuarios us = new cUsuarios();

            us.MdiParent     = this;
            us.StartPosition = FormStartPosition.CenterScreen;
            us.Show();
        }
    private void TraeClaveAgente()
    {
        cUsuarios cu = new cUsuarios();

        cu.AgenteID        = Convert.ToInt32(lblidAgente.Text);
        gvClave.DataSource = cu.TraeCveAgente();
        gvClave.DataBind();
    }
Beispiel #21
0
        private void ConsultaDeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cUsuarios ver = new cUsuarios();

            ver.MdiParent     = this;
            ver.StartPosition = FormStartPosition.CenterScreen;
            ver.Show();
        }
    protected void btnGuardarUsuario_Click(object sender, EventArgs e)
    {
        String Mensaje = "";
        String Foto    = "";

        if (txtPsw.Text == txtPsw2.Text)
        {
            Boolean fileOK = false;
            String  path   = Server.MapPath("~/Administracion/user/photo/");

            if (fuFoto.HasFile)
            {
                String fileExtension =
                    System.IO.Path.GetExtension(fuFoto.FileName).ToLower();
                String[] allowedExtensions = { ".jpg", ".png", ".gif" };
                for (int i = 0; i < allowedExtensions.Length; i++)
                {
                    if (fileExtension == allowedExtensions[i])
                    {
                        fileOK = true;
                    }
                }
            }


            if (fileOK)
            {
                try
                {
                    fuFoto.SaveAs(path + fuFoto.FileName);

                    cUsuarios cs = new cUsuarios(Convert.ToInt32(lblidUsuario.Text), txtNombreU.Text, txtAPU.Text, txtAMU.Text, txtRFC.Text, txtTelefono.Text, txtCorreo.Text, Convert.ToInt32(ddlTipoUsuario.SelectedValue.ToString()), Convert.ToInt32(ddlOficina.SelectedValue.ToString()), txtFechaIngreso.Text, txtUsuario.Text, txtPsw.Text, fuFoto.FileName, 1);



                    Mensaje           = cs.GuardaUsuario(1);
                    lblidUsuario.Text = cs.PersonID.ToString();
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
                    pnlDatosAdicionales.Visible = true;
                    Extras ex = new Extras();
                    ex.sendMail2(txtCorreo.Text, "PROMORISK MÉXICO <br/> Se ha actualizado tu Información", "Modificación del Sistema");
                }
                catch (Exception ex)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Oh...\", \"Ha ocurrido un error D:\", \"error\");", true);
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Oh...\", \"No es un archivo valido debe ser una imagen\", \"error\");", true);
            }
        }
        else
        {
            Mensaje = "Las Contraseñas no Coinciden";
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
        }
    }
Beispiel #23
0
        public SelecaoVendedor()
        {
            InitializeComponent();
            cUsuarios usuarios = new cUsuarios();

            this.Cursor = Cursors.WaitCursor;
            AcaoDAO.CarregaVendedores(cbxVendedores);
            this.Cursor = Cursors.Default;
        }
Beispiel #24
0
 void FrmFiltroOrcamentoLoad(object sender, EventArgs e)
 {
     if (cbxUsuarios.Items.Count == 0)
     {
         cUsuarios usuarios = new cUsuarios();
         this.Cursor = Cursors.WaitCursor;
         usuarios.Carrega(cbxUsuarios);
         this.Cursor = Cursors.Default;
     }
 }
    protected void btnGuardarClave_Click(object sender, EventArgs e)
    {
        cUsuarios cu = new cUsuarios();

        cu.AgenteID = Convert.ToInt32(lblidAgente.Text);
        String Mensaje = cu.GuardaCveAgente(0, Convert.ToInt32(ddlCia.SelectedValue.ToString()), txtCkave.Text);

        ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
        TraeClaveAgente();
    }
    private void TraeConducto()
    {
        cUsuarios cu = new cUsuarios();

        cu.PersonID = 0;
        DataTable tbl = cu.TraeInfoUsuario(0);

        ddlSolicito.DataSource     = tbl;
        ddlSolicito.DataTextField  = "Full_Name";
        ddlSolicito.DataValueField = "Person_ID";
        ddlSolicito.DataBind();
    }
 private void UsuariosToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Permiso_label.Text == "Administrador" || Permiso_label.Text == "Contador")
     {
         cUsuarios u = new cUsuarios();
         u.Show();
     }
     else
     {
         MessageBox.Show("No se puede acceder con este usuario", "No Hay Permiso!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Beispiel #28
0
 private void ConsultarUsuariosToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (nivelUsuario <= 1)
     {
         cUsuarios cU = new cUsuarios(nombreUsuario);
         cU.ShowDialog();
     }
     else
     {
         MessageBox.Show("No tiene permiso para realizar esta tarea");
     }
 }
Beispiel #29
0
 private void consultaDeUsuariosToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (usuario.TipoUsuario == 0)
     {
         cUsuarios consultaUsuarios = new cUsuarios();
         consultaUsuarios.MdiParent = this;
         consultaUsuarios.Show();
     }
     else
     {
         MessageBox.Show("Lo sentimos, no tienes permisos para acceder a este módulo", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
    protected void btnGuardarInformacionAsesor_Click(object sender, EventArgs e)
    {
        cUsuarios cu = new cUsuarios(Convert.ToInt32(lblidUsuario.Text));

        cu.AsesorID = Convert.ToInt32(lblidAsesor.Text);
        cu.PersonID = Convert.ToInt32(lblidUsuario.Text);

        /*String Mensaje = cu.GuardaAgente(Convert.ToInt32(ddlTipoPersona.SelectedValue.ToString()), txtCedula.Text, Cedula, txtDesdeCedula.Text, txtHastaCedula.Text, txtPolizaRC.Text, PolizaRC, txtDesdePolizaRC.Text, txtHastaPolizaRC.Text);
         *
         * lblidAgente.Text = cu.AgenteID.ToString();
         * ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Listo!\",\"" + Mensaje + "\", \"success\");", true);
         **/
    }
        //
        //  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 = "&nbsp;&nbsp;";
        }
        //
        //  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 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();
        }
        //
        //  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 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 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 = "&nbsp;&nbsp;";
        }
        //
        // Page main processing
        //
        public void Page_Main()
        {
            // Open connection to the database
            Conn = new cConnection();

            // Initialize table object
            if (VehiculosAutorizados == null)
                VehiculosAutorizados = new cVehiculosAutorizados(this);
            if (Personas == null)
                Personas = new cPersonas(this);
            if (Usuarios == null)
                Usuarios = new cUsuarios(this);
            if (Security == null) Security = new cAdvancedSecurity(this);
            if (!Security.IsLoggedIn()) Security.AutoLogin();
            if (!Security.IsLoggedIn()) {
                ew_Write(Language.Phrase("NoPermission"));
                ew_End();
            }

            // Table Permission loading event
            Security.TablePermission_Loading();
            Security.LoadCurrentUserLevel("VehiculosAutorizados");

            // Table Permission loaded event
            Security.TablePermission_Loaded();
            if (!Security.IsLoggedIn()) {
                Security.SaveLastUrl();
                ew_Write(Language.Phrase("NoPermission"));
                ew_End();
            }
            if (!Security.CanList) {
                ew_Write(Language.Phrase("NoPermission"));
                ew_End();
            }

            // UserID_Loading event
            Security.UserID_Loading();
            if (Security.IsLoggedIn()) Security.LoadUserID();

            // UserID_Loaded event
            Security.UserID_Loaded();
        }
        //
        //  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();
        }
Beispiel #39
0
        private cUsuarios UserTable; // ASPX81

        #endregion Fields

        #region Constructors

        // Constructor
        public cUserProfile(AspNetMakerPage APage)
        {
            m_Page = APage;
            m_ParentPage = APage.ParentPage;
            UserTable = Usuarios; // ASPX81
            InitProfile();
        }
Beispiel #40
0
        // Init
        public cAdvancedSecurity(AspNetMakerBase APage)
        {
            //m_Page = APage;
            m_ParentPage = APage.ParentPage;
            m_ArUserLevel = new ArrayList();
            m_ArUserLevelPriv = new ArrayList();

            // Init User Level
            CurrentUserLevelID = SessionUserLevelID;
            if (Information.IsNumeric(CurrentUserLevelID)) {
                if (CurrentUserLevelID >= -1)	{
                    Array.Resize(ref m_ArUserLevelID, 1);
                    m_ArUserLevelID[0] = CurrentUserLevelID;
                }
            }

            // Init User ID
            CurrentUserID = SessionUserID;
            CurrentParentUserID = SessionParentUserID;
            if (Usuarios != null) {
                UserTable = Usuarios;
            } else {
                UserTable = new cUsuarios(null); // ASPX81
            }

            // Load user level (for TablePermission_Loading event)
            LoadUserLevel();
        }
        //
        //  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 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 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();
        }