Exemplo n.º 1
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var userLevel = Resolve <IUserLevelService>().GetSingle(r => r.UserId == autoModel.UserId);

            if (userLevel != null && userLevel.Status == UserLevelStatus.Activated)
            {
                var result = new AutoForm();
                result.FromMessage = new FromMessage(FromMessageType.Success, "恭喜您,您的资料已完善");
                return(result);
            }
            else
            {
                var model    = Resolve <IUserLevelRecordService>().GetView(autoModel.UserId);
                var autoForm = ToAutoForm(model);
                autoForm.Tooltip = new AutoFormTooltip {
                    BottonText     = "信息真实,保存完善",
                    ButtomHelpText = new List <string>
                    {
                        "一个手机号最多只能注册一个会员",
                        "一个护照或身份证号最多只能注册一个会员",
                        "为了后期提现、转账工作能够正常进行请提供真实信息",
                    }
                };

                return(autoForm);
            }
        }
Exemplo n.º 2
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var model  = Resolve <IEnterpriseService>().GetSingle(u => u.UserId == id.ConvertToLong(0));
            var result = new AutoForm();

            if (model != null)
            {
                if (model.Status == IdentityStatus.Failed)
                {
                    result = ToAutoForm(new Domain.Entities.Enterprise());
                }
                else   //if (model.Status == IdentityStatus.Succeed)
                {
                    //{
                    result.FromMessage = new FromMessage(FromMessageType.Success, "恭喜您,企业认证已成功");
                }
                //}
            }
            else
            {
                result = ToAutoForm(new Domain.Entities.Enterprise());
            }

            result.AlertText      = "【企业认证】主要对企业信息真实性进行的一种验证审核。有助于建立完善可靠的互联网信用平台。";
            result.ButtomHelpText = new List <string>
            {
                "请您务必填写联系电话、联系人及其详细地址。",
                "请您务必上传【营业执照】扫描件(含副页),图片清晰。否则不予通过!",
                "请您认真检查所填【企业名称】与【营业执照证号】,必须与图片保持一致。否则不予通过!",
                "提交后将在3个工作日内进行审核"
            };

            return(result);
        }
Exemplo n.º 3
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var result = new AutoForm();

            if (id.ToString().ToObjectId() != ObjectId.Empty)
            {
                var model = Resolve <IUserAddressService>().GetSingle(id);
                if (model == null)
                {
                    result = ToAutoForm(new UserAddressAutoFrom());
                }

                var resultModel = model.MapTo <UserAddressAutoFrom>();
                resultModel.RootUserId = model.UserId;
                result = ToAutoForm(resultModel);
            }
            else
            {
                result = ToAutoForm(new UserAddressAutoFrom());
            }

            result.AlertText = "【编辑地址】请您认真填写收货人姓名、手机及其详细地址,便于确认收货的地址";

            result.ButtomHelpText = new List <string>
            {
                "建议您务必输入收货人姓名、手机号码",
                "建议您务必选择正确的区域及输入详细地址"
            };

            return(result);
        }
Exemplo n.º 4
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var model  = Ioc.Resolve <IIdentityService>().GetSingle(u => u.UserId == id.ConvertToLong(0));
            var result = new AutoForm();

            if (model != null)
            {
                if (model.Status == IdentityStatus.Succeed)
                {
                    result.FromMessage = new FromMessage(FromMessageType.Success, "恭喜您,实名认证已成功");
                }

                if (model.Status == IdentityStatus.Failed)
                {
                    result = ToAutoForm(new Identity());
                }
            }
            else
            {
                result = ToAutoForm(new Identity());
            }

            result.Tooltip.AlertText      = "【个人认证】对用户资料真实性进行的一种验证审核。有助于建立完善可靠的互联网信用平台。";
            result.Tooltip.ButtomHelpText = new List <string>
            {
                "真实姓名:务必填写真实姓名,以身份证姓名为准",
                "身份证号码:务必填写身份证号码,以身份证号码为准"
            };

            return(result);
        }
Exemplo n.º 5
0
 protected AutoForm createPreviewForm()
 {
     previewForm = new(mdiParent : parent) {
         Text = fileUtil.name,
     };
     previewForm.Disposed += (_, _) => Dispose();
     return(previewForm);
 }
