public SuanLiListModel GetSuanLiJournalList(long userid, int pageindex, int pagesize) { SuanLiListModel model = new SuanLiListModel(); int pagecount = 0, totalcount = 0; DataSet ds = suanliJournalBLL.GetListByPageProc(userid, pageindex, pagesize, out pagecount, out totalcount, "", 1); model.NotesList = SellTableToList(ds.Tables[0]); model.CountPage = pagecount; return(model); }
public string GetSuanLiList(HttpContext context) { //string User = context.Request["UserID"]; string UserCode = context.Request["UserCode"]; string Pay = context.Request["Pay"]; //1 什么币 2 什么币 string Remark = context.Request["Remark"]; //备注 string Money = context.Request["Money"]; //金额 string Key = context.Request["Key"]; //key int Page = 0; int Mumber = 0; long UserID = 0; decimal jine = 0; if (string.IsNullOrEmpty(UserCode) || UserCode.Trim() == string.Empty) { return(ResultJson(ResultType.error, "请输入用户账号", "")); } AllCore AC = new AllCore(); UserID = AC.userBLL.GetUserID(UserCode); if (UserID <= 0) { return(ResultJson(ResultType.error, "账号不存在!", "")); } if (!decimal.TryParse(Money, out jine)) { return(ResultJson(ResultType.error, "金额不正确!", "")); } if (jine <= 0) { return(ResultJson(ResultType.error, "金额不能为0!", "")); } if (Pay == "1") { AC.UpdateAccount("", UserID, jine, 0); } else if (Pay == "2") { } else { return(ResultJson(ResultType.error, "支付类型错误!", "")); } SuanLiJournalService svc = new SuanLiJournalService(); SuanLiListModel model = svc.GetSuanLiJournalList(UserID, Page, Mumber); return(ResultJson(ResultType.success, "", model)); }
public string GetSuanLiList(HttpContext context) { string User = context.Request["UserID"]; string Page_1 = context.Request["Page"]; string Mumber_1 = context.Request["Mumber"]; int Page = 0; int Mumber = 0; long UserID = 0; if (string.IsNullOrEmpty(User) || User.Trim() == string.Empty) { return(ResultJson(ResultType.error, "请输入用户ID", "")); } try { UserID = long.Parse(User); } catch (Exception) { UserID = 0; } try { Page = int.Parse(Page_1); Mumber = int.Parse(Mumber_1); } catch (Exception) { return(ResultJson(ResultType.error, "页码错误!", "")); } if (Page == 0) { Page = 1; } SuanLiJournalService svc = new SuanLiJournalService(); SuanLiListModel model = svc.GetSuanLiJournalList(UserID, Page, Mumber); return(ResultJson(ResultType.success, "", model)); }