Exemplo n.º 1
0
 public JsonResult GetGroups()
 {
     var busi = new AlbumGroupBusi();
     var info = new SearchInfo
         {
             State = (byte) StateType.Display
         };
     return Json(busi.GetList(info));
 }
Exemplo n.º 2
0
        public void InsertTest()
        {
            var busi = new AlbumGroupBusi();

            if (busi.GetItem(1) == null)
            {
                busi.Insert(new AlbumGroupInfo
                    {
                        GroupName = "首页展示",
                        State = (byte) StateType.Display
                    });
                busi.Insert(new AlbumGroupInfo
                    {
                        GroupName = "中心环境",
                        State = (byte) StateType.Display
                    });
                busi.Insert(new AlbumGroupInfo
                    {
                        GroupName = "团队风采",
                        State = (byte) StateType.Display
                    });
            }
            Assert.AreEqual(1, busi.GetList(new SearchInfo()).state);
        }