Ejemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                comboBoxCallsRange.DataSource     = _range;
                comboBoxReactionsRange.DataSource = _range;


                serialPort1.PortName = Properties.Settings.Default.PortName;
                serialPort1.Open();

                //chart1.DataSource = DataEngine.GetReactionTimeByBenfillers();
                //chart1.DataBind();
                //chart1.DataSource = DataEngine.GetReactionTimeByBenfillers(comboBox1.SelectedValue.ToString());
                //chart1.DataBind();

                chartCalls.Series["Series1"].XValueMember  = "LastName";
                chartCalls.Series["Series1"].YValueMembers = "Calls";

                chartReactions.Series["Series1"].XValueMember  = "LastName";
                chartReactions.Series["Series1"].YValueMembers = "AvgReactionTime";

                chart1.Series["Series1"].XValueMember  = "LastName";
                chart1.Series["Series1"].YValueMembers = "Calls";

                comboBox1.DataSource    = DataEngine.GetAllBenfillers();
                comboBox1.DisplayMember = "Фамилия";
                comboBox1.ValueMember   = "Номер участка";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void buttonAddBenfiller_Click(object sender, EventArgs e)
        {
            var addBenfillerFrm = new AddBenfillerForm();

            if (addBenfillerFrm.ShowDialog() == DialogResult.OK)
            {
                DataEngine.AddBenfiller(addBenfillerFrm.BenfillerId, addBenfillerFrm.FirstName, addBenfillerFrm.LastName);
                dataGridViewBenfillers.DataSource = DataEngine.GetAllBenfillers();
            }
        }
Ejemplo n.º 3
0
        private void buttonDelBenfiller_Click(object sender, EventArgs e)
        {
            var delBenfillerFrm = new DelBenfillerForm();

            if (delBenfillerFrm.ShowDialog() == DialogResult.OK)
            {
                DataEngine.DelBenfiller(delBenfillerFrm.BenfillerId);
                dataGridViewBenfillers.DataSource = DataEngine.GetAllBenfillers();
            }
        }
Ejemplo n.º 4
0
        public AddButtonForm()
        {
            InitializeComponent();

            comboBoxButtonTypes.DataSource  = this._buttonTypes;
            comboBoxBenfiller.DataSource    = DataEngine.GetAllBenfillers();
            comboBoxBenfiller.DisplayMember = "Фамилия";
            comboBoxBenfiller.ValueMember   = "Номер участка";
            comboBox1.DataSource            = DataEngine.GetAllSegments();
            comboBox1.DisplayMember         = "Название сегмента";
            comboBox1.ValueMember           = "Номер сегмента";
        }
Ejemplo n.º 5
0
 private void BenfillersForm_Load(object sender, EventArgs e)
 {
     dataGridViewBenfillers.DataSource = DataEngine.GetAllBenfillers();
 }
Ejemplo n.º 6
0
 private void DelBenfillerForm_Load(object sender, EventArgs e)
 {
     comboBoxBenfiller.DataSource    = DataEngine.GetAllBenfillers();
     comboBoxBenfiller.DisplayMember = "Фамилия";
     comboBoxBenfiller.ValueMember   = "Номер участка";
 }