public FrmAFILIADO(MODELO.AFILIADO miAFILIADO, string miaccion)
        {
            InitializeComponent();

            cAFILIADOS = CONTROLADORA.cAFILIADOS.Obtener_Instancia();
            oAFILIADO  = miAFILIADO;
            accion     = miaccion;

            CBPlanes.DataSource    = cAFILIADOS.Obtener_Planes();
            CBPlanes.DisplayMember = "Nombre";

            if (accion != "A")
            {
                txtNombre_Afiliado.Text   = oAFILIADO.Nombre;
                txtDirecion_Afiliado.Text = oAFILIADO.Direccion;
                txtEmail_Afiliado.Text    = oAFILIADO.Email;
                MtbFecha_Nacimiento.Text  = oAFILIADO.Fecha_Nacimiento.ToString();
                Txtsexo_Afiliado.Text     = oAFILIADO.Sexo;
                TxtContrato_Afiliado.Text = oAFILIADO.Numero_Contrato.ToString();
                mtxtDNI_Afiliado.Text     = oAFILIADO.DNI.ToString();
                mtxtTel_Afiliado.Text     = oAFILIADO.Telefono.ToString();
                CBPlanes.Text             = oAFILIADO.PLAN.ToString();
                if (oAFILIADO.Estado == true)
                {
                    ChkEstado.Checked = true;
                }
                else
                {
                    ChkEstado.Checked = false;
                }

                if (oAFILIADO.Titular == true)
                {
                    chkTitular.Checked = true;
                }
                else
                {
                    ChkAdherente.Checked = true;
                }
            }
            if (accion == "C")
            {
                ChkEstado.Enabled            = false;
                ChkAdherente.Enabled         = false;
                MtbFecha_Nacimiento.Enabled  = false;
                btnGuardar_AFILIADO.Visible  = false;
                btnCancelar.Text             = "CERRAR";
                txtNombre_Afiliado.Enabled   = false;
                txtDirecion_Afiliado.Enabled = false;
                Txtsexo_Afiliado.Enabled     = false;
                mtxtDNI_Afiliado.Enabled     = false;
                mtxtTel_Afiliado.Enabled     = false;
                chkTitular.Enabled           = false;
                ChkDebito.Enabled            = false;
                TxtContrato_Afiliado.Enabled = false;
                txtEmail_Afiliado.Enabled    = false;
                CBPlanes.Enabled             = false;
            }
        }
        public FrmBUSCARAFILIADO()
        {
            InitializeComponent();
            cAFILIADOS = CONTROLADORA.cAFILIADOS.Obtener_Instancia();

            if (cAFILIADOS.Obtener_Afiliados(string.Empty).Count > 0)
            {
                ARMAR_GRILLA();
            }
        }
        public FrmGESTIONARAFILIADOS(MODELO.USUARIO oUSUARIO)
        {
            InitializeComponent();

            cAFILIADOS = CONTROLADORA.cAFILIADOS.Obtener_Instancia();

            btnConsultar_Afiliado.Enabled = oUSUARIO.VALIDAR_ACCION("FrmGESTIONARAFILIADOS", "btnConsultar_Afiliado");
            btnModificar_Afiliado.Enabled = oUSUARIO.VALIDAR_ACCION("FrmGESTIONARAFILIADOS", "btnModificar_Afiliado");
            btnAgregar_Afiliado.Enabled   = oUSUARIO.VALIDAR_ACCION("FrmGESTIONARAFILIADOS", "btnAgregar_Afiliado");

            ARMA_GRILLA();
        }
        private FrmFACTURACION(MODELO.USUARIO oUSUARIO)
        {
            InitializeComponent();
            //Obtiene las controladoras
            cFACTURACION = CONTROLADORA.cFACTURACION.Obtener_Instancia();
            cAFILIADOS   = CONTROLADORA.cAFILIADOS.Obtener_Instancia();
            //Validas las acciones del usuario
            btnCobrar.Enabled  = oUSUARIO.VALIDAR_ACCION("FrmFACTURACION", "btnCobrar");
            btnDebitar.Enabled = oUSUARIO.VALIDAR_ACCION("FrmFACTURACION", "btnDebitar");
            //Dehabilita el boton cobrar - Se activa cuando selecciona un afiliafo que paga en efectivo
            btnCobrar.Enabled = false;
            //Ruta de la carpeta del proyecto: [...]/SISTEMA/
            rutaProyecto = Directory.GetCurrentDirectory().Substring(0, Directory.GetCurrentDirectory().Length - 15);

            ARMA_GRILLA();
        }
        public FrmCOBRAR(MODELO.AFILIADO miAFILIADO)
        {
            InitializeComponent();
            oAfiliado = miAFILIADO;
            //Obtiene las controladoras
            cAFILIADOS   = CONTROLADORA.cAFILIADOS.Obtener_Instancia();
            cFACTURACION = CONTROLADORA.cFACTURACION.Obtener_Instancia();
            //Crea una lista de deudas para guardar las deudas seleccionadas
            listaDeudas = new List <MODELO.DEUDA>();
            //Autocompleta los datos del afiliado
            txtNombre_Afiliado.Text = oAfiliado.Nombre;
            mtxtDNI_Afiliado.Text   = oAfiliado.DNI.ToString();
            //Ruta de la carpeta del proyecto: [...]/SISTEMA/
            rutaProyecto = Directory.GetCurrentDirectory().Substring(0, Directory.GetCurrentDirectory().Length - 15);

            ARMA_GRILLA();
        }
