Esempio n. 1
0
        //preenche a tela inicial com informaçoes assicronas
        //public JsonResult GetTotalRecebidas(Int16 id = 0)
        //{
        //    Int16 repreid = Domain.Util.valida.getRepresentanteID(User.Identity.Name);

        //    //busca o total de vendas
        //    List<Fechamento> lst = new List<Fechamento>();
        //    lst = ServiceFechamento.getFechamentoRecebidasTotal(DateTime.Now.Month, repreid);

        //    var tt = (from x in lst select x.ValorComissao).Sum();

        //    string ttf = String.Format("{0:C}", tt);

        //    return Json(ttf, JsonRequestBehavior.AllowGet);
        //}

        //preenche a tela inicial com informaçoes assicronas
        //public JsonResult GetTotalVendasByClientes(Int16 id = 0)
        //{
        //    //string tt = string.Empty;
        //    Int16 repreid = Domain.Util.valida.getRepresentanteID(User.Identity.Name);

        //    //busca o total de vendas
        //    List<Compra> lst = new List<Compra>();
        //    lst = ServiceCompra.getComprasTotal(DateTime.Now.Month, repreid);

        //    var agcli = from p in lst group p by p.clienteid into g select new { descr = g.Key, qtde = g.Count()};

        //    var tt = agcli.Count();


        //    return Json(tt, JsonRequestBehavior.AllowGet);
        //}



        //preenche a tela inicial com informaçoes assicronas
        //public JsonResult GetTotalFechadas(Int16 id = 0)
        //{
        //    Int16 repreid = Domain.Util.valida.getRepresentanteID(User.Identity.Name);

        //    //busca o total de vendas
        //    List<Fechamento> lst = new List<Fechamento>();
        //    lst = ServiceFechamento.getFechamentoTotal(DateTime.Now.Month, repreid);

        //    var tt = (from x in lst select x.ValorComissao).Sum();

        //    string ttf = String.Format("{0:C}", tt);

        //    return Json(ttf, JsonRequestBehavior.AllowGet);
        //}

        ////preenche a tela inicial com informaçoes assicronas
        //public JsonResult GetTotalVendas(Int16 id = 0)
        //{
        //    Int16 repreid = Domain.Util.valida.getRepresentanteID(User.Identity.Name);

        //    //busca o total de vendas
        //    List<Compra> lst = new List<Compra>();
        //    lst = ServiceCompra.getComprasTotal(DateTime.Now.Month, repreid);

        //    var tt = (from x in lst select x.ValorComissao).Sum();

        //    string ttf = String.Format("{0:C}", tt);

        //    return Json(ttf, JsonRequestBehavior.AllowGet);
        //}


        public ActionResult Logout()
        {
            CustomMembershipProvider auth = new CustomMembershipProvider();

            auth.Logout();
            return(Redirect(Domain.Util.config.UrlSite + "Home/Index"));
        }