Example #1
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);
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //base.Page_Init(sender, e);
        //初始化模块加载参数
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        title      = valObj._ZhName + "详细";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                resultObj.IsOnlyForModuleIDName = false;
                valObj.IsOnlyForModuleIDName    = false;
                if (!string.IsNullOrEmpty(Request["ID"]))
                {
                    AttributeItem   id1   = AttributeItem.Factory(valObj.DataBaseTable.IDField);
                    ITableImplement cond1 = new ITableImplement(); cond1.SetValue(id1, Request["ID"]);
                    resultObj = BLLTable <ITableImplement> .Factory(conn).GetRowData(valObj, cond1);

                    if (resultObj == null)
                    {
                        ScriptHelper.Alert(this, "记录不存在");
                        ScriptHelper.CloseMe(this);
                        return;
                    }
                    BLLTable.SQL_Test.ToArray();
                    object obj1 = resultObj.GetValue(WEC_A_VOTE.Attribute.TITLE);
                }
            }
            catch (Exception ex)
            {
                //litWarn.Text = ex.Message;
            }
        }
    }