/// <summary> /// get the income money infomation /// </summary> /// <returns></returns> private dynamic GetIncomeInfo() { var json = new { Code = "0000", Count = _moneyLogic.GetIncomeRecordCount(), Money = _moneyLogic.GetTotalIncome() }; return(Response.AsText(JsonConvert.SerializeObject(json), "application/json; charset =UTF-8")); }
public ActionResult gettotalinfo(string uName) { try { var json = new { Code = "0000", Msg = "OK", Income = _moneyLogic.GetTotalIncome(_userLogic.GetUIDbyUserName(uName)), Pay = _moneyLogic.GetTotalPay(_userLogic.GetUIDbyUserName(uName)) }; return(Json(json, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { Code = "0009", Msg = ex.Message }, JsonRequestBehavior.AllowGet)); } }
/// <summary> /// get the summary of the user record /// </summary> /// <param name="uName">the name of the user</param> /// <returns></returns> private dynamic GetTotalInfo(string uName) { try { var json = new { Code = "0000", Msg = "OK", Income = _moneyLogic.GetTotalIncome(_userLogic.GetUIDbyUserName(uName)), Pay = _moneyLogic.GetTotalPay(_userLogic.GetUIDbyUserName(uName)) }; return(Response.AsJson(json)); } catch (Exception ex) { return(Response.AsJson(new { Code = "0009", Msg = ex.Message })); } }