private void BindGrid() { Maticsoft.BLL.tArticleType bll = new Maticsoft.BLL.tArticleType(); DataSet ds = bll.GetList(" IsEnable=1"); ds.Relations.Add("TreeRelation", ds.Tables[0].Columns["Id"], ds.Tables[0].Columns["FatherID"], false); ddlfatherId.Items.Clear(); foreach (DataRow row in ds.Tables[0].Rows) { if (row["FatherID"].ToString() == "0") { FineUIPro.ListItem it = new FineUIPro.ListItem(); it.Text = row["Name"].ToString(); it.Value = row["Id"].ToString(); it.SimulateTreeLevel = 1; if (row.GetChildRows("TreeRelation").Length <= 0) { it.EnableSelect = true; } else { it.EnableSelect = false; } ddlfatherId.Items.Add(it); ResolveSubTree(row, ddlfatherId); } } }
protected void bindtb() { foreach (Icon c in (Icon[])Enum.GetValues(typeof(Icon))) { FineUIPro.ListItem list = new FineUIPro.ListItem(); list.Text = c.ToString(); list.Value = c.ToString(); drp_tb.Items.Add(list); } }
private void inittexttype() { f_texttype.Items.Clear(); FineUIPro.ListItem item = new FineUIPro.ListItem("不显示文本", "ShowBarText_0"); f_texttype.Items.Add(item); item = new FineUIPro.ListItem("等宽文本", "ShowBarText_1"); f_texttype.Items.Add(item); item = new FineUIPro.ListItem("紧缩文本", "AlignJustify_2"); f_texttype.Items.Add(item); }
private void initfontsizetype() { f_fontsize.Items.Clear(); FineUIPro.ListItem item = new FineUIPro.ListItem("10", "10"); f_fontsize.Items.Add(item); item = new FineUIPro.ListItem("12", "12"); f_fontsize.Items.Add(item); item = new FineUIPro.ListItem("16", "16"); f_fontsize.Items.Add(item); item = new FineUIPro.ListItem("21", "21"); f_fontsize.Items.Add(item); item = new FineUIPro.ListItem("36", "36"); f_fontsize.Items.Add(item); }
private void initcolortype() { f_color.Items.Clear(); FineUIPro.ListItem item = new FineUIPro.ListItem("红", "#FF0000"); f_color.Items.Add(item); item = new FineUIPro.ListItem("黄", "#FFFF00"); f_color.Items.Add(item); item = new FineUIPro.ListItem("蓝", "#436EEE"); f_color.Items.Add(item); item = new FineUIPro.ListItem("黑", "#242424"); f_color.Items.Add(item); item = new FineUIPro.ListItem("青", "#40E0D0"); f_color.Items.Add(item); }
private void ResolveSubTree(DataRow dataRow, FineUIPro.DropDownList drp) { DataRow[] rows = dataRow.GetChildRows("TreeRelation"); if (rows.Length > 0) { foreach (DataRow row in rows) { FineUIPro.ListItem it = new FineUIPro.ListItem(); it.Text = row["Name"].ToString(); it.Value = row["Id"].ToString(); it.SimulateTreeLevel = 2; drp.Items.Add(it); ResolveSubTree(row, ddlfatherId); } } }
/// <summary> /// 绑定锁 /// </summary> private void BindLock() { string sql = @"select ID,PartsName from PartsInfo where PartsTypeID in (select ID from PartsTypeInfo where IsDoorDefault=1)"; DataSet ds = DbHelperSQL.Query(sql); if (ds.Tables[0] != null) { ddlParts.DataSource = ds.Tables[0]; ddlParts.DataBind(); FineUIPro.ListItem item = new FineUIPro.ListItem(); item.Text = "--请选择--"; item.Value = "0"; ddlParts.Items.Insert(0, item); ddlParts.SelectedIndex = 0; } }