Exemplo n.º 6
0
        //
        // GET: /HaveSendQuestionAdmin/
        public ActionResult Index()
        {
            CreateLayoutAdminView();
            AutoForm <HaveSendQuestionInputAdminViewData> newPatientItems = new AutoForm <HaveSendQuestionInputAdminViewData>();

            ViewBag.Forms = newPatientItems.GetControls();
            return(View());
        }
        //
        // GET: /DetailUserTypeAdmin/
        public ActionResult Index()
        {
            CreateLayoutAdminView();
            AutoForm <DetailUserTypeInputAdminViewData> newPatientItems = new AutoForm <DetailUserTypeInputAdminViewData>();

            ViewBag.Forms = newPatientItems.GetControls();
            return(View());
        }
Exemplo n.º 8
0
        //
        // GET: /AdminApplicationUser/
        public ActionResult Index()
        {
            CreateLayoutAdminView();
            AutoForm <ApplicationUserInputAdminViewData> applicationUsers = new AutoForm <ApplicationUserInputAdminViewData>();

            ViewBag.Forms = applicationUsers.GetControls();
            return(View());
        }
Exemplo n.º 9
0
        private void button2_Click(object sender, EventArgs e)
        {
            ////string typeName = typeof(US300).AssemblyQualifiedName;
            ////LISYQ.US300, US300, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
            ////LISYQ.TM2655P, TM2655P, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
            ////string typeName = typeof(LISYQ.URT200B).AssemblyQualifiedName;
            //string outMsg = "";
            //if (yqDemo != null)
            //{
            //    if (yqDemo.IsOpen(out outMsg) == false)
            //    {
            //        yqDemo.open(out outMsg);
            //    }
            //}
            //else
            //{

            //    string yqVersion = TJClient.Common.XmlRW.GetValueFormXML(System.Configuration.ConfigurationSettings.AppSettings["US300"].ToString(), "YQ_Version", "value");
            //    yqDemo = LisFactory.LisCreate(yqVersion);
            //}

            //DataTable dt = yqDemo.YQDataReturn("", out outMsg);

            string YqXmlPath = "";

            try
            {
                //if (drpFlag == true && comboBox_yq.SelectedValue != null && comboBox_yq.SelectedValue.ToString().Length > 0)
                //{
                //xmlpath
                YqXmlPath = System.Configuration.ConfigurationSettings.AppSettings["US300"].ToString();
                //jg数据处理间隔时间
                //YQ_Interval = XmlRW.GetValueFormXML(YqXmlPath, "YQ_Interval", "value");

                ////rqlx	标本日期类型
                //YQ_DateType = XmlRW.GetValueFormXML(YqXmlPath, "YQ_DateType", "value");

                ////仪器数据处理类型
                //YQ_Type = XmlRW.GetValueFormXML(YqXmlPath, "YQ_YQType", "value");

                //启动自动获取数据
                AutoForm autoform = new AutoForm();
                //autoform.Owner = this;
                autoform.Show();
                autoform.Visible = false;
                autoform.setStart("US300");

                //检验结果初始化(右侧列表)
                //init_dataGridView_hybb();
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        //
        // GET: /AdminApplicationUserRole/
        public ActionResult Index(String userId)
        {
            CreateLayoutAdminView();
            AutoForm <ApplicationUserRoleInputAdminViewData> applicationUserRoles =
                new AutoForm <ApplicationUserRoleInputAdminViewData>();
            var forms = applicationUserRoles.GetControls();
            ComboboxViewData roleCombobox = (ComboboxViewData)forms[1];

            roleCombobox.Url += "?userId=" + userId;
            ViewBag.Forms     = forms;
            ViewBag.OtherId   = userId;
            return(View());
        }
Exemplo n.º 11
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var result = new AutoForm();

            result = ToAutoForm(new ChangePayPasswordAutoForm());
            result.Tooltip.AlertText = "【修改支付密码】为了更好的保护你的帐号安全,避免您受到损失,建议您修改默认支付密码";

            result.Tooltip.ButtomHelpText = new List <string>
            {
                "建议确保支付密码与登录密码不同!",
                "支付密码为6位数字,否则无法支付!"
            };
            return(result);
        }
Exemplo n.º 12
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var result = new AutoForm();

            result           = ToAutoForm(new FindPayPasswordAutoForm());
            result.AlertText = "【找回支付密码】为了更好的保护你的帐号安全,避免您和您的好友受到损失,建议您设置密码";

            result.ButtomHelpText = new List <string>
            {
                "建议确保登录密码与支付密码不同!",
                "建议密码采用字母和数字混合,并且不短于6位。"
            };
            return(result);
        }
