private void frmMantenimientosBasicos_Load(object sender, EventArgs e)
        {
            oArregloPermisos = oCPermisosEspeciales.LeePermisos(MDIPrincipal.RolUsuario.Trim(), this.Tag.ToString().Trim());
            tobCancelar_Click(sender, e);

            try
            {
                VistaConstants.SetWindowTheme(Grid1.Handle, "explorer", null); //Explorer style
                VistaConstants.SendMessage(Grid1.Handle, VistaConstants.TVM_SETEXTENDEDSTYLE, VistaConstants.TVS_EX_AUTOHSCROLL, VistaConstants.TVS_EX_AUTOHSCROLL);

                VistaConstants.SetWindowTheme(Grid1.Handle, "explorer", null); //Explorer style
                VistaConstants.SendMessage(Grid1.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
            }
            catch { }
        }
示例#2
0
        public frmRecordatorios(string pDetalle, string pIdCita, Color pColor, string pIdPaciente, bool pTopMost)
        {
            InitializeComponent();
            this.Visible = false;
            Detalle      = pDetalle;
            IdCita       = pIdCita;
            oColor       = pColor;
            IdPaciente   = pIdPaciente;
            this.TopMost = pTopMost;

            try
            {
                VistaConstants.SetWindowTheme(lstContactos.Handle, "explorer", null); //Explorer style
                VistaConstants.SendMessage(lstContactos.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
            }
            catch { }
        }
示例#3
0
        private void FrmMenusXRol_Load(object sender, EventArgs e)
        {
            try
            {
                VistaConstants.SetWindowTheme(LstDestino.Handle, "explorer", null); //Explorer style
                VistaConstants.SendMessage(LstDestino.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
                VistaConstants.SetWindowTheme(LstOrigen.Handle, "explorer", null);  //Explorer style
                VistaConstants.SendMessage(LstOrigen.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
            }
            catch { }

            Cargar_Combos();

            LstOrigen.View = View.Details;
            LstOrigen.Columns.Add("Menús", 250, HorizontalAlignment.Left);

            LstDestino.View = View.Details;
            LstDestino.Columns.Add("Menús", 250, HorizontalAlignment.Left);

            LlenarListaOrigen();

            ModoBloqueo();
        }
示例#4
0
        private void FrmSeguridad_Load(object sender, EventArgs e)
        {
            if (VerificarEmpleadosIngresados() == true)
            {
                try
                {
                    VistaConstants.SetWindowTheme(lstRoles.Handle, "explorer", null); //Explorer style
                    VistaConstants.SendMessage(lstRoles.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
                    VistaConstants.SetWindowTheme(LstRolesXUsuario.Handle, "explorer", null); //Explorer style
                    VistaConstants.SendMessage(LstRolesXUsuario.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
                    VistaConstants.SetWindowTheme(LstUsuarioEmpleado.Handle, "explorer", null); //Explorer style
                    VistaConstants.SendMessage(LstUsuarioEmpleado.Handle, VistaConstants.LVM_SETEXTENDEDLISTVIEWSTYLE, VistaConstants.LVS_EX_DOUBLEBUFFER, VistaConstants.LVS_EX_DOUBLEBUFFER);
                }
                catch { }

                cargarRoles();
                //cargarBaseDatos();

                DataSet ds2 = Program.oPersistencia.ejecutarSQLListas("Select id_emp, nombre from Empleados", "Empleados");

                this.CmbEmpleados.DataSource = ds2.Tables["Empleados"];
                this.CmbEmpleados.DisplayMember = ds2.Tables["Empleados"].Columns[1].ToString();
                this.CmbEmpleados.ValueMember = ds2.Tables["Empleados"].Columns[0].ToString();

                this.CmbEmpleados2.DataSource = ds2.Tables["Empleados"];
                this.CmbEmpleados2.DisplayMember = ds2.Tables["Empleados"].Columns[1].ToString();
                this.CmbEmpleados2.ValueMember = ds2.Tables["Empleados"].Columns[0].ToString();

                ds2.Dispose();

                LlenarCombos();

                this.BtnEliminar.Region = Shape.RoundedRegion(BtnEliminar.Size, 2, Shape.Corner.None);
                this.BtnUsuarioEmpleado.Region = Shape.RoundedRegion(BtnUsuarioEmpleado.Size, 2, Shape.Corner.None);
                this.button3.Region = Shape.RoundedRegion(button3.Size, 2, Shape.Corner.None);
                this.button1.Region = Shape.RoundedRegion(button1.Size, 2, Shape.Corner.None);
                this.BtnCrearLogin1.Region = Shape.RoundedRegion(BtnCrearLogin1.Size, 2, Shape.Corner.None);
                this.BtnCrearRol1.Region = Shape.RoundedRegion(BtnCrearRol1.Size, 2, Shape.Corner.None);
                this.BtnAsignarUsuario.Region = Shape.RoundedRegion(BtnAsignarUsuario.Size, 2, Shape.Corner.None);
                this.BtnCerrarListaUsuarios.Region = Shape.RoundedRegion(BtnCerrarListaUsuarios.Size, 2, Shape.Corner.None);
                this.BtnCerrarListaRolesUsuario.Region = Shape.RoundedRegion(BtnCerrarListaRolesUsuario.Size, 2, Shape.Corner.None);
                this.button2.Region = Shape.RoundedRegion(button2.Size, 2, Shape.Corner.None);

                //if (cmbLogin.Items.Count > 0)
                //    button2.Enabled = false;//Botón para ver roles por usuario
                cmbBaseDatos.SelectedIndex = 0;
            }
            else
            {
                if (MessageBox.Show(this, "No puede continuar hasta haber ingresado los empleados que utilizarán el sistema. ¿Desea realizar estas acciones en este momento?", "Atención", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
                {
                    this.Close();
                    this.Dispose();

                    FrmMantEmpleados oFrmMantEmpleados = new FrmMantEmpleados();
                    oFrmMantEmpleados.ShowDialog(); 
                }
                else
                {
                    this.Close();
                    this.Dispose();
                }
            }
        }