/// <summary> /// 账单明细 /// </summary> public void AccountDetail(int first, string accWays, DateTime? sd, DateTime? ed) { int rows = 10; int count = 0; PropertyBag["cur_page_account"] = true; U_UserInfo logonUser = base.GetUser(); Service.Bll.Order.AccountLogBLL abll = new TMM.Service.Bll.Order.AccountLogBLL(); PropertyBag["sumIncome"] = abll.SumIncome(logonUser.UserId); //可用余额 Service.Bll.User.MAccountBLL accBll = new TMM.Service.Bll.User.MAccountBLL(); PropertyBag["acc"] = accBll.GetByUserId(logonUser.UserId); int[] accountWays = null; if (accWays == "receipt") { accountWays = new int[] { (int)AmountWay.In,(int)AmountWay.INCOME,(int)AmountWay.MIn,(int)AmountWay.INCOME_TG }; } if (accWays == "payout") { accountWays = new int[] { (int)AmountWay.Out,(int)AmountWay.ROut}; } IList<AccountLog> list = abll.GetList(logonUser.UserId, accountWays, sd, ed, first, rows, out count); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; PropertyBag["sd"] = sd; PropertyBag["ed"] = ed; }
public void AccountLog(int first, int userId) { UserService us = Context.GetService<UserService>(); Hashtable p = new Hashtable(); int rows = 20; int count = 0; IList<AccountLog> list = us.AccountLogBll.GetList(userId, null, null, null, first, rows, out count); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
public void Account(int first,string email) { UserService us = Context.GetService<UserService>(); Hashtable p = new Hashtable(); if (!string.IsNullOrEmpty(email)) { p.Add("Email",email); } int rows = 20; int count = 0; count = us.MAccountBll.GetCount(p); IList<MAccount> list = us.MAccountBll.GetList(p, null, first, rows); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
/// <summary> /// 系统公告 /// </summary> public void SysMsg(int first) { PropertyBag["cur_page_msg"] = true; UserService us = Context.GetService <UserService>(); IList <M_Message> mlist = us.MessageBll.GetSysMessageList(first, 10); mlist.ToList().ForEach(m => m.Content = m.Content.Replace(Convert.ToChar(10).ToString(), "<br/>")); Hashtable p = new Hashtable(); p.Add("Mtype", (int)Model.Enums.MessageType.SysMsg); int count = us.MessageBll.GetCount(p); Common.ListPage lp = new TMM.Core.Common.ListPage((IList)mlist, first, 10, count); PropertyBag["listPage"] = lp; }
public void Index(string key,int? first,string docType) { if (!first.HasValue) first = 0; int rows = 10; int count = 0; DocService ds = Context.GetService<DocService>(); if(!string.IsNullOrEmpty(key)) { //IList<DDocInfo> list = ds.DDocInfoBll.GetList(key, first.Value, rows, out count); Core.Search.Index sIndexer = new TMM.Core.Search.Index(); sIndexer.TableName = "vwDocInfo"; sIndexer.DocType = docType; long timeCost = 0; IList list = sIndexer.Search(key, first.Value, rows, out count, out timeCost); ListPage lp = new ListPage((IList)list,first.Value,rows,count); PropertyBag["lp"] = lp; PropertyBag["seconds"] = string.Format("{0:F3}", decimal.Parse(timeCost.ToString()) / 1000); } }
/// <summary> /// 发送的消息 /// </summary> public void SentMsg(int first) { PropertyBag["cur_page_msg"] = true; int rows = 10; U_UserInfo logonUser = base.GetUser(); UserService us = Context.GetService<UserService>(); int count = 0; IList<M_Message> mlist = us.MessageBll.GetListByUser(first,rows,out count,logonUser.UserId); //mlist.ToList().ForEach(m => m.Content = m.Content.ReplaceEnterStr()); ListPage lp = new ListPage((IList)mlist, first, rows, count); PropertyBag["listPage"] = lp; }
/// <summary> /// 给系统发消息 /// </summary> public void SendTo(int first) { PropertyBag["cur_page_msg"] = true; //历史消息 U_UserInfo logonUser = base.GetUser(); UserService us = Context.GetService<UserService>(); int count = 0; IList<M_Message> mlist = us.MessageBll.GetListSendToAdmin( logonUser.UserId, ConfigHelper.AdminUserId, first, 10,out count); mlist.ToList().ForEach(m=>m.Content = m.Content.ReplaceEnterStr()); ListPage lp = new ListPage((IList)mlist, first, 10, count); PropertyBag["listPage"] = lp; }
/// <summary> /// 通知 /// </summary> public void SysInform(int first) { PropertyBag["cur_page_msg"] = true; try { int rows = 10; UserService us = Context.GetService<UserService>(); U_UserInfo logonUser = base.GetUser(); int count = 0; IList<M_Message> mlist = us.MessageBll.GetInforms(first, rows, out count, logonUser.UserId); ListPage lp = new ListPage((IList)mlist, first, rows, count); PropertyBag["listPage"] = lp; } catch(Exception ex) { Utils.Log4Net.Error(ex); } }
public void Reward(int first,string docTitle,int? status) { DocService ds = Context.GetService<DocService>(); Hashtable p = new Hashtable(); if (!string.IsNullOrEmpty(docTitle)) p.Add("Title", docTitle); if(status.HasValue) p.Add("Status",status.Value); int rows = 20; int count = ds.TReqDocBll.GetCount(p); IList<TReqDoc> list = ds.TReqDocBll.GetList(p, null, first, rows); PropertyBag["lp"] = new ListPage((IList)list, first, rows, count); }
/// <summary> /// 我的收藏 /// </summary> public void MyFav(int first, int? favCataId) { int rows = 10; PropertyBag["cur_page_fav"] = true; UserService us = Context.GetService<UserService>(); U_UserInfo logonUser = base.GetUser(); int count = 0; IList<MFavorite> list = us.MFavoriteBll.GetListByUserId(first, rows, out count, logonUser.UserId, favCataId); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; //未分类文档总数 PropertyBag["unCatalogDocCount"] = us.MFavoriteBll.GetCataDocCount(logonUser.UserId, 0); //我的文件夹列表 PropertyBag["folders"] = us.MCatalogBll.GetListByUser(logonUser.UserId, 2); if (favCataId.HasValue) { if (favCataId.Value != 0) { MCatalog mc = us.MCatalogBll.Get(favCataId.Value); PropertyBag["mc"] = mc; } } }
/// <summary> /// 我的文档 /// </summary> public void MyDoc(int first,string keyword,int? userCataId) { PropertyBag["cur_page_index"] = true; int rows = 10; PropertyBag["cur_page_index"] = true; UserService us = Context.GetService<UserService>(); U_UserInfo logonUser = base.GetUser(); int count = 0; IList<DDocInfo> list = us.DocInfoBll.GetListByUser(logonUser.UserId, out count, first, rows,keyword,userCataId,null); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; //总文档量 PropertyBag["allDocCount"] = count; //未分类文档总数 PropertyBag["unCatalogDocCount"] = us.DocInfoBll.GetCataDocCount(logonUser.UserId, 0); //总浏览量 PropertyBag["allViewCount"] = us.DocInfoBll.GetViewCount(logonUser.UserId); //我的文件夹列表 PropertyBag["folders"] = us.MCatalogBll.GetListByUser(logonUser.UserId, 1); if (userCataId.HasValue) { if (userCataId.Value != 0) { MCatalog mc = us.MCatalogBll.Get(userCataId.Value); PropertyBag["mc"] = mc; } } RenderView("mydoc"); }
/// <summary> /// 我的投稿 /// </summary> public void MyContribute(int first) { PropertyBag["cur_page_addreward"] = true; DocService ds = Context.GetService<DocService>(); U_UserInfo u = base.GetUser(); int rows = 10; int count = 0; IList<TJoinDoc> list = ds.TJoinDocBll.GetList(u.UserId, out count, first, rows); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
public void HomePage(int userId,int first,int? cateId) { CancelLayout(); int rows = 10; try { UserService us = Context.GetService<UserService>(); PropertyBag["homeUser"] = us.UserInfoBll.Get(userId); //个人文件夹 PropertyBag["folders"] = us.MCatalogBll.GetListByUser(userId, 1); //文档总数 int docCount = 0; //文档列表 IList<DDocInfo> docList = us.DocInfoBll.GetListByUser(userId,out docCount,first,rows,null,cateId,true); ListPage lp = new ListPage((IList)docList,first,rows,docCount); PropertyBag["docList"] = lp; PropertyBag["allDocCount"] = docCount; //总浏览量 PropertyBag["allViewCount"] = us.DocInfoBll.GetViewCount(userId); //收藏文档列表 int favCount = 0; PropertyBag["favList"] = us.MFavoriteBll.GetListByUserId(0, 10, out favCount,userId, null); PropertyBag["favCount"] = favCount; } catch (Exception ex) { Utils.Log4Net.Error(ex); } }
public void ExchangeList(int first, DateTime? startdate, DateTime? enddate) { int rows = 10; int count = 0; PropertyBag["cur_page_account"] = true; OrderService os = Context.GetService<OrderService>(); U_UserInfo u = base.GetUser(); IList<TOrder> list = os.TOrderBll.GetList(u.UserId, (int)OrderType.Exchange, first, rows, out count,startdate,enddate); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
/// <summary> /// 系统公告 /// </summary> public void SysMsg(int first) { PropertyBag["cur_page_msg"] = true; UserService us = Context.GetService<UserService>(); IList<M_Message> mlist = us.MessageBll.GetSysMessageList(first, 10); mlist.ToList().ForEach(m => m.Content = m.Content.Replace(Convert.ToChar(10).ToString(), "<br/>")); Hashtable p = new Hashtable(); p.Add("Mtype", (int)Model.Enums.MessageType.SysMsg); int count = us.MessageBll.GetCount(p); Common.ListPage lp = new TMM.Core.Common.ListPage((IList)mlist, first, 10, count); PropertyBag["listPage"] = lp; }
public void Contribute(int first,int? tid,string likeTitle) { int rows = 20; DocService ds = Context.GetService<DocService>(); Hashtable p = new Hashtable(); if (tid.HasValue) { p.Add("TId", tid.Value); TReqDoc tr = ds.TReqDocBll.Get(tid.Value); PropertyBag["trdoc"] = tr; } if (!string.IsNullOrEmpty(likeTitle)) p.Add("LikeTitle",likeTitle); int count = ds.TJoinDocBll.GetCount(p); IList<TJoinDoc> list = ds.TJoinDocBll.GetList(p, null, first, rows); PropertyBag["lp"] = new ListPage((IList)list, first, rows, count); }
public void Index( int first, int? userId, bool? isAudit, string likeTitle, bool? isRecommend, string orderBy, bool? isManualConvert, int? cateId,string cateName ,bool? isMajia) { int rows = 20; int count = 0; DocService ds = Context.GetService<DocService>(); UserService userService = Context.GetService<UserService>(); Hashtable p = new Hashtable(); //p.Add("IsAudit", isAudit); if (isAudit.HasValue) p.Add("IsAudit", isAudit.Value); if (!string.IsNullOrEmpty(likeTitle)) p.Add("LikeTitle",likeTitle); if (isRecommend.HasValue) { if (isRecommend.Value) { p.Add("IsRecommend",isRecommend.Value); } } if (userId.HasValue) p.Add("UserId",userId.Value); if (isManualConvert.HasValue) { if (isManualConvert.Value) { p.Add("DocTypes",Helper.ConfigHelper.NotConvertDocTypes); } } if (cateId.HasValue) { int[] cateids = Utils.TmmUtils.GetCatalogIds(cateId.Value); if (cateids != null && cateids.Length > 0) p.Add("CateIds", cateids); } if (isMajia.HasValue) { p.Add("IsMajia",isMajia.Value); } // p.Add("IsTaskDoc",false); count = ds.DDocInfoBll.GetCount(p); if (!string.IsNullOrEmpty(orderBy)) orderBy += " DESC"; IList<DDocInfo> docs = ds.DDocInfoBll.GetList(p, orderBy, first, rows); ListPage lp = new ListPage((IList)docs, first, rows, count); PropertyBag["lp"] = lp; #region 保存参数 PropertyBag["IsAudit"] = isAudit; PropertyBag["isManualConvert"] = isManualConvert; #endregion }
/// <summary> /// 我的悬赏 /// </summary> public void MyReward(int first) { int rows = 10; PropertyBag["cur_page_addreward"] = true; UserService us = Context.GetService<UserService>(); U_UserInfo u = base.GetUser(); int count = 0; IList<TReqDoc> list = us.TReqDocBll.GetList(u.UserId, out count, first, rows); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
public void Comment(int docId,int first) { int rows = 20; int count = 0; DocService ds = Context.GetService<DocService>(); count = ds.DCommentBll.GetCount(docId); IList<D_Comment> list = ds.DCommentBll.GetListForAdmin(docId); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; //HomeController hc = new HomeController(); //Hashtable p = new Hashtable(); //p.Add("DocId", docId); //string a = hc.TestSql("D_Comment.GetCount", p); //Utils.Log4Net.Error(count.ToString()); }
/// <summary> /// 我的购买 /// </summary> public void Purchase(int first) { string a = Context.UrlReferrer; if (!string.IsNullOrEmpty(a)) { if (a.ToLower().IndexOf("/my/docharge.do") > -1) PropertyBag["fromPay"] = true; } int rows = 10; PropertyBag["cur_page_purchase"] = true; UserService us = Context.GetService<UserService>(); U_UserInfo u = base.GetUser(); int count = 0; IList<MPurchase> list = us.MPurchaseBll.GetList(u.UserId, first, rows, out count); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["listPage"] = lp; }
public void Index(int first,int rows,string email,int? status) { if (rows == 0) rows = 20; UserService us = Context.GetService<UserService>(); Hashtable p = new Hashtable(); if (!string.IsNullOrEmpty(email)) p.Add("Email",email); if (status.HasValue) p.Add("IsStop",status.Value); IList<U_UserInfo> ulist = us.UserInfoBll.GetList(p, "RegTime DESC", first, rows); int count = us.UserInfoBll.GetCount(p); ListPage lp = new ListPage((IList)ulist, first, rows, count); PropertyBag["userList"] = lp; }
/// <summary> /// 接收到的消息 /// </summary> public void RecieveMsg(int first) { PropertyBag["cur_page_msg"] = true; U_UserInfo logonUser = base.GetUser(); UserService us = Context.GetService<UserService>(); int count = 0; IList<M_Message> mlist = us.MessageBll.GetUserMsgList(first,10,out count,logonUser.UserId); ListPage lp = new ListPage((IList)mlist, first, 10, count); PropertyBag["listPage"] = lp; }
/// <summary> /// 选稿 /// </summary> public void SelectContribute(int first,int reqId) { PropertyBag["cur_page_addreward"] = true; int rows = 10; int count = 0; DocService ds = Context.GetService<DocService>(); U_UserInfo u = base.GetUser(); TReqDoc trDoc = ds.TReqDocBll.Get(reqId); if (trDoc.UserId != u.UserId) throw new TmmException("操作错误,您不是该悬赏的所有者"); IList<TJoinDoc> list = ds.TJoinDocBll.GetListForXg(reqId, out count, first, rows); ListPage lp = new ListPage((IList)list, first, rows, count); PropertyBag["lp"] = lp; }
public void Index(int first, int? orderType, string email, int[] orderStatus, bool from) { OrderService os = Context.GetService<OrderService>(); int count = 0; int rows = 20; Hashtable p = new Hashtable(); if (orderType.HasValue) { p.Add("OrderType",orderType.Value); } if (!string.IsNullOrEmpty(email)) p.Add("Email",email); if (orderStatus.Length > 0) p.Add("Statuses",orderStatus); count = os.TOrderBll.GetCount(p); IList<TOrder> list = os.TOrderBll.GetList(p, null, first, rows); ListPage lp = new ListPage((IList)list,first,rows,count); PropertyBag["lp"] = lp; if (from) PropertyBag["isExchange"] = true; //兑换 else PropertyBag["isExchange"] = false; PropertyBag["orderStatus"] = orderStatus; }