Exemplo n.º 13
0
        //public override JsonResult GetAll()
        //{
        //    return Json(_applicationUserService.GetAllUsers(), JsonRequestBehavior.AllowGet);
        //}

        public override JsonResult Update(ApplicationUserInputAdminViewData entity)
        {
            String id     = (String)entity.GetType().GetProperty("Id").GetValue(entity, null);
            var    oldObj = _layoutService.GetUserById(id);

            if (oldObj.Protected)
            {
                return(Json(new
                {
                    result = "failed",
                    message = "this record can't update"
                }));
            }

            List <ControlViewData> controls = new AutoForm <ApplicationUserInputAdminViewData>().GetControls();

            foreach (ControlViewData control in controls)
            {
                if (!control.NotChangeWhenUpdate)
                {
                    String propertyString = control.FieldName;
                    if (oldObj.GetType().GetProperty(propertyString) == null)
                    {
                        continue;
                    }
                    var          value        = entity.GetType().GetProperty(propertyString).GetValue(entity, null);
                    PropertyInfo propertyInfo = oldObj.GetType().GetProperty(propertyString);
                    propertyInfo.SetValue(oldObj, Convert.ChangeType(value, propertyInfo.PropertyType), null);
                }
            }

            if (User.Identity != null)
            {
                oldObj.UpdatedBy = User.Identity.GetUserName();
            }
            else
            {
                oldObj.UpdatedBy = "";
            }

            oldObj.UpdatedDate = DateTime.Now;
            _service.Update(oldObj);
            _service.Save();

            return(Json(new
            {
                result = "success",
                data = entity
            }));
        }
Exemplo n.º 14
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var result = new AutoForm();

            result = ToAutoForm(new ChangeLoginPasswordAutoForm());
            result.Tooltip.AlertText = "【修改登录密码】为了更好的保护你的帐号安全,避免您受到损失,建议您修改默认密码";

            result.Tooltip.ButtomHelpText = new List <string>
            {
                "建议确保登录密码与支付密码不同!",
                "建议密码采用字母和数字混合,并且不短于6位。"
            };
            return(result);
        }
Exemplo n.º 15
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var autoForm = new AutoForm();

            autoForm.AlertText      = "用户可通过多种途径获取积分,积分可用于积分商城消费";
            autoForm.ButtomHelpText = new List <string>
            {
                "积分来源:一、本店出品消费;二、当面付支付;三、管理员手台手动添加;四、促销活动,比如大转盘、签到、红包雨等;",
                "消费用途:积分商城消费",
                "消费用途:积分商城消费",
                "消费用途:积分商城消费,消费用途:积分商城消费",
                "消费用途:积分商城消费,消费用途:积分商城消费",
                "消费用途:积分商城消费,消费用途:积分商城消费"
            };

            // 操作PriceStyleConfig
            return(autoForm);
        }
Exemplo n.º 16
0
        public Tuple <ServiceResult, AutoForm> GetView(string type, object id, AutoBaseModel autoModel)
        {
            Type     typeFind     = null;
            object   instanceFind = null;
            AutoForm autoForm     = null;
            var      checkType    = Resolve <IUIBaseService>().CheckType(type, ref typeFind, ref instanceFind);

            if (!checkType.Succeeded)
            {
                return(new Tuple <ServiceResult, AutoForm>(checkType, new AutoForm()));
            }

            if (instanceFind is IAutoConfig)
            {
                autoForm = Resolve <IApIAlaboAutoConfigService>().GetView(instanceFind.GetType(), id);
                return(new Tuple <ServiceResult, AutoForm>(ServiceResult.Success, autoForm));
            }

            if (instanceFind is IAutoForm set)
            {
                autoForm = set.GetView(id, autoModel);
                return(new Tuple <ServiceResult, AutoForm>(ServiceResult.Success, autoForm));
            }

            if (instanceFind is IEntity)
            {
                var result = DynamicService.ResolveMethod(typeFind.Name, "GetViewById", id);
                if (result.Item1.Succeeded)
                {
                    autoForm = AutoFormMapping.Convert(result.Item2);
                }
                else
                {
                    autoForm = AutoFormMapping.Convert(typeFind.FullName);
                }

                return(new Tuple <ServiceResult, AutoForm>(ServiceResult.Success, autoForm));
            }

            return(new Tuple <ServiceResult, AutoForm>(ServiceResult.Failure("未知类型"), new AutoForm()));
        }
