예제 #1
0
        public JsonResult Update(GlobaisClienteBE obj, string cli_CFOP)
        {
            obj.cli_CFOP = Convert.ToDecimal(cli_CFOP.Replace(".", ","));
            var _cliente = new GlobaisClienteBLL().Update(obj);

            return(Json(_cliente, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult CarregarDados(int id)
        {
            var cliente = new GlobaisClienteBLL().SelectID(new GlobaisClienteBE {
                cli_id = id
            });

            return(Json(cliente, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public PartialViewResult CarregaListaCliente(string cli_nomeFantasia, string cli_razaoSocial, string cli_CGC)
        {
            List <GlobaisClienteBE> listaClientes = new GlobaisClienteBLL().Select(new GlobaisClienteBE {
                cli_nomeFantasia = cli_nomeFantasia, cli_razaoSocial = cli_razaoSocial, cli_CGC = cli_CGC
            });

            return(PartialView(listaClientes));
        }
        public JsonResult CarregaClientes()
        {
            var lista  = new GlobaisClienteBLL().Select();
            var result = (from x in lista select new GlobaisDropDown {
                Id = x.cli_id.ToString(), Nome = x.cli_nomeFantasia
            });

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        List <SCMContratoBE> CarregaCliente(List <SCMContratoBE> obj)
        {
            GlobaisClienteBLL cli = new GlobaisClienteBLL();

            for (int i = 0; i < obj.Count; i++)
            {
                var cliente = cli.SelectID(new GlobaisClienteBE {
                    cli_id = obj[i].cli_id
                });
                if (cliente != null)
                {
                    obj[i].Cliente = cliente;
                }
                else
                {
                    obj[i].Cliente = new GlobaisClienteBE();
                }
            }
            return(obj);
        }
예제 #6
0
        public JsonResult Deletar(GlobaisClienteBE obj)
        {
            var _cliente = new GlobaisClienteBLL().Delete(obj);

            return(Json(_cliente, JsonRequestBehavior.AllowGet));
        }