Пример #1
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var view = new ViewRegModels {
                GradeId = Resolve <IGradeService>().DefaultUserGrade.Id,
                Status  = Status.Normal
            };
            var userConfig = Resolve <IAutoConfigService>().GetValue <UserConfig>();

            if (userConfig.IsFixedData)
            {
                view.Mobile = RandomHelper.Mobile();
                view.Email  = RandomHelper.Email();
                var sex = RandomHelper.GetSex();
                view.Name     = RandomHelper.Name(sex);
                view.UserName = RandomHelper.RandomString(1).ToUpper() + new Random().Next(100, 999);
            }

            return(null);
        }