Ejemplo n.º 1
0
        public VM_Register(HttpContext ctx)
        {
            buser   = new B_User(ctx);
            Request = ctx.Request;
            //根据IP,分析出地址,并填充
            //cityMod = IPScaner.FindCity(IPScaner.GetUserIP());//"59.52.159.79"
            //
            //html_must = fieldBll.InputallHtml(0, 0, new ModelConfig()
            //{
            //    Source = ModelConfig.SType.UserRegister,
            //    Fields = SiteConfig.UserConfig.RegFieldsMustFill
            //});
            //html_select = fieldBll.InputallHtml(0, 0, new ModelConfig()
            //{
            //    Source = ModelConfig.SType.UserRegister,
            //    Fields = SiteConfig.UserConfig.RegFieldsSelectFill
            //});
            //1,添加字段2,用户参数--将其加入必填或选填字段3,输出给前端使用
            string selectFields = SiteConfig.UserConfig.RegFieldsSelectFill, mustFields = SiteConfig.UserConfig.RegFieldsMustFill;

            if (!string.IsNullOrEmpty(selectFields) || !string.IsNullOrEmpty(mustFields))
            {
                fieldDT = DBCenter.SelWithField("ZL_UserBaseField", "*,ModelID=0,IsShow='True',IsSearchForm='False',IsView=1,IsDownField=0", "", "OrderID ASC");
                if (!string.IsNullOrEmpty(selectFields))
                {
                    fieldDT.DefaultView.RowFilter = "FieldName IN (" + WrapFields(selectFields) + ")";
                    selectDT = fieldDT.DefaultView.ToTable();
                }
                if (!string.IsNullOrEmpty(mustFields))
                {
                    fieldDT.DefaultView.RowFilter = "FieldName IN (" + WrapFields(mustFields) + ")";
                    mustDT = fieldDT.DefaultView.ToTable();
                }
            }
            //----------------------------------------------
            groupDT = gpBll.GetSelGroup();
            int    puid   = DataConvert.CLng(Request.Query["ParentUserID"]);
            string puname = DataConvert.CStr(Request.Query["ParentUser"]);

            if (puid > 0)
            {
                pmu = buser.SelReturnModel(puid);
            }
            else if (!string.IsNullOrEmpty(puname))
            {
                pmu = buser.GetUserByName(puname);
            }
        }
Ejemplo n.º 2
0
        public VM_Register()
        {
            //根据IP,分析出地址,并填充

            //
            //html_must = fieldBll.InputallHtml(0, 0, new ModelConfig()
            //{
            //    Source = ModelConfig.SType.UserRegister,
            //    Fields = SiteConfig.UserConfig.RegFieldsMustFill
            //});
            //html_select = fieldBll.InputallHtml(0, 0, new ModelConfig()
            //{
            //    Source = ModelConfig.SType.UserRegister,
            //    Fields = SiteConfig.UserConfig.RegFieldsSelectFill
            //});
            //1,添加字段2,用户参数--将其加入必填或选填字段3,输出给前端使用
            string selectFields = SiteConfig.UserConfig.RegFieldsSelectFill, mustFields = SiteConfig.UserConfig.RegFieldsMustFill;

            if (!string.IsNullOrEmpty(selectFields) || !string.IsNullOrEmpty(mustFields))
            {
                fieldDT = SqlHelper.ExecuteTable("SELECT *,ModelID=0,IsShow='True',IsSearchForm='False',IsView=1,IsDownField=0 FROM ZL_UserBaseField ORDER BY OrderID ASC");
                if (!string.IsNullOrEmpty(selectFields))
                {
                    fieldDT.DefaultView.RowFilter = "FieldName IN (" + WrapFields(selectFields) + ")";
                    selectDT = fieldDT.DefaultView.ToTable();
                }
                if (!string.IsNullOrEmpty(mustFields))
                {
                    fieldDT.DefaultView.RowFilter = "FieldName IN (" + WrapFields(mustFields) + ")";
                    mustDT = fieldDT.DefaultView.ToTable();
                }
            }
            //----------------------------------------------
            groupDT = gpBll.GetSelGroup();
            int    puid   = DataConvert.CLng(Request.GetParam("ParentUserID"));
            string puname = DataConvert.CStr(Request.GetParam("ParentUser"));

            if (puid > 0)
            {
                pmu = buser.SelReturnModel(puid);
            }
            else if (!string.IsNullOrEmpty(puname))
            {
                pmu = buser.GetUserByName(puname);
            }
        }