示例#1
0
        protected JsonResult RepReurnOK()
        {
            RepMsg rg = new RepMsg()
            {
                code = "0", status = "ok"
            };

            return(Json(rg, "application/json", System.Text.Encoding.Default, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        protected JsonResult RepReurnError(string msg)
        {
            RepMsg rg = new RepMsg()
            {
                code = "-1", status = "error", msg = msg
            };

            return(Json(rg, "application/json", System.Text.Encoding.Default, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        protected JsonResult RepReurn(string code, string status, string msg, object data)
        {
            RepMsg rg = new RepMsg()
            {
                code = code, status = status, msg = msg, data = data
            };

            return(Json(rg, "application/json", System.Text.Encoding.Default, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        protected JsonResult RepReurnOK(object data)
        {
            RepMsg rg = new RepMsg()
            {
                code = "0", status = "ok", data = data
            };

            return(Json(rg, "application/json", System.Text.Encoding.UTF8, JsonRequestBehavior.AllowGet));
        }