Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        valObj._TableName  = ModuleName;//实体类
        condObj._TableName = ModuleName;

        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP1);
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP2);
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP1);
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP2);
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP3);
        #endregion
        title      = valObj._ZhName + "管理";
        Page.Title = title;
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        if (Request["kind"] != null)
        {
            kind = Request["kind"];
        }
        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 <WEC_REQUEST>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <WEC_REQUEST>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }

            #region//默认属性初始化
            aspPager.CurrentPageIndex = 1;
            //aspPager.ShowInputBox = AgileFrame.Core.WebSystem.WebCtrls.ShowInputBox.Auto;
            txtPageSize.Value = "30";
            aspPager.PageSize = 30;
            //if (pid == "" || pid == "0")
            //{
            //    a_top.Visible = false;
            //}
            #endregion

            BindList(condObj, 1);
        }

        if (hidCondition.Value != "")
        {
            condObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            valObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            valObj.LoadAllAttributes(true);
        }
    }
Example #2
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);
        }
    }
Example #3
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);
        }
    }