//protected int i = 0;
 protected void Page_Load(object sender, EventArgs e)
 {
     string aa = Request["parenttab"];
     Ec_blocks val = new Ec_blocks();
     val.Tabid = Convert.ToInt32(Request["fld_module"]);
     val.OrderBy(Ec_blocks.Attribute.Sequence);
     list = BLLTable<Ec_blocks>.Factory(conn).Select(new Ec_blocks(), val);
 }
    //protected int i = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        string    aa  = Request["parenttab"];
        Ec_blocks val = new Ec_blocks();

        val.Tabid = Convert.ToInt32(Request["fld_module"]);
        val.OrderBy(Ec_blocks.Attribute.Sequence);
        list = BLLTable <Ec_blocks> .Factory(conn).Select(new Ec_blocks(), val);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(Ec_blocks.Attribute.EXP1);
        //hideTableColumnList.Add(Ec_blocks.Attribute.EXP2);
        //hideTableColumnList.Add(Ec_blocks.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(Ec_blocks.Attribute.EXP1);
        //hideFindColumnList.Add(Ec_blocks.Attribute.EXP2);
        //hideFindColumnList.Add(Ec_blocks.Attribute.EXP3);
        #endregion
        condObj.OrderBy(Ec_blocks.Attribute.Blockid, Order.Desc);

        if (!IsPostBack)
        {
            btnFind.Text              = LanguageService.GetLanguageString("btnFind", "查询");
            aspPager.PageSize         = 10;
            aspPager.CurrentPageIndex = 1;

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                Ec_blocks roleOld = new Ec_blocks();
                roleOld.Where(Ec_blocks.Attribute.Blockid, Request["ids"].ToString());
                listObj = BLLTable <Ec_blocks> .Factory(conn).Select(valObj, roleOld);

                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value     += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value     += "{ID:'" + listObj[i].Blockid + "',Name:'" + listObj[i].Blockid + "'}";//这里的Name用于显示在列表中,请自行重定义。
                    hidInitIDS.Value += listObj[i].Blockid;
                }
            }
            try
            {
                listObj = BLLTable <Ec_blocks> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
 protected void customblocklist()
 {
     Ec_blocks val = new Ec_blocks();
     val.Tabid = Convert.ToInt32(Request["fld_module"]);
     val.OrderBy(Ec_blocks.Attribute.Sequence);
     List<Ec_blocks> list = BLLTable<Ec_blocks>.Factory(conn).Select(new Ec_blocks(), val);
     mainvalue.Append("<table class=\"crm-table\" width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\"><tbody><tr height=\"28px\" class=\"windLayerHead\"><td width=\"5%\">#</td><td width=\"20%\">显示区域</td><td width=\"20%\">显示顺序</td><td width=\"20%\">工具</td></tr>");
     int i = 0;
     foreach (Ec_blocks ec in list)
     {
         i = i + 1;
         mainvalue.Append("<tr>");
         mainvalue.Append(string.Format("<td nowrap=\"\">{0}&nbsp;</td>", i));
         mainvalue.Append(string.Format("<td nowrap=\"\">{0}&nbsp;</td><td nowrap=\"\">{1}&nbsp;</td></td><td nowrap=\"\">", ec.Blocklabel, ec.Sequence));
         mainvalue.Append(string.Format("<i class=\"icon-edit pure-icon-bu crm-bu-style\" style=\"width:50px;height:50px;cursor:pointer;font-size:14px;\" onclick=\"getCreateCustomBlockForm('{0}','{1}','{2}','{3}','{4}')\"></i>", ec.Blockid, ec.Blockid, ec.Tabid, ec.Blocklabel, ec.Sequence));//(customModule,blockid,tabid,label,order)
         mainvalue.Append(string.Format("<i class=\"icon-trash pure-icon-bu crm-bu-style\" style=\"width:50px;height:50px;cursor:pointer;font-size:14px;\" onclick=\"deleteCustomBlock({0},'{0}', '', '');\"></i>", ec.Blockid));
         mainvalue.Append("&nbsp;</td></tr>");
     }
     mainvalue.Append("</tbody></table>");
 }
    protected void customblocklist()
    {
        Ec_blocks val = new Ec_blocks();

        val.Tabid = Convert.ToInt32(Request["fld_module"]);
        val.OrderBy(Ec_blocks.Attribute.Sequence);
        List <Ec_blocks> list = BLLTable <Ec_blocks> .Factory(conn).Select(new Ec_blocks(), val);

        mainvalue.Append("<table class=\"crm-table\" width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\"><tbody><tr height=\"28px\" class=\"windLayerHead\"><td width=\"5%\">#</td><td width=\"20%\">显示区域</td><td width=\"20%\">显示顺序</td><td width=\"20%\">工具</td></tr>");
        int i = 0;

        foreach (Ec_blocks ec in list)
        {
            i = i + 1;
            mainvalue.Append("<tr>");
            mainvalue.Append(string.Format("<td nowrap=\"\">{0}&nbsp;</td>", i));
            mainvalue.Append(string.Format("<td nowrap=\"\">{0}&nbsp;</td><td nowrap=\"\">{1}&nbsp;</td></td><td nowrap=\"\">", ec.Blocklabel, ec.Sequence));
            mainvalue.Append(string.Format("<i class=\"icon-edit pure-icon-bu crm-bu-style\" style=\"width:50px;height:50px;cursor:pointer;font-size:14px;\" onclick=\"getCreateCustomBlockForm('{0}','{1}','{2}','{3}','{4}')\"></i>", ec.Blockid, ec.Blockid, ec.Tabid, ec.Blocklabel, ec.Sequence));//(customModule,blockid,tabid,label,order)
            mainvalue.Append(string.Format("<i class=\"icon-trash pure-icon-bu crm-bu-style\" style=\"width:50px;height:50px;cursor:pointer;font-size:14px;\" onclick=\"deleteCustomBlock({0},'{0}', '', '');\"></i>", ec.Blockid));
            mainvalue.Append("&nbsp;</td></tr>");
        }
        mainvalue.Append("</tbody></table>");
    }