Beispiel #1
0
        private void contenedor_Load(object sender, EventArgs e)
        {
            Conexion.DSN = "prueba2";
            MdiClient Chld;

            inv_ini = null;
            //  rep_movs = null;
            np     = null;
            cat    = null;
            fm     = null;
            mar    = null;
            rstck  = null;
            bod    = null;
            fl     = null;
            gr     = null;
            dm     = null;
            dbp    = null;
            fmu    = null;
            mem    = null;
            mov    = null;
            devc   = null;
            doc    = null;
            exbod  = null;
            fac    = null;
            kar    = null;
            his    = null;
            crearu = null;
            app    = null;
            edi    = null;
            camb   = null;
            modap  = null;
            desh   = null;
            asper  = null;
            edper  = null;
            elper  = null;
            repcom = null;


            foreach (Control crtl in this.Controls)
            {
                try
                {
                    Chld           = (MdiClient)crtl;
                    Chld.BackColor = this.BackColor;
                }
                catch (InvalidCastException exe)
                { }
            }



            if (inv_ini == null)
            {
                inv_ini           = new FormInventarioInicio();
                inv_ini.MdiParent = this;

                inv_ini.FormClosed += new FormClosedEventHandler(FormInventarioInicio_FormCLosed);
                inv_ini.Show();
            }
        }
Beispiel #2
0
 private void cambiarContraseñaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (camb == null)
     {
         camb             = new CambioPass();
         camb.MdiParent   = this;
         camb.FormClosed += new FormClosedEventHandler(CambioPass_FormClosed);
         camb.Show();
     }
 }
Beispiel #3
0
        public JsonResult CambioPasswordAsync(CambioPass cambioPass)
        {
            IUsuariosBS BSUsuario = new UsuariosBS();

            if (BSUsuario.CambiaPassword(Convert.ToInt32(System.Web.HttpContext.Current.Session["idUsuario"]), cambioPass.NewPassword))
            {
                return(Json("'Success':'true'"));
            }

            return(Json("'Success':'false'"));
        }
Beispiel #4
0
 private void menu_seguridad_Load(object sender, EventArgs e)
 {
     //MessageBox.Show(seguridad.LlegarSeguridad.ObtenerUsuario());
     nusr          = null;
     form_desh     = null;
     form_priv     = null;
     form_perf     = null;
     form_cambpass = null;
     form_asig     = null;
     //form_app = null;
     form_app_UD = null;
     form_hist   = null;
     // form_log = null;
 }
Beispiel #5
0
        public ActionResult CambioPassword(CambioPass cambioPass)
        {
            if (!ModelState.IsValid)
            {
                TempData["mensaje"] = "Error en los datos. Ingrese nuevamente.";
                return(RedirectToAction("CambioPassword", "Home"));
            }


            IUsuariosBS BSUsuario = new UsuariosBS();

            if (BSUsuario.CambiaPassword(Convert.ToInt32(System.Web.HttpContext.Current.Session["idUsuario"]), cambioPass.NewPassword))
            {
                return(RedirectToAction("Login", "Home"));
            }

            TempData["mensaje"] = "No fue posible realizar el cambio. Ingrese nuevamente.";
            return(View("CambioPassword", new CambioPass()));
        }
Beispiel #6
0
 private void CambioPass_FormClosed(object sender, FormClosedEventArgs e)
 {
     camb = null;
 }
Beispiel #7
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // conexion odbc
            //try
            //{
            //    seguridad.Conexion.DSN = "crm";
            //    seguridad.Conexion.PassWord = "******";
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);

            //}


            BloquearMDI();
            Bloqueo.DesbloquearMDI(menuStrip1);



            //------------------------
            tipo = OpBD.VerificarTipoUsuario();
            if (tipo == "administrador")
            {
                //estadisticasToolStripMenuItem.Enabled = false;
                seguridadToolStripMenuItem.Enabled = true;
                foreach (ToolStripMenuItem item_seg in seguridadToolStripMenuItem.DropDownItems)
                {
                    item_seg.Enabled = true;
                }
            }


            cal           = null;
            con           = null;
            neg           = null;
            em            = null;
            per           = null;
            pro           = null;
            cliente_form  = null;
            emp           = null;
            ini           = null;
            empleado_form = null;
            caso          = null;
            bitacora      = null;
            ap            = null;
            modap         = null;
            crearu        = null;
            edi           = null;
            desh          = null;
            asper         = null;
            edper         = null;
            elper         = null;
            camb          = null;
            secundarios   = null;
            inven         = null;
            inv_bod       = null;
            precios       = null;
            abono         = null;
            balance       = null;
            exis          = null;
            compra        = null;

            if (ini == null)
            {
                ini           = new Form_inicio();
                ini.MdiParent = this;

                ini.FormClosed += new FormClosedEventHandler(frm_inicio_FormClosed);
                ini.Show();
            }
        }
Beispiel #8
0
 public void CambiarPass_FormClosed(object sender, FormClosedEventArgs e)
 {
     form_cambpass = null;
 }
Beispiel #9
0
        private void button1_Click_2(object sender, EventArgs e)
        {
            CambioPass form = new CambioPass();

            form.Show();
        }