Esempio n. 1
0
        /// <summary>
        /// 获取账户异动类型
        /// </summary>
        /// <param name="model">model</param>
        /// <returns></returns>
        public ResultModel GetZJ_AmountChangeTypeList(SearchZJ_AmountChangeTypeModel model)
        {
            var tb = _database.Db.ZJ_AmountChangeType;

            var where = new SimpleExpression(1, 1, SimpleExpressionType.Equal); //

            if (model.ID > 0)
            {
                //id
                where = new SimpleExpression(where, tb.ID == model.ID, SimpleExpressionType.And);
            }
            //if (!string.IsNullOrEmpty(model.TypeName))
            //{
            //    //类型名称
            //    where = new SimpleExpression(where, tb.TypeName.Like("%" + model.TypeName + "%"), SimpleExpressionType.And);
            //}

            var query = tb
                        .Query()
                        .Select(
                tb.ID,
                tb.TypeName,
                tb.Remark
                )
                        .Where(where)
                        .OrderByID();

            var result = new ResultModel
            {
                Data = new SimpleDataPagedList <ZJ_AmountChangeTypeModel>(query,
                                                                          model.PagedIndex, model.PagedSize)
            };

            return(result);
        }
Esempio n. 2
0
        //
        // GET: /ZJ_UserBalanceChangeLog/
        public ActionResult Index()
        {
            SearchZJ_AmountChangeTypeModel model = new SearchZJ_AmountChangeTypeModel();

            model.PagedIndex = 0;
            model.PagedSize  = 100;
            ViewBag.list     = SelectCommon.GetAmountChangeType();
            //ViewBag.list = _zjAmountChangeTypeService.GetZJ_AmountChangeTypeList(model).Data;
            return(View());
        }
Esempio n. 3
0
        //    /// <summary>
        //    ///     获得角色下拉框
        //    /// </summary>
        //    /// <returns></returns>
        //    public static SelectList GetRoleSelectList()
        //    {
        //        List<SystemRoleEntity> roleList = SystemRoleBLLSub.GetRoleLis();
        //        roleList.Insert(0, new SystemRoleEntity { RoleID = 0, RoleName = "-请选择-" });
        //        var slist = new SelectList(roleList, "RoleID", "RoleName");
        //        return slist;
        //    }

        /// <summary>
        /// 获取账户异动类型
        /// </summary>
        /// <returns></returns>
        public static SelectList GetAmountChangeType()
        {
            SearchZJ_AmountChangeTypeModel model = new SearchZJ_AmountChangeTypeModel();

            model.PagedIndex = 0;
            model.PagedSize  = 100;
            List <ZJ_AmountChangeTypeModel> rolelsit = _zjAmountChangeTypeService.GetZJ_AmountChangeTypeList(model).Data;

            rolelsit.Insert(0, new ZJ_AmountChangeTypeModel()
            {
                ID = 0, TypeName = "--Select--"
            });
            var slist = new SelectList(rolelsit, "ID", "TypeName");

            return(slist);
        }