Ejemplo n.º 1
0
        /// <summary>
        /// 查询显示用户信息
        /// </summary>
        /// <param name="coll">传入参数</param>
        /// <returns>视图</returns>
        public ActionResult LibrayMgr(FormCollection coll)
        {
            this.trackID = TrackIdManager.GetInstance("shaoyu");
            List <DisplayInfo> displayInfolist = new List <DisplayInfo>();
            List <Bookinfo>    bookinfoList    = new List <Bookinfo>();

            try
            {
                // 初始信息
                if (coll.Count == 0)
                {
                    QueryAllBook queryAllBook = new QueryAllBook();
                    displayInfolist = queryAllBook.GetAllBookInfo();
                }
                else if (coll.Count > 0)
                {
                    // 查询信息
                    if (Request.IsAjaxRequest())
                    {
                        string     bookname   = coll["bookname"] != null ? coll["bookname"].Trim() : string.Empty;
                        DisplayMgr displayMgr = new DisplayMgr();

                        // 模糊查询
                        displayInfolist = displayMgr.QueryByName(bookname);
                        return(this.PartialView("BookList", displayInfolist));
                    }
                }
            }
            catch (AppException appexp)
            {
                return(this.View("Shared/Error", appexp.ToString()));
            }
            catch (Exception exp)
            {
                AppException appexp = new AppException(" 查询显示用户信息 ", exp, ExceptionLevel.Error);
                LogManager.Log.WriteException(appexp);
                return(this.View("Shared/Error", exp.ToString()));
            }
            finally
            {
                LogManager.Log.WriteUiAcc("shaoyu", "UserInfo", "shaoyu", "127.0.0.1", string.Empty, string.Empty, "查询显示用户信息", null);
            }

            return(this.View(displayInfolist));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 借书页面
 /// </summary>
 /// <param name="coll">前台参数</param>
 /// <returns>借书 页面</returns>
 public ActionResult BorrowBook(FormCollection coll)
 {
     this.trackID = TrackIdManager.GetInstance("shaoyu");
     return(this.View());
 }