Exemple #6
0
        private FrmVENTA(MODELO.USUARIO oUSUARIO)
        {
            InitializeComponent();
            //Obtiene las controladoras
            cPRODUCTOS = CONTROLADORA.cPRODUCTOS.Obtener_Instancia();
            cFACTURAS  = CONTROLADORA.cFACTURAS.Obtener_Instancia();
            cAFILIADOS = CONTROLADORA.cAFILIADOS.Obtener_Instancia();
            //Valida las acciones del usuario
            btnRealizar.Enabled = oUSUARIO.VALIDAR_ACCION("FrmFACTURA", "btnRealizar");
            btnRealizar.Enabled = oUSUARIO.VALIDAR_ACCION("FrmFACTURA", "btnRealizar");
            //Lista para cargar los productos elegidos
            listaProductos = new List <MODELO.PRODUCTO>();

            //Autocompleta los datos de la factura
            mtbFecha.Text         = DateTime.Today.ToString();
            oFactura              = new MODELO.FACTURA();
            oFactura.Nro_Factura  = oFactura.Id_Factura + 100;
            txtNumeroFactura.Text = oFactura.Nro_Factura.ToString();
            oFactura.Importe      = 0;

            //Ruta de la carpeta del proyecto: [...]/SISTEMA/
            rutaProyecto = Directory.GetCurrentDirectory().Substring(0, Directory.GetCurrentDirectory().Length - 15);
            ARMA_GRILLA();
        }
Exemple #7
0
        public FrmAFILIADO(MODELO.AFILIADO miAFILIADO, string miaccion)
        {
            InitializeComponent();

            cAFILIADOS = CONTROLADORA.cAFILIADOS.Obtener_Instancia();
            oAFILIADO  = miAFILIADO;
            accion     = miaccion;

            CBPlanes.DataSource    = cAFILIADOS.Obtener_Planes();
            CBPlanes.DisplayMember = "Nombre";

            if (accion != "A")
            {
                txtNombre_Afiliado.Text   = oAFILIADO.Nombre;
                txtDirecion_Afiliado.Text = oAFILIADO.Direccion;
                txtEmail_Afiliado.Text    = oAFILIADO.Email;
                MtbFecha_Nacimiento.Text  = oAFILIADO.Fecha_Nacimiento.ToString();
                Txtsexo_Afiliado.Text     = oAFILIADO.Sexo;
                TxtContrato_Afiliado.Text = oAFILIADO.Numero_Contrato.ToString();
                mtxtDNI_Afiliado.Text     = oAFILIADO.DNI.ToString();
                mtxtTel_Afiliado.Text     = oAFILIADO.Telefono.ToString();
                CBPlanes.Text             = oAFILIADO.PLAN.ToString();
                if (oAFILIADO.Forma_Pago == "Debito Automático")
                {
                    oTarjeta = oAFILIADO.TARJETAS;
                    txtNumeroTarjeta.Text      = oAFILIADO.TARJETAS.Numero.ToString();
                    mtbVencimientoTarjeta.Text = oAFILIADO.TARJETAS.Vencimiento;
                }
                if (oAFILIADO.Forma_Pago.ToString() == "Efectivo")
                {
                    RbEfectivo.Checked = true;
                }
                else
                {
                    RbDebitoAutomatico.Checked = true;
                }
                if (oAFILIADO.Estado == true)
                {
                    ChkEstado.Checked = true;
                }
                else
                {
                    ChkEstado.Checked = false;
                }
            }
            if (accion == "C")
            {
                ChkEstado.Enabled            = false;
                MtbFecha_Nacimiento.Enabled  = false;
                btnGuardar_AFILIADO.Visible  = false;
                btnCancelar.Text             = "CERRAR";
                txtNombre_Afiliado.Enabled   = false;
                txtDirecion_Afiliado.Enabled = false;
                Txtsexo_Afiliado.Enabled     = false;
                mtxtDNI_Afiliado.Enabled     = false;
                mtxtTel_Afiliado.Enabled     = false;
                GB_FormasPago.Enabled        = false;
                gbTarjeta.Enabled            = false;
                TxtContrato_Afiliado.Enabled = false;
                txtEmail_Afiliado.Enabled    = false;
                CBPlanes.Enabled             = false;
            }
        }