protected void Page_Load(object sender, EventArgs e) { //zlg 如果有模块,则先配置 valObj.setConn(conn).setModule(ModuleName); #region//默认隐藏的列 //hideTableColumnList = new List<AttributeItem>(); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要 //valObj.Remove(hideTableColumnList); //hideFindColumnList = new List<AttributeItem>(); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); #endregion condObj.OrderBy(WEC_CUSTOM_MODEL_SET.Attribute.ID, Order.Desc); if (!IsPostBack) { btnFind.Text = LanguageService.GetLanguageString("btnFind", "查询"); aspPager.PageSize = 10; aspPager.CurrentPageIndex = 1; if (!string.IsNullOrEmpty(Request["ids"])) { WEC_CUSTOM_MODEL_SET roleOld = new WEC_CUSTOM_MODEL_SET(); roleOld.Where(WEC_CUSTOM_MODEL_SET.Attribute.ID, Request["ids"].ToString()); listObj = BLLTable <WEC_CUSTOM_MODEL_SET> .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].ID + "',Name:'" + listObj[i].ID + "'}";//这里的Name用于显示在列表中,请自行重定义。 hidInitIDS.Value += listObj[i].ID; } } try { listObj = BLLTable <WEC_CUSTOM_MODEL_SET> .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 Page_Load(object sender, EventArgs e) { //zlg 如果有模块,则先配置 valObj.setConn(conn).setModule(ModuleName); title = valObj._ZhName + "详细"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["ID"])) { valObj = BLLTable <WEC_CUSTOM_MODEL_SET> .Factory(conn).GetRowData(WEC_CUSTOM_MODEL_SET.Attribute.ID, Request["ID"]); if (valObj == null) { return; } txtWEC_CUSTOM_MODEL_SET_ID.Text = Convert.ToString(valObj.ID);//Convert.ToDecimal txtWEC_CUSTOM_MODEL_SET_A_ID.Text = Convert.ToString(valObj.A_ID);//Convert.ToDecimal txtWEC_CUSTOM_MODEL_SET_M_ID.Text = Convert.ToString(valObj.M_ID);//Convert.ToDecimal } } catch (Exception ex) { litWarn.Text = ex.Message; } if (Request["ajax"] != null) { Response.Clear(); Response.Buffer = true; Response.Charset = "utf-8"; Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");//设置输出流为简体中文 //Response.ContentType = "html/text"; this.EnableViewState = false; System.Globalization.CultureInfo myCItrad = new System.Globalization.CultureInfo("ZH-CN", true); System.IO.StringWriter oStringWriter = new System.IO.StringWriter(myCItrad); System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); divC.RenderControl(oHtmlTextWriter); Response.Write(oStringWriter.ToString()); Response.End(); } } }
protected void Page_Load(object sender, EventArgs e) { //zlg 如果有模块,则先配置 valObj.setConn(conn).setModule(ModuleName); 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) { this.txtWEC_CUSTOM_MODEL_SET_ID.Disabled = true; this.txtWEC_CUSTOM_MODEL_SET_ID.Value = "0"; this.txtWEC_CUSTOM_MODEL_SET_ID.Attributes["class"] = "hide"; try { if (keyid != "") { valObj = BLLTable <WEC_CUSTOM_MODEL_SET> .Factory(conn).GetRowData(WEC_CUSTOM_MODEL_SET.Attribute.ID, keyid); if (valObj == null) { return; } txtWEC_CUSTOM_MODEL_SET_ID.Value = Convert.ToString(valObj.ID); //Convert.ToDecimal txtWEC_CUSTOM_MODEL_SET_A_ID.Value = Convert.ToString(valObj.A_ID); //Convert.ToDecimal txtWEC_CUSTOM_MODEL_SET_M_ID.Value = Convert.ToString(valObj.M_ID); //Convert.ToDecimal } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { //zlg 如果有模块,则先配置 valObj.setConn(conn).setModule(ModuleName); #region//默认隐藏的列 //hideTableColumnList = new List<AttributeItem>(); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要 //valObj.Remove(hideTableColumnList); //hideFindColumnList = new List<AttributeItem>(); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); #endregion title = valObj._ZhName + "管理"; Page.Title = title; if (Request["PID"] != null) { pid = Request["PID"]; } if (!IsPostBack) { #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 #region//数据初始化 #endregion BindList(condObj, 1); } }
protected void Page_Load(object sender, EventArgs e) { //zlg 如果有模块,则先配置 valObj.setConn(conn).setModule(ModuleName); #region//默认隐藏的列 //hideTableColumnList = new List<AttributeItem>(); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideTableColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要 //valObj.Remove(hideTableColumnList); //hideFindColumnList = new List<AttributeItem>(); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP1); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP2); //hideFindColumnList.Add(WEC_CUSTOM_MODEL_SET.Attribute.EXP3); #endregion //多级数据表页面才用到 if (Request["PID"] != null) { pid = Request["PID"]; } title = valObj._ZhName + "选择"; Page.Title = title; if (!IsPostBack) { aspPager.CurrentPageIndex = 1; aspPager.PageSize = 20; try { listObj = BLLTable <WEC_CUSTOM_MODEL_SET> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount); repCus.DataSource = listObj; repCus.DataBind(); } catch (Exception ex) { litWarn.Text = ex.Message; } aspPager.RecordCount = recount; } }