Ejemplo n.º 1
0
        private void btn_personas_Click(object sender, EventArgs e)
        {
            frm_cliente fc = new frm_cliente();

            fc.MdiParent = this.MdiParent;
            fc.Show();
        }
Ejemplo n.º 2
0
        private void btn_editar_Click(object sender, EventArgs e)
        {
            if (pagina == "Personas")
            {
                DataRow row        = gv_personas.GetFocusedDataRow();
                string  id_persona = row[0].ToString();

                frm_cliente f = new frm_cliente();
                f.id_cliente = id_persona;;

                f.actualizar = true;
                f.MdiParent  = this.MdiParent;
                f.Show();
            }
            else if (pagina == "Organizaciones")
            {
                DataRow row    = gv_organizaciones.GetFocusedDataRow();
                string  id_emp = row[0].ToString();
                string  nom    = row[1].ToString();

                frm_empresa f = new frm_empresa();
                f.id_empresa     = id_emp;;
                f.nombre_empresa = nom;
                f.actualizar     = true;
                f.MdiParent      = this.MdiParent;
                f.Show();
            }
        }
Ejemplo n.º 3
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LimpiarMDI();
            if (cliente_form == null)
            {
                cliente_form           = new frm_cliente();
                cliente_form.MdiParent = this;

                cliente_form.FormClosed += new FormClosedEventHandler(frm_cliente_FormClosed);
                cliente_form.Show();
            }
        }
Ejemplo n.º 4
0
        private void item_clientes_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            DataTable dt = ObtenerPermisos.Permisos(seguridad.Conexion.User, "112");

            if (dt.Rows.Count > 0)
            {
                frm_cliente f = new frm_cliente();
                f.MdiParent = this.MdiParent;
                f.Show();
            }
            else
            {
                MessageBox.Show("No posee los permisos necesarios para acceder al modulo");
            }
        }
Ejemplo n.º 5
0
 private void btn_nuevo_Click(object sender, EventArgs e)
 {
     if (pagina == "Personas")
     {
         frm_cliente fc = new frm_cliente();
         fc.actualizar = false;
         fc.MdiParent  = this.MdiParent;
         fc.Show();
     }
     else if (pagina == "Organizaciones")
     {
         frm_empresa fe = new frm_empresa();
         fe.actualizar = false;
         fe.MdiParent  = this.MdiParent;
         fe.Show();
     }
 }
Ejemplo n.º 6
0
        private void btn_nuevo_perem_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == 0 || comboBox1.SelectedIndex == 1)
            {
                if (comboBox1.SelectedItem.ToString() == "Persona")
                {
                    frm_cliente f = new frm_cliente();
                    f.MdiParent = this.MdiParent;

                    f.Show();
                }
                else if (comboBox1.SelectedItem.ToString() == "Empresa")
                {
                    frm_empresa f = new frm_empresa();
                    f.MdiParent = this.MdiParent;

                    f.Show();
                }
            }
        }
Ejemplo n.º 7
0
        // BOTON PARA INGRESAR NUEVO ENTE SEGUN OPCION SELECCIONADA
        private void btn_nuevo_ente_Click(object sender, EventArgs e)
        {
            //string opcion = cmb_ente.Text;

            //MessageBox.Show(opcion);

            //if (cmb_ente.Text == "")
            //{
            //    MessageBox.Show("No se ha seleccionado ninguna opción", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            //}
            //else if (cmb_ente.Text == "Empresa")
            //{
            //    frm_empresa empresa = new frm_empresa();
            //    empresa.Show();
            //}
            //else if (cmb_ente.Text == "Persona")
            //{
            //    frm_cliente cliente = new frm_cliente();
            //    cliente.Show();
            //}

            //--------------------
            if (cmb_ente.SelectedIndex == 0 || cmb_ente.SelectedIndex == 1)
            {
                if (cmb_ente.SelectedItem.ToString() == "Persona")
                {
                    frm_cliente f = new frm_cliente();
                    f.MdiParent = this.MdiParent;

                    f.Show();
                }
                else if (cmb_ente.SelectedItem.ToString() == "Empresa")
                {
                    frm_empresa f = new frm_empresa();
                    f.MdiParent = this.MdiParent;

                    f.Show();
                }
            }
        }
Ejemplo n.º 8
0
        private void casosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //DataTable dt = ObtenerPermisos.Permisos(seguridad.Conexion.User, "102");
            //if (dt.Rows.Count > 0)
            //{
            //LimpiarMDI();
            if (caso == null)
            {
                caso           = new Form_Casos();
                cliente_form   = new frm_cliente();
                caso.MdiParent = this;

                caso.FormClosed += new FormClosedEventHandler(Form_Casos_FormClosed);
                caso.Show();
                //cliente_form = new frm_cliente();
                //cliente_form.MdiParent = this;

                //cliente_form.FormClosed += new FormClosedEventHandler(frm_cliente_FormClosed);
                //cliente_form.Show();
            }

            //}else { MessageBox.Show("No posee los permisos necesarios para acceder al modulo"); }
        }
Ejemplo n.º 9
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();
            }
        }
Ejemplo n.º 10
0
 private void frm_cliente_FormClosed(object sender, FormClosedEventArgs e)
 {
     cliente_form = null;
 }