/// <summary> /// 列转义 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView1_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e) { if (e.Column.FieldName.Equals("PickedPlanState")) { e.DisplayText = OutPlanStateExtension.GetLabel(int.Parse(e.Value.ToString())); } }
private void UserForm_Load(object sender, EventArgs e) { CheckedListBoxItem[] itemListQuery = OutPlanStateExtension.GetDropDownList(); cboPickedPlanState.Properties.Items.AddRange(itemListQuery); Common com = new Common(); bbiImport.Visibility = com.hasRights("200202") ? BarItemVisibility.Always : BarItemVisibility.Never; btnDel.Visibility = com.hasRights("200203") ? BarItemVisibility.Always : BarItemVisibility.Never; if (bbiImport.Visibility.Equals(BarItemVisibility.Never) && btnDel.Visibility.Equals(BarItemVisibility.Never)) { bar2.Visible = false; } ttPickedPlanOn1.Text = Global.SqlNow.Date.ToString("yyyy-MM-dd"); ttPickedPlanOn2.Text = Global.SqlNow.Date.ToString("yyyy-MM-dd"); repositoryItemCheckEdit1.CheckedChanged += new EventHandler(repositoryItemCheckEdit1_CheckedChanged); repositoryItemCheckEdit2.CheckedChanged += new EventHandler(repositoryItemCheckEdit2_CheckedChanged); }