コード例 #1
0
        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();
            }
        }
コード例 #2
0
        public ExceptFilterForm(Config.ExceptItem value) : base(value)
        {
            InitializeComponent();

            Icon = Properties.Resources.DJDSOFT;

            ArrangeControls();

            FilterDescriptionLabel.Text = ConfigurationItemHelper.GetDisplayValue(EditValue);

            FillFilterType(FilterTypeComboBox);
            FillFilterListView();
            SwitchFilterControls();

            HasChanged = false;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
 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;
             }
         }
     }
 }
コード例 #5
0
        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>");
        }
コード例 #6
0
        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;
        }
コード例 #7
0
        public FilterTypeComboBoxItem(Type type)
        {
            ValueMember = type;

            DisplayMember = ConfigurationItemHelper.GetDisplayValue(type);
        }