示例#1
0
 public IActionResult Index()
 {
     _notyf.Success("Success Notification");
     _notyf.Success("Success Notification that closes in 10 Seconds.", 3);
     _notyf.Error("Some Error Message");
     _notyf.Warning("Some Error Message");
     _notyf.Information("Information Notification - closes in 4 seconds.", 4);
     _notyf.Custom("Custom Notification - closes in 5 seconds.", 5, "whitesmoke", "fa fa-gear");
     _notyf.Custom("Custom Notification - closes in 5 seconds.", 10, "#B600FF", "fa fa-home");
     return(View());
 }
示例#2
0
        public async Task <IActionResult> Create([Bind("CityId,CityName,CityCode,ProvinceId,CreatedBy,DateCreated,LastUpdatedBy,DateUpdated")] City city)
        {
            if (ModelState.IsValid)
            {
                _context.Add(city);
                await _context.SaveChangesAsync();

                _notyf.Success("Created successfully...");
                _notyf.Custom("Edited ", 10, "green", "user");
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ProvinceId"] = new SelectList(_context.Province, "ProvinceId", "ProvinceName", city.ProvinceId);
            return(PartialView(city));
        }
示例#3
0
 public IActionResult Index()
 {
     _notyf.Success("Success Notification");
     _notyf.Error("Some Error Message");
     _notyf.Information("Information Notification - closes in 4 seconds.", 4);
     _notyf.Custom("Custom Notification <br><b><i>closes in 5 seconds.</i></b></p>", 5, "indigo", "fa fa-gear");
     return(View());
 }
示例#4
0
        public async Task <IActionResult> Create([Bind("ProductId,ProductName,Category,UnitPrice,StockQty")] Products products)
        {
            if (ModelState.IsValid)
            {
                _context.Add(products);
                await _context.SaveChangesAsync();

                await _hub.Clients.All.SendAsync("LoadProducts");

                _notyf.Custom("Create Succussfully- closes in 5 seconds.", 5, "whitesmoke", "fa fa-gear");
                _notyf.Success("Success that closes in 10 Seconds.", 3);
                return(RedirectToAction(nameof(Index)));
            }
            _notyf.Warning("Some Error Message");
            return(View(products));
        }
示例#5
0
        public async Task <IActionResult> Index()
        {
            if (User.IsInRole("Operador"))
            {
                var operador = await _context.Utilizador.SingleOrDefaultAsync(o => o.Email == User.Identity.Name);

                //Notificação com numero de reclamações em aberto por distrito
                Estado estadoaberto = _context.Estado.FirstOrDefault(e => e.Nome == "Em Aberto");

                var distritooperador = operador.IdDistrito;


                var totalemaberto = _context.Reclamacao.Where(c => (c.IdEstadoNavigation == estadoaberto) && (c.IdClienteNavigation.IdDistrito == distritooperador))
                                    .Include(c => c.IdEstadoNavigation)
                                    .Include(c => c.IdOperadorNavigation)
                                    .Include(c => c.IdClienteNavigation)
                                    .Count();

                _notyf.Custom("Existem " + totalemaberto + " Reclamações em aberto no seu Distrito", 20, "#4fd6d9", "fa fa-home");


                //total de faturação do operador
                List <Contrato> contratosperador = await _context.Contrato
                                                   .Where(c => c.IdOperador == operador.IdUtilizador)
                                                   .ToListAsync();

                int contacontratos = contratosperador.Count;


                decimal totalfaturacao = 0;
                foreach (var item in contratosperador)
                {
                    totalfaturacao += item.PrecoTotal;
                }
                ViewData["totalfaturacao"] = totalfaturacao;
                ViewData["contacontratos"] = contacontratos;
            }
            return(View());
        }
示例#6
0
 public IActionResult Index()
 {
     _notyf.Custom("Existem novas reclamações por responder.", 15, "#FF6347", "fa fa-home");
     return(View());
 }