/// <summary> /// Returns a pagedList to a Partial View /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Listagem(int? page, int? numPedido, String nome, String email, int? IdEstado, String Cidade, int? IdPerfilComprador) { page = page ?? 1; //var clientes = new ClienteService().GetByPage(page.Value); var clientes = new ClienteService().GetByPageFiltered(page.Value, numPedido, nome, email, IdEstado, Cidade, IdPerfilComprador, EnumerableExtensions.QuantityRegistersPerPage); List<ClientePedidoModel> listaClientes = new List<ClientePedidoModel>(); foreach (var c in clientes.Item1) { List<Ecommerce_Pedido> listaPedidos = new PedidoService().GetOrdersByIdCliente(c.IdCliente); int countPedidos = listaPedidos.Count; var clientePedido = new ClientePedidoModel { Cliente = c, Pedidos = listaPedidos, CountPedidos = countPedidos }; listaClientes.Add(clientePedido); } var list = new MvcList<ClientePedidoModel>(listaClientes, page.Value, clientes.Item2, EnumerableExtensions.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var Marca = new MarcaService().GetByPage(page.Value); var list = new MvcList<Ecommerce_Produto_Marca>(Marca.Item1, page.Value, Marca.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
/// <summary> /// Returns a partialView with a list /// </summary> /// <returns></returns> public ActionResult Listagem(int? page) { page = page ?? 1; var perfis = new PerfilCompradorService().GetByPage(page.Value); var list = new MvcList<Ecommerce_Perfil>(perfis.Item1, page.Value, perfis.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
/// <summary> /// Listagem. /// </summary> /// <param name="page">The page.</param> /// <returns></returns> public ActionResult Listagem(Int32? page) { page = page ?? 1; var itens = new IdiomaService().GetByPage(page.Value); var list = new MvcList<Idioma>(itens.Item1, page.Value, itens.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page, DateTime? dataInicio, DateTime? dataFim, String nome) { page = page ?? 1; var raccoManias = new RaccoManiaService().GetByPage(page.Value, dataInicio, dataFim, nome); var list = new MvcList<Ecommerce_RaccoMania>(raccoManias.Item1, page.Value, raccoManias.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult ListagemItens(Int32? page, Int32? idSugestao) { page = page ?? 1; var Sugestao = new SugestaoService().GetByPageItem(page.Value, idSugestao); var list = new MvcList<Ecommerce_Produto_SugestaoItem>(Sugestao.Item1, page.Value, Sugestao.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page, int? IdTipoMenu, int? IdMenuItemMae) { page = page ?? 1; var Menu = new MenuService().GetByPage(page.Value, IdTipoMenu, IdMenuItemMae); var list = new MvcList<MenuItem>(Menu.Item1, page.Value, Menu.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var Aplicacao = new AplicacaoService().GetByPage(page.Value); var list = new MvcList<Ecommerce_Aplicacao>(Aplicacao.Item1, page.Value, Aplicacao.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
//DataInclusaoDataExpiracaoCategoria public ActionResult Listagem(int? page, DateTime? DataPublicacao, DateTime? DataExpiracao, int? idConteudoCategoria, int? IdTipoConteudo) { page = page ?? 1; var Conteudo = new ConteudoService().GetByPage(page.Value, DataPublicacao, DataExpiracao, idConteudoCategoria, IdTipoConteudo); var list = new MvcList<Conteudo>(Conteudo.Item1, page.Value, Conteudo.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var Linhas = new LinhaService().GetByPage(page.Value); var list = new MvcList<Ecommerce_Linha>(Linhas.Item1, page.Value, Linhas.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var parametro = new ParametroService().GetByPage(page.Value); var list = new MvcList<Parametro>(parametro.Item1, page.Value, parametro.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
//DataInclusaoDataExpiracaoCategoria public ActionResult Listagem(int? page) { page = page ?? 1; var Conteudo = new GrupoService().GetByPage(page.Value); var list = new MvcList<Grupo>(Conteudo.Item1, page.Value, Conteudo.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult ListagemPedido(Int32? page, Int32? IdPedido) { page = page ?? 1; var pedido = new PedidoService().GetByPagePedido(page.Value, IdPedido, EnumerableExtensions.QuantityRegistersPerPage); var list = new MvcList<Ecommerce_PedidoItem>(pedido.Item1, page.Value, pedido.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult ListagemArquivos(Int32? page, Int32? idGaleria) { page = page ?? 1; var arquivo = new GaleriaService().GetByPageArquivo(page.Value, idGaleria); var list = new MvcList<Arquivo>(arquivo.Item1, page.Value, arquivo.Item2, 200); return PartialView(list); }
public ActionResult Listagem(Int32? page, String nomeGaleria, Int32? codigoGaleria) { page = page ?? 1; var galeria = new GaleriaService().GetByPage(page.Value, nomeGaleria, codigoGaleria); var list = new MvcList<Galeria>(galeria.Item1, page.Value, galeria.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(Int32? page, String nomeProduto, String codigoProduto) { page = page ?? 1; var Sugestao = new SugestaoService().GetByPage(page.Value, nomeProduto, codigoProduto); var list = new MvcList<Ecommerce_Produto_Sugestao>(Sugestao.Item1, page.Value, Sugestao.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page, String nomeCategoria, String nomeCategoriaMae) { page = page ?? 1; var categorias = new CategoriaService().GetByPage(page.Value, nomeCategoria, nomeCategoriaMae); var list = new MvcList<Ecommerce_Categoria>(categorias.Item1, page.Value, categorias.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var cCategorias = new ConteudoCategoriaService().GetByPage(page.Value); var list = new MvcList<Conteudo_Categoria>(cCategorias.Item1, page.Value, cCategorias.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page) { page = page ?? 1; var tipoProduto = new TipoProdutoService().GetByPage(page.Value); var list = new MvcList<Ecommerce_TipoProduto>(tipoProduto.Item1, page.Value, tipoProduto.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
/// <summary> /// Returns a Partial View with a gridview filtered (or not) /// </summary> /// <param name="page"></param> /// <param name="nome"></param> /// <param name="codigo"></param> /// <param name="idCategoria"></param> /// <param name="idProdutoMarca"></param> /// <returns></returns> public ActionResult Listagem(Int32? page, String nome, String codigo, Int32? idCategoria, Int32? idProdutoMarca) { page = page ?? 1; var produtos = new ProdutoService().GetByPage(page.Value, nome, codigo, idCategoria, idProdutoMarca); var list = new MvcList<Ecommerce_Produto>(produtos.Item1, page.Value, produtos.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
private void SyncVenues(MvcList local, MvcList remote, SingingClub scRemote) { foreach (object o in local) { TSCVenues localitem = o as TSCVenues; if (localitem != null && localitem.VenueKey.Trim().Length > 0) { bool found = false; foreach (object oremote in remote) { TSCVenues remoteitem = oremote as TSCVenues; if (remoteitem != null && remoteitem.VenueKey.Trim().Length > 0) { if (localitem.KeyEquals(remoteitem) == true) { if (localitem.Equals(remoteitem) == false) { UpdateVenue(localitem, remoteitem, scRemote); } found = true; break; } } } if (found == false) { InsertVenue(localitem, scRemote); } } } foreach (object o in remote) { TSCVenues remoteitem = o as TSCVenues; if (remoteitem != null && remoteitem.VenueKey.Trim().Length > 0) { bool found = false; foreach (object olocal in local) { TSCVenues localitem = olocal as TSCVenues; if (localitem != null && localitem.VenueKey.Trim().Length > 0) { if (remoteitem.KeyEquals(localitem) == true) { found = true; break; } } } if (found == false) { DeleteVenue(remoteitem, scRemote); } } } }
/// <summary> /// Returns a partialList /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Listagem(int? page) { page = page ?? 1; var entregas = new EntregaService().GetByPage(page.Value); var list = new MvcList<Ecommerce_TipoEntrega>(entregas.Item1, page.Value, entregas.Item2, EnumerableExtensions.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page, DateTime? dataInicioLog, DateTime? dataFimLog, Int32? tipoLog, String loginLog, String ipLog) { page = page ?? 1; var log = new LogService().GetByPage(page.Value, dataInicioLog, dataFimLog, tipoLog, loginLog, ipLog); var list = new MvcList<Log>(log.Item1, page.Value, log.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
/// <summary> /// Returns a list of "Formas Pagamento" /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Listagem(int? page) { page = page ?? 1; var pagamentos = new PagamentoService().GetByPage(page.Value); var list = new MvcList<Ecommerce_FormaPagamento>(pagamentos.Item1, page.Value, pagamentos.Item2, EnumerableExtensions.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Listagem(int? page, DateTime? DataInclusao, DateTime? DataExpiracao) { page = page ?? 1; var Banner = new BannerService().GetByPage(page.Value, DataInclusao, DataExpiracao); var list = new MvcList<Banner>(Banner.Item1, page.Value, Banner.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
/// <summary> /// Method that returns a PartialList (5 regs.) for indexPage. /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Listagem(int? page) { page = page ?? 1; var comentarios = new ComentarioService().GetByPageForIndex(page.Value); var list = new MvcList<Ecommerce_Produto_Comentario>(comentarios.Item1, page.Value, comentarios.Item2, 5); return PartialView(list); }
private void SyncQueues(MvcList local, MvcList remote, SingingClub scRemote) { foreach (object o in local) { TSCQueue localitem = o as TSCQueue; if (localitem != null && localitem.EventKey.Trim().Length > 0 && localitem.SingerKey.Trim().Length > 0 && localitem.QueueRound > 0) { bool found = false; foreach (object oremote in remote) { TSCQueue remoteitem = oremote as TSCQueue; if (remoteitem != null && remoteitem.EventKey.Trim().Length > 0 && remoteitem.SingerKey.Trim().Length > 0 && remoteitem.QueueRound > 0) { if (localitem.KeyEquals(remoteitem) == true) { if (localitem.Equals(remoteitem) == false) { UpdateQueue(localitem, remoteitem, scRemote); } found = true; break; } } } if (found == false) { InsertQueue(localitem, scRemote); } } } foreach (object o in remote) { TSCQueue remoteitem = o as TSCQueue; if (remoteitem != null && remoteitem.EventKey.Trim().Length > 0 && remoteitem.SingerKey.Trim().Length > 0 && remoteitem.QueueRound > 0) { bool found = false; foreach (object olocal in local) { TSCQueue localitem = olocal as TSCQueue; if (localitem != null && localitem.EventKey.Trim().Length > 0 && localitem.SingerKey.Trim().Length > 0 && localitem.QueueRound > 0) { if (remoteitem.KeyEquals(localitem) == true) { found = true; break; } } } if (found == false) { DeleteQueue(remoteitem, scRemote); } } } }
public ActionResult Listagem(Int32? page, DateTime? dataInicio, DateTime? dataFim, int? numeroPedido, int? situacaoPedido, String nomeCliente, int? valorTipoPedido, decimal? valorPedido) { page = page ?? 1; if (valorPedido == 0) { valorPedido = null; } var pedido = new PedidoService().GetByPage(page.Value, dataInicio, dataFim, numeroPedido, situacaoPedido, nomeCliente, valorTipoPedido, valorPedido); var list = new MvcList<Ecommerce_Pedido>(pedido.Item1, page.Value, pedido.Item2, Settings.QuantityRegistersPerPage); return PartialView(list); }
public ActionResult Grid(int? page) { page = page ?? 1; if (User.Identity.IsAuthenticated && UserAuthenticated != null && UserAuthenticated.IdCliente.HasValue) { var enderecos = new EnderecoService().GetAddressesByClientId(page.Value, UserAuthenticated.IdCliente.Value); var list = new MvcList<Ecommerce_Cliente_Endereco>(enderecos.Item1, page.Value, enderecos.Item2, 5); return PartialView(list); } return null; }
private void btnRun_Click(object sender, EventArgs e) { HideButtons(); try { MvcList localVenues = null; MvcList localEvents = null; MvcList localSingers = null; MvcList localQueues = null; MvcList remoteVenus = null; MvcList remoteEvents = null; MvcList remoteSingers = null; MvcList remoteQueues = null; SingingClub scLocal = new SingingClub("Server=dmmlenovo1;Database=TheSingingClub;Integrated Security=true"); SingingClub scRemote = new SingingClub("Data Source=SQL5012.Smarterasp.net;Initial Catalog=DB_9BA515_LocalSingingClub;User Id=DB_9BA515_LocalSingingClub_admin;Password=Groovy52!;"); localVenues = GetVenues(scLocal); localEvents = GetEvents(scLocal); localSingers = GetSingers(scLocal); /* * string eventKey = GetLatestEventKey(); * if (eventKey.Trim().Length > 0) * { * TSCQueue q = new TSCQueue(); * q.EventKey = eventKey; * q.QueueRound = 1; * string r1xml = scRemote.GeneralStore(TableName.TSCQueue, TableAction.GET, q.GetDataXml()); * } */ localQueues = GetQueues(scLocal); remoteVenus = GetVenues(scRemote); remoteEvents = GetEvents(scRemote); remoteSingers = GetSingers(scRemote); remoteQueues = GetQueues(scRemote); SyncVenues(localVenues, remoteVenus, scRemote); SyncEvents(localEvents, remoteEvents, scRemote); SyncSingers(localSingers, remoteSingers, scRemote); SyncQueues(localQueues, remoteQueues, scRemote); } catch (Exception ex) { MessageBox.Show(ex.Message, "Exception occurred"); } finally { UnHideButtons(); } }
private MvcList GetSingers(SingingClub sc) { MvcList list = new MvcList(); string xml = sc.GeneralStore(TableName.TSCSingers, TableAction.GET, (new TSCSingers().GetDataXml())); if (xml.Trim().Length > 0) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); XmlNodeList nodes = doc.SelectNodes("/Root/Data"); foreach (XmlNode node in nodes) { TSCSingers singers = new TSCSingers(node); list.Add(singers); } } return(list); }
public ActionResult Promoter(int page = 1, string nameFull = "", string idDocument = "", string email = "", string codPromoter = "") { ViewBag.nameFull = nameFull; ViewBag.idDocument = idDocument; ViewBag.email = email; ViewBag.codPromoter = codPromoter; ViewBag.page = page; var promoterlist = new Promoter().SelectPromoter(Settings.AutenticationKeyEarningSystem, nameFull, idDocument, email, codPromoter).ToList(); var list = new MvcList<PromoterModel>(promoterlist .OrderBy(x => x.NameFull) .Skip((page * Helper.Constants.AdminPromoterRegistersPerPage) - Helper.Constants.AdminPromoterRegistersPerPage) .Take(Helper.Constants.AdminPromoterRegistersPerPage), page, promoterlist.Count, Helper.Constants.AdminPromoterRegistersPerPage); return View(list); }
public ActionResult ListingPercent(int? page) { try { var commissionList = new Commissions().SelectAll(Settings.AutenticationKeyEarningSystem); var mvcList = new MvcList<CommissionPercentageModel>(commissionList .OrderBy(x => x.Id) .Take(Settings.PopupListTotalRegisters), page.GetValueOrDefault(), Settings.PopupListTotalRegisters, Settings.PopupListTotalRegisters); return PartialView(mvcList); } catch (Exception ex) { LogService.Log("GS.CommissionController.Listing() :: Exception : ", ex); } return PartialView("ListingPercent"); }
/// <summary> /// Returns a pagedList of Parameters /// </summary> /// <param name="page"></param> /// <returns></returns> public ActionResult Listing(int? page) { try { var parameterList = new Parameter().GetAllParameter(Settings.AutenticationKeyEarningSystem); var mvcList = new MvcList<ParameterModel>(parameterList .OrderBy(x => x.IdParametro) .Take(Settings.PopupListTotalRegisters), page.GetValueOrDefault(), Settings.PopupListTotalRegisters, Settings.PopupListTotalRegisters); return PartialView(mvcList); }catch(Exception ex) { LogService.Log("GS.ParameterController.Listing() :: Exception : ", ex); } return PartialView("Listing"); }