/// <summary> /// 上级分类 /// </summary> private void BindCategory(string Type) { List <T_GdListTemplate> temp_list = new List <T_GdListTemplate>(); T_GdListTemplate fileTemp = new T_GdListTemplate(); fileTemp.ProjectCategory = this.cboType.SelectedValue.ToString(); list = new T_GdListTemplate_BLL().GetAllByCategory(fileTemp); foreach (var item in list) { temp_list.Add(item); } this.cboCategory.DataSource = temp_list; this.cboCategory.DisplayMember = "GdName"; this.cboCategory.ValueMember = "ID"; }
/// <summary> /// 初始化 /// </summary> /// <param name="id">文件ID</param> /// <param name="title">窗体标题</param> public frmGdmlEdit(string id, string title, string category, ERM.UI.frmGdmlList.refresh refreshs) { InitializeComponent(); getType(); _refresh = refreshs; this.ID = id; this.Text = title; this.cboType.SelectedValue = category; if (ID != "") { T_GdListTemplate t_GdListTemplate = t_FileListTemplate_BLL.FindID(id); this.txtGdtm.Text = t_GdListTemplate.GdName; this.cboType.SelectedValue = t_GdListTemplate.ProjectCategory; this.txtOrderIndex.Text = t_GdListTemplate.OrderIndex.ToString(); } }
/// <summary> /// 条件查询 /// </summary> private void Search() { this.btnSearch.Enabled = false; fileTemp = new T_GdListTemplate(); fileTemp.ProjectCategory = this.cboType.SelectedValue.ToString(); fileTemp.GdName = this.txtTitle.Text.Trim(); if (!MyCommon.IsMatchCode(this.txtTitle.Text.Trim())) { TXMessageBoxExtensions.Info("没有查到记录!"); this.btnSearch.Enabled = true; return; } DataBind(); this.btnSearch.Enabled = true; }