private static void DrawFilterListItem(ListViewItem row, Config.Item item) { row.Tag = item; row.SubItems[0].Text = ConfigurationItemHelper.GetDisplayValue(item); if (row.SubItems.Count == 1) { row.SubItems.Add(item.ToString()); } else { row.SubItems[1].Text = item.ToString(); } }
public ExceptFilterForm(Config.ExceptItem value) : base(value) { InitializeComponent(); Icon = Properties.Resources.DJDSOFT; ArrangeControls(); FilterDescriptionLabel.Text = ConfigurationItemHelper.GetDisplayValue(EditValue); FillFilterType(FilterTypeComboBox); FillFilterListView(); SwitchFilterControls(); HasChanged = false; }
public ChoiceFilterForm(Config.ValueItem value) : base(value) { InitializeComponent(); Icon = Properties.Resources.DJDSOFT; FilterDescriptionLabel.Text = ConfigurationItemHelper.GetDisplayValue(EditValue); ValueCheckBox.Checked = EditValue.Choice; ArrangeControls(); SetLabels(); HasChanged = false; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ConfigurationItemHelper config = new ConfigurationItemHelper(); List <ConfigurationItem> lstConfig = config.GetAllConfig(); Session[DataCleaningConstant.ConfigSession] = lstConfig; foreach (ConfigurationItem item in lstConfig) { if (item.config_key == "qc_percent") { txtQcPercent.Text = item.config_value; } } } }
protected void btnSave_Click(object sender, EventArgs e) { List <ConfigurationItem> lstConfig = (List <ConfigurationItem>)Session[DataCleaningConstant.ConfigSession]; foreach (ConfigurationItem item in lstConfig) { if (item.config_key == "qc_percent") { item.config_value = txtQcPercent.Text; } } XElement xmlElements = new XElement("Configs", lstConfig.Select(i => new XElement("Config", i.ToXml()))); string xml = HttpUtility.HtmlDecode(xmlElements.ToString()); ConfigurationItemHelper helper = new ConfigurationItemHelper(); int res = helper.SaveAllConfig(xml); ClientScript.RegisterClientScriptBlock(this.GetType(), "ShowResultQCPercent", "<script>SaveQcPercentMessage(" + (res > 0).ToString().ToLower() + ");</script>"); }
public EventFilterForm(Config.HasEventItem value) : base(value) { InitializeComponent(); Icon = Properties.Resources.DJDSOFT; ArrangeControls(); EventTypeComboBox.Items.Add(Config.HasEventItemEventType.Watched.ToString()); EventTypeComboBox.Items.Add(Config.HasEventItemEventType.Borrowed.ToString()); EventTypeComboBox.Items.Add(Config.HasEventItemEventType.Returned.ToString()); FilterDescriptionLabel.Text = ConfigurationItemHelper.GetDisplayValue(EditValue); ChoiceCheckBox.Checked = EditValue.Choice; EventTypeComboBox.SelectedItem = EditValue.EventType.ToString(); UserFirstNameTextBox.Text = EditValue.UserFirstName; UserLastNameTextBox.Text = EditValue.UserLastName; SetLabels(); HasChanged = false; }
public FilterTypeComboBoxItem(Type type) { ValueMember = type; DisplayMember = ConfigurationItemHelper.GetDisplayValue(type); }