Exemple #1
0
    private bool initParam()
    {
        if (string.IsNullOrEmpty(Request["template"]))//表名
        {
            DBTableName = Convert.ToString(Request["template"]);
        }
        if (string.IsNullOrEmpty(Request["template_id"]))//表的id
        {
            ID_FIELD = Convert.ToString(Request["template_id"]);
        }
        if (string.IsNullOrEmpty(Request["template_name"]))//表的名称
        {
            NAME_FIELD = Convert.ToString(Request["template_name"]);
        }
        if (string.IsNullOrEmpty(Request["template_pid"]))//表的父对象id
        {
            PID_FIELD = Convert.ToString(Request["template_pid"]);
        }
        if (string.IsNullOrEmpty(Request["template_type"]))//是否为树结构
        {
            IsTypeTree = Convert.ToString(Request["template_type"]);
        }

        itable = new ITableImplementHelper(conn).Factory(DBTableName);
        if (string.IsNullOrEmpty(DBTableName) ||
            string.IsNullOrEmpty(ID_FIELD) ||
            string.IsNullOrEmpty(NAME_FIELD) ||
            itable == null || itable.IsNull()
            )
        {
            return(false);
        }
        return(true);
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        title      = valObj._ZhName + "±à¼­";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }
        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!string.IsNullOrEmpty(Request["record"]))
        {
            keyid = Request["record"];
        }
        if (!IsPostBack)
        {
            try
            {
                if (string.IsNullOrEmpty(keyid))//ÐÂÔö
                {
                }
                else//ÐÞ¸Ä
                {
                    ITableImplement cond1 = valObj.Clone(); cond1.SetValue(KeyID, keyid);
                    resultObj = BLLTable <ITableImplement> .Factory(conn).GetRowData(valObj, cond1);

                    if (resultObj == null)
                    {
                        ScriptHelper.Alert(this, "¼Ç¼²»´æÔÚ");
                        ScriptHelper.CloseMe(this); return;
                    }
                    //string html = Convert.ToString(resultObj.GetValue(WEC_A_VOTE.Attribute.TITLE));
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
        if (valObj.IsNull())
        {
            //valObj.LoadAllAttributes(true);
        }
    }
Exemple #3
0
    private bool initParam()
    {
        if (string.IsNullOrEmpty(Request["template"]))//表名
            DBTableName = Convert.ToString(Request["template"]);
        if (string.IsNullOrEmpty(Request["template_id"]))//表的id
            ID_FIELD = Convert.ToString(Request["template_id"]);
        if (string.IsNullOrEmpty(Request["template_name"]))//表的名称
            NAME_FIELD = Convert.ToString(Request["template_name"]);
        if (string.IsNullOrEmpty(Request["template_pid"]))//表的父对象id
            PID_FIELD = Convert.ToString(Request["template_pid"]);
        if (string.IsNullOrEmpty(Request["template_type"]))//是否为树结构
            IsTypeTree = Convert.ToString(Request["template_type"]);

        itable = new ITableImplementHelper(conn).Factory(DBTableName);
        if (string.IsNullOrEmpty(DBTableName)
            ||string.IsNullOrEmpty(ID_FIELD)
            || string.IsNullOrEmpty(NAME_FIELD)
            ||itable == null || itable.IsNull()
            )
        {
            return false;
        }
        return true;
    }
Exemple #4
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);
        }
    }
Exemple #5
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);
        }
    }