コード例 #1
0
        public ActionResult CrearPagoCredito(string Detalles, EE_PAGOS_CREDITO c)
        {
            var service = new PagosCreditoService();

            var result = service.CrearPagoCredito(Detalles, c);

            if (result.success)
            {
                var context = new Entities();
                var v_resp  = new ObjectParameter("p_res", typeof(Int32));
                context.P_EE_ACTUALIZAR_PAGO(Convert.ToInt32(result.datos), v_resp);
                string valor = v_resp.Value.ToString();
                if (valor == "1")
                {
                    result.success = true;
                    result.msg     = "Se inserto Correctamente";
                    result.datos   = valor;
                }
                else
                {
                    result.success = false;
                    result.msg     = valor;
                }
            }
            return(Json(result));
        }
コード例 #2
0
        public ActionResult GetAllDetallesPagoCredito(int page, int start, int limit, string sort, string dir, long _dc, string callback, string condicion = null, string codigo = null)
        {
            var filter = new PagingInfo
            {
                page     = page,
                start    = start,
                limit    = limit,
                sort     = sort,
                dir      = dir,
                _dc      = _dc,
                callback = callback,
                search   = condicion
            };
            var service  = new PagosCreditoService();
            var jsondata = service.GetAllDetallesPagoCredito(filter, codigo);
            JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
            string callback1 = callback + "(" + javaScriptSerializer.Serialize(jsondata) + ");";

            return(JavaScript(callback1));
        }