public AbmOfertasForm(OfertaService ofertaService, ProveedorService proovedorService)
 {
     this.ofertaService    = ofertaService;
     this.proovedorService = proovedorService;
     InitializeComponent();
     cargarDataGrid();
 }
Exemple #2
0
        public AdicionarOfertaPageViewModel(INavigationService navigationService, IInputAlertDialogService inputAlertDialogService, IDependencyService dependencyService)
        {
            _navigationService       = navigationService;
            _inputAlertDialogService = inputAlertDialogService;

            _tipoService    = new TipoService();
            _produtoService = new ProdutoService();
            _ofertaService  = new OfertaService();

            TirarFotoCommand        = new DelegateCommand(ExecuteTirarFotoCommandAsync);
            SelecionarImagemCommand = new DelegateCommand(ExecuteSelecionarImagemCommandAsync);

            AdicionarProdutoCommand = new DelegateCommand(ExecuteAdicionarProdutoCommandAsync);
            AdicionarTipoCommand    = new DelegateCommand(ExecuteAdicionarTipoCommandAsync);

            LimparCommand = new DelegateCommand(ExecuteLimparCommand);
            SalvarCommand = new DelegateCommand(ExecuteSalvarCommandAsync);

            Tipos    = new ObservableCollection <Tipo>();
            Produtos = new ObservableCollection <Produto>();

            Sincroniza();

            DataInicioPicker = DateTime.Today;
            DataFimPicker    = DateTime.Today;

            DestaqueSwitch = false;

            IsBusy = false;
        }
 public ConsumoOferta(CompraService compraService, OfertaService ofertaService)
 {
     this.ofertaService = ofertaService;
     this.compraService = compraService;
     InitializeComponent();
     //cargarDataDridView();
 }
Exemple #4
0
        public OfertaTeste()
        {
            _ofertas = PreencherLista(5);
            _oferta  = _ofertas.First();

            _ofertaRepository = new Mock <IOfertaRepository>();
            _ofertaService    = new OfertaService(_ofertaRepository.Object);
        }
Exemple #5
0
 public ComprarOfertaForm1(OfertaService ofertaService, ProveedorService proveedorService,
                           ClienteService clienteService)
 {
     this.ofertaService    = ofertaService;
     this.proveedorService = proveedorService;
     this.clienteService   = clienteService;
     InitializeComponent();
     inicializarFiltro();
     cargarDataGrid();
 }
 public AltaOfertaForm(OfertaService ofertaService, ProveedorService proovedorService)
 {
     this.ofertaService    = ofertaService;
     this.proovedorService = proovedorService;
     InitializeComponent();
     llenarComboProovedor();
     fechaPublicPicker.Value   = fechaDelDia;
     fechaPublicPicker.MinDate = fechaDelDia;
     fechaVencPicker.Value     = fechaDelDia;
     fechaVencPicker.MinDate   = fechaDelDia;
 }
        public FacturarProveedorForm1(CompraService compraService, ProveedorService _proveedorService,
                                      OfertaService _ofertaService,
                                      FacturaService _facturaService)
        {
            this._compraService    = compraService;
            this._proveedorService = _proveedorService;
            this._ofertaService    = _ofertaService;
            this._facturaService   = _facturaService;

            InitializeComponent();
            inicioFactDate.Value = fechaDelDia;
            finFactDate.Value    = fechaDelDia;
            cargarProveedores();
        }
        public ListPageViewModel(INavigationService navigationService)
        {
            _navigationService = navigationService;
            _ofertaService     = new OfertaService();
            _produtoService    = new ProdutoService();

            Ofertas        = new ObservableCollection <Oferta>();
            OfertasGraph   = new ObservableCollection <Oferta>();
            Produtos       = new ObservableCollection <Produto>();
            ProdutoOfertas = new ObservableCollection <ProdutoOfertas>();

            RefreshCommand = new DelegateCommand(CarregarOfertasAsync);

            OpenGraphCommand = new Command <ProdutoOfertas>(OpenGraphAsync);

            Sincroniza();

            CarregarOfertasAsync();
        }
Exemple #9
0
        public HttpResponseMessage Get()
        {
            var    Session  = HttpContext.Current.Session;
            string id       = (string)Session["UserNit"];
            int    idOferta = 0;

            if (HttpContext.Current.Request.QueryString["oferta"] != null && HttpContext.Current.Request.QueryString["oferta"].ToString() != "undefined")
            {
                idOferta = System.Convert.ToInt32(HttpContext.Current.Request.QueryString["oferta"]);
            }

            HttpContext.Current.Response.AppendHeader("ofertaActiva", idOferta.ToString());
            OfertaService       os      = new OfertaService();
            List <Oferta>       ofertas = os.GetOfertasByNit(id, idOferta);
            HttpResponseMessage msg     = new HttpResponseMessage();

            msg.Content    = new ObjectContent <object>(ofertas, new System.Net.Http.Formatting.JsonMediaTypeFormatter());
            msg.StatusCode = HttpStatusCode.OK;
            return(msg);
        }