Beispiel #1
0
        private void SetDataFromPreviousPage()
        {
            if (PreviousPage is IConsulta)
            {
                HdnIdFormAction.Value = Convert.ToString((int)Parameters.FormAction.Update);

                try
                {
                    txtRutCliente.Text = ((IConsulta)PreviousPage).Rut;
                    Presenter.GetById();

                    txtNombreCliente.ReadOnly        = true;
                    txtRutCliente.ReadOnly           = true;
                    txtTelefonoCliente.ReadOnly      = true;
                    txtCorreoCliente.ReadOnly        = true;
                    txtNombreEmpresaCliente.ReadOnly = true;
                    txtRutEmpresaCliente.ReadOnly    = true;
                    txtGiroComercial.ReadOnly        = true;
                }
                catch (NotFoundIdException ex)
                {
                    litMensaje.Text = ex.Message;
                    mpeMensaje.Show();
                }
            }
            else
            {
                HdnIdFormAction.Value = Convert.ToString((int)Parameters.FormAction.Insert);

                IIngreso pagPrevia = (IIngreso)PreviousPage;

                #region Nombre de Usuario
                UsuariosDTO objUsuariosDTO = pagPrevia.ObjUsuariosDTO;
                ddlUsuarios.SelectedValue = Convert.ToString(objUsuariosDTO.IdUsuario);
                #endregion

                #region Formalidad
                TipoFormalidadDTO objTipoFormalidadDTO = pagPrevia.ObjTipoFormalidadDTO;
                ddlTipoFormalidad.SelectedValue = Convert.ToString(objTipoFormalidadDTO.IdFormalidad);
                #endregion

                #region Nivel de Ventas
                NivelVentasDTO objNivelVentasDTO = pagPrevia.ObjNivelVentasDTO;
                ddlNivelVentas.SelectedValue = Convert.ToString(objNivelVentasDTO.IdNivelVentas);
                #endregion

                #region Tipo de Empresa
                TipoEmpresaDTO objTipoEmpresaDTO = pagPrevia.ObjTipoEmpresaDTO;
                ddlTipoEmpresa.SelectedValue = Convert.ToString(objTipoEmpresaDTO.IdTipoEmpresa);
                #endregion

                #region Permanencia en el Rubro
                PermanenciaRubroDTO objPermanenciaRubroDTO = pagPrevia.ObjPermanenciaRubroDTO;
                ddlPermanenciaRubro.SelectedValue = Convert.ToString(objPermanenciaRubroDTO.IdPermanenciaRubro);
                #endregion

                #region Familia de Productos - Productos Disponibles
                repFamiliaProductos.DataSource = (List <FamiliaProductosDTO>)(((IIngreso)PreviousPage).LstFamiliaProductos);
                repFamiliaProductos.DataBind();
                #endregion

                txtNombreCliente.ReadOnly        = false;
                txtRutCliente.ReadOnly           = false;
                txtTelefonoCliente.ReadOnly      = false;
                txtCorreoCliente.ReadOnly        = false;
                txtNombreEmpresaCliente.ReadOnly = false;
                txtRutEmpresaCliente.ReadOnly    = false;
                txtGiroComercial.ReadOnly        = false;
            }
        }
 public IngresoController(IIngreso ingreso)
 {
     this.ingreso = ingreso;
 }
Beispiel #3
0
 private Billetera()
 {
     _ingreso = new Ingreso();
     _egreso  = new Egreso();
     Saldo    = 0;
 }
Beispiel #4
0
 public IngresoPresenter(IIngreso view)
 {
     this.view = view;
 }