예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        if (!string.IsNullOrEmpty(ModuleName))
        {
            pageAttr1 = AttributeItem.Factory(valObj.DataBaseTable.IDField);
            condObj.af_PageBy(pageAttr1, Order.Desc);

            //condObj111._TableName = valObj111._TableName;

            finderObj._TableName = valObj._TableName;

            DataBaseField[] ds1 = valObj.af_GetAvailableDataBaseField();
            foreach (DataBaseField f1 in ds1)
            {
                if (!f1.Desc.af_Enable || !f1.Desc.af_Visable)
                {
                    continue;
                }
                fieldList.Add(f1);
            }
        }

        title      = valObj._ZhName + "管理";
        Page.Title = title;

        if (!IsPostBack)
        {
            //从数据库获取配置的取值对象和条件对象,作为视图。jinsj
            Ec_View cond1 = new Ec_View();
            cond1.ModuleName = valObj._TableName;
            Ec_View v1 = BLLTable <Ec_View> .GetRowData(cond1);

            if (v1 != null && v1.IsNotNull())
            {
                if (v1.ValueJsonString != "")
                {
                    valObj = JsonServiceBase.FromJson <ITableImplement>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <ITableImplement>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }
            #region    //默认属性初始化
            aspPager.CurrentPageIndex = 1;
            txtPageSize.Value         = "30";
            aspPager.PageSize         = 30;
            #endregion
            #region    //数据初始化

            #endregion

            BindList(1);
        }
        if (hidCondition.Value != "")
        {
            //condObj111 = JsonServiceBase.FromJson<ITableImplement>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <ITableImplement>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            //valObj111 = JsonServiceBase.FromJson<ITableImplement>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            //valObj111.LoadAllAttributes(true);
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //base.Page_Init(sender, e);
        //初始化模块加载参数
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        if (!string.IsNullOrEmpty(ModuleName))
        {
            condObj.af_PageBy(KeyID, Order.Desc);
            finderObj._TableName = valObj._TableName;
        }

        title      = valObj._ZhName + "管理";
        Page.Title = title;

        if (!IsPostBack)
        {
            //从数据库获取配置的取值对象和条件对象,作为视图。jinsj
            Ec_View cond1 = new Ec_View();
            cond1.ModuleName = valObj._TableName;
            Ec_View v1 = BLLTable <Ec_View> .GetRowData(cond1);

            if (v1 != null && v1.IsNotNull())
            {
                if (v1.ValueJsonString != "")
                {
                    valObj = JsonServiceBase.FromJson <ITableImplement>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <ITableImplement>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }
            #region//默认属性初始化
            aspPager.CurrentPageIndex = 1;
            txtPageSize.Value         = "30";
            aspPager.PageSize         = 30;
            #endregion
            #region//数据初始化

            #endregion

            BindList(1);
        }
        if (hidCondition.Value != "")
        {
            //condObj111 = JsonServiceBase.FromJson<ITableImplement>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <ITableImplement>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            //valObj111 = JsonServiceBase.FromJson<ITableImplement>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            //valObj111.LoadAllAttributes(true);
        }
    }