Exemplo n.º 17
0
        public AutoForm GetView(object id, AutoBaseModel autoModel)
        {
            var autoForm = new AutoForm();

            var result = new MerchantStore();

            result.UserId = autoModel.BasicUser.Id;
            if (id == null)
            {
                var store = Resolve <IMerchantStoreService>().GetMerchantStore(autoModel.BasicUser.Id);
                if (store != null)
                {
                    result = store.FirstOrDefault();
                }
            }
            else
            {
                var store = Resolve <IMerchantStoreService>().GetMerchantStore(id.ConvertToLong());
                if (store != null)
                {
                    result = store.FirstOrDefault();
                }
            }

            if (result == null)
            {
                result = new MerchantStore();
            }

            autoForm = ToAutoForm(result);

            autoForm.Tooltip.AlertText      = "【店铺设置】主要针对于店铺名称、Logo、描述的设置。";
            autoForm.Tooltip.ButtomHelpText = new List <string>
            {
                "店铺名称:用于标识店铺主要信息;",
                "店铺Logo:主要用于上传图片,标识店铺图标",
                "店铺描述:对店铺进行详细性的信息描述"
            };

            return(autoForm);
        }
Exemplo n.º 18
0
        public ApiResult <AutoForm> GetIdentity([FromQuery] ApiBaseInput parameter)
        {
            var model  = Resolve <IIdentityService>().GetSingle(parameter.LoginUserId);
            var result = new AutoForm();

            if (model != null)
            {
                if (model.Status == IdentityStatus.Succeed)
                {
                    result.FromMessage.Type    = FromMessageType.Success;
                    result.FromMessage.Message = "您已完成实名认证!";
                    return(ApiResult.Success(result));
                }

                if (model.Status == IdentityStatus.Failed)
                {
                    result.FromMessage.Type    = FromMessageType.Success;
                    result.FromMessage.Message = "您的实名认证失败,请再次尝试!";
                    return(ApiResult.Success(result));
                }
            }

            return(ApiResult.Success(result));
        }
Exemplo n.º 19
0
 protected DemiseFileHandler(AutoForm parent)
 {
     this.parent = parent;
 }
Exemplo n.º 20
0
 public DemiseTextureHandler(AutoForm parent) : base(parent)
 {
 }
Exemplo n.º 21
0
 public DemiseAnimationHandler(AutoForm parent) : base(parent)
 {
 }
Exemplo n.º 22
0
 public DemiseResourceHandler(AutoForm parent) : base(parent)
 {
 }
 public DemiseDataHandler(AutoForm parent) : base(parent)
 {
 }
Exemplo n.º 24
0
        public virtual JsonResult Update(VM entity)
        {
            #region old
            //dynamic getId = entity;
            //var old = _service.GetById(getId.Id);
            //var newObj = PropertyCopy.Copy<T, VM>(entity);

            //List<ControlViewData> controls = new AutoForm<VM>().GetControls();

            //foreach(ControlViewData control in controls)
            //{
            //    if(!control.NotChangeWhenUpdate)
            //    {
            //        String propertyString = control.FieldName;
            //        if (newObj.GetType().GetProperty(propertyString) == null)
            //            continue;
            //        var value = newObj.GetType().GetProperty(propertyString).GetValue(newObj, null);
            //        PropertyInfo propertyInfo = old.GetType().GetProperty(propertyString);
            //        propertyInfo.SetValue(old, Convert.ChangeType(value, propertyInfo.PropertyType), null);

            //    }
            //}

            //if (User.Identity != null)
            //    old.UpdatedBy = User.Identity.GetUserName();
            //else
            //    old.UpdatedBy = "";

            //old.UpdatedDate = DateTime.Now;

            //_service.Update(old);
            //_service.Save();
            //return Json(new
            //{
            //    result = "success",
            //    data = entity
            //});
            #endregion

            int id     = (int)entity.GetType().GetProperty("Id").GetValue(entity, null);
            var oldObj = _service.GetById(id);

            if (oldObj.Protected)
            {
                return(Json(new
                {
                    result = "failed",
                    message = "this record can't update"
                }));
            }

            List <ControlViewData> controls = new AutoForm <VM>().GetControls();
            foreach (ControlViewData control in controls)
            {
                if (!control.NotChangeWhenUpdate)
                {
                    String propertyString = control.FieldName;
                    if (oldObj.GetType().GetProperty(propertyString) == null)
                    {
                        continue;
                    }
                    var          value        = entity.GetType().GetProperty(propertyString).GetValue(entity, null);
                    PropertyInfo propertyInfo = oldObj.GetType().GetProperty(propertyString);
                    propertyInfo.SetValue(oldObj, Convert.ChangeType(value, propertyInfo.PropertyType), null);
                }
            }
            ChangeCache(oldObj);
            return(DoUpdate(oldObj));
        }
Exemplo n.º 25
0
 public DemiseObjectHandler(AutoForm parent) : base(parent)
 {
 }