/// <summary> /// 根据ID获取某条类型的值 /// </summary> /// <param name="Info"></param> /// <returns></returns> public IList <mSetType> GetSetTypeRead(mSetType Info) { IList <mSetType> list = new List <mSetType>(); if (Info.Id > 0) { using (SqlDataReader dr = SQLHelper.ExecuteReader("SetTypeRead", Info.Id)) { if (dr.Read()) { mSetType mST = new mSetType(); mST.Id = (int)dr[0]; mST.Title = dr[1].ToString(); mST.Value = dr[2].ToString(); list.Add(mST); } } } return(list); }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdminManage(); mC.Id = StringDeal.ToInt(Request.QueryString["Id"]); if (mC.Id == 0) { AdminSetting.isPermissions("2", "1"); } else { AdminSetting.isPermissions("2", "2"); } mM.Id = 0; mM.ParentId = 0; mM.Temp = "Menu_Field"; if (!IsPostBack) { menuListDataSet = (DataSet)bM.MenuList(); //说明 dsReader = bM.MenuReader(mM); //说明 BindMenuParent(0, "┣"); //说明 bSetType bST = new bSetType(); //说明 mSetType mST = new mSetType(); //说明 dsList = (DataSet)bC.ChannelList(-1); //说明 BindClass(0, "┣"); mST.ParentId = 1; Setting.DataSource = bST.GetSetTypeList(mST).Tables[0]; Setting.DataTextField = "Title"; Setting.DataValueField = "Value"; Setting.DataBind(); ChannelRead(); } else { //ChannelSave(); } }
/// <summary> /// 获取所取类型列表 /// </summary> /// <param name="Info"></param> /// <returns></returns> public DataSet GetSetTypeList(mSetType Info) { DataSet ds = SQLHelper.ExecuteDataset("SetTypeList", Info.ParentId); return(ds); }
public IList <mSetType> GetSetTypeRead(mSetType Info) { return(dal.GetSetTypeRead(Info)); }
public DataSet GetSetTypeList(mSetType Info) { return(dal.GetSetTypeList(Info)); }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdminManage(); MenuId = StringDeal.ToInt(Request.QueryString["MenuId"]); Action = Request.QueryString["Action"]; mM.Id = StringDeal.ToInt(Request.QueryString["Id"]); mM.ParentId = StringDeal.ToInt(this.ParentId.Text); mM.Temp = "Menu_Field"; Arry = bM.GetMenuField(mM, MenuId).Split('|'); if (!IsPostBack) { //绑定模板和模板文件 if (MenuId == 0) { MenuTitle = "节点"; } else if (Action == "info") { MenuTitle = bM.GetMenuTitle(mM.Id); } if (Action == "info") { this.MenuTableId.Visible = false; this.ListLinkId.Visible = false; } #region 2010-05-25 mjh bSetType bST = new bSetType(); mSetType mST = new mSetType(); mST.ParentId = 1; Setting.DataSource = bST.GetSetTypeList(mST).Tables[0]; Setting.DataTextField = "Title"; Setting.DataValueField = "Value"; Setting.DataBind(); if (mM.Id != 0) { DataSet ds = bM.MenuReader(mM); if (ds.Tables[0].Rows.Count > 0) { string[] Arry2 = ds.Tables[0].Rows[0]["Sitting"].ToString().Split(','); for (int i = 0; i < Arry2.Length; i++) { //Response.Write(i.ToString()); for (int j = 0; j < this.Setting.Items.Count; j++) { if (this.Setting.Items[j].Value == Arry2[i]) { this.Setting.Items[j].Selected = true; } } } } } #endregion dsList = (DataSet)bM.MenuList(); dsReader = bM.MenuReader(mM); BindMenuParent(MenuId, "┣"); BindModel(); MenuBind(); } else { //MenuSave(); } }