Beispiel #1
0
 public homecontrol()
 {
     InitializeComponent();
     uxPartsLabel.Text      = FunctionsList.totalParts().ToString();
     uxEmployeesLabel.Text  = FunctionsList.totalEmployees().ToString();
     uxActiveJobsLabel.Text = FunctionsList.totalJobs().ToString();
 }
Beispiel #2
0
 public orderwizard()
 {
     InitializeComponent();
     textBox4.Text           = FunctionsList.newOrderID().ToString();
     suppliers               = FunctionsList.SupplierIDAutoComplete();
     comboBox1.DataSource    = suppliers;
     comboBox1.DisplayMember = "name";
 }
Beispiel #3
0
 public saleswizard()
 {
     InitializeComponent();
     uxrid.Text              = FunctionsList.newSaleID().ToString();
     customers               = FunctionsList.CustomerIDAutoComplete();
     comboBox1.DataSource    = customers;
     comboBox1.DisplayMember = "email";
 }
Beispiel #4
0
 private void uxSubmit_Click(object sender, EventArgs e)
 {
     if (uxqty.Value < 0)
     {
         MessageBox.Show("Please enter a quantity");
         return;
     }
     MessageBox.Show(FunctionsList.insertUpdateJob(Convert.ToInt32(uxJobID.Text), (int)processtable.Rows[uxProcessName.SelectedIndex][0], uxdateTimePicker1.Value.ToString("yyyy-MM-dd"), (int)uxqty.Value, uxcompleted.Checked));
 }
Beispiel #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     uxProcessName.Enabled  = true;
     uxPartProduced.Enabled = true;
     uxqty.Enabled          = true;
     uxcompleted.Checked    = false;
     uxJobID.Text           = FunctionsList.newJobID().ToString();
     uxSubmit.Enabled       = true;
 }
Beispiel #6
0
        public jobcontrol()
        {
            InitializeComponent();
            AutoCompleteStringCollection autoSourceCollection = new AutoCompleteStringCollection();

            processtable                 = FunctionsList.ProcessIDAutoComplete();
            uxProcessName.DataSource     = processtable;
            uxProcessName.DisplayMember  = "description";
            uxPartProduced.DataSource    = processtable;
            uxPartProduced.DisplayMember = "n";
        }
Beispiel #7
0
        public analysiscontrol()
        {
            InitializeComponent();
            DataTable dt = FunctionsList.analysisdata();

            foreach (DataRow r in dt.Rows)
            {
                chart1.Series["Sales Results"].Points.AddXY(r[0], r[1]);
                chart1.Series["Base Cost"].Points.AddXY(r[0], r[2]);
            }
        }
Beispiel #8
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (uxCombobox.SelectedIndex == 0)
     {
         dataGridView1.DataSource = FunctionsList.findPartID(Convert.ToInt32(uxSearchBox.Text));
     }
     else
     {
         dataGridView1.DataSource = FunctionsList.findPartName(uxSearchBox.Text);
     }
     button2.Enabled = true;
 }
Beispiel #9
0
 private void uxSearch_Click(object sender, EventArgs e)
 {
     if (uxcomboBox.SelectedIndex == 0)
     {
         dataGridView1.DataSource = FunctionsList.findEmployee("", "", Convert.ToInt32(uxSearchBox.Text));
     }
     else if (uxcomboBox.SelectedIndex == 1)
     {
         dataGridView1.DataSource = FunctionsList.findEmployee(uxSearchBox.Text, "", -1);
     }
     else
     {
         dataGridView1.DataSource = FunctionsList.findEmployee("", uxSearchBox.Text, -1);
     }
 }
Beispiel #10
0
 private void button1_Click(object sender, EventArgs e)
 {
     button2.Enabled = false;
     if (comboBox1.SelectedItem.ToString().Equals("Date Range:"))
     {
         dataGridView1.DataSource = FunctionsList.findJobDate(uxBeginDate.Value.ToString("yyyy-MM-dd"), uxEndDate.Value.ToString("yyyy-MM-dd"));
     }
     else if (comboBox1.SelectedItem.ToString().Equals("ID:"))
     {
         dataGridView1.DataSource = FunctionsList.findJobID(Convert.ToInt32(uxSearchBox.Text));
     }
     else
     {
         dataGridView1.DataSource = FunctionsList.findProcessIDint(uxSearchBox.Text);
     }
 }
Beispiel #11
0
 private void button1_Click(object sender, EventArgs e)
 {
     //add employee function
     MessageBox.Show(FunctionsList.insertEmployee(uxTitle.Text, uxSalary.Value.ToString(), uxName.Text, uxAddress.Text));
 }
Beispiel #12
0
 private void button1_Click(object sender, EventArgs e)
 {
     ux_PartID.Text     = FunctionsList.newPartID().ToString();
     uxPartName.Enabled = true;
     uxSubmit.Enabled   = true;
 }
Beispiel #13
0
 private void uxSubmit_Click(object sender, EventArgs e)
 {
     MessageBox.Show(FunctionsList.insertUpdatePart(Convert.ToInt32(ux_PartID.Text), uxPartName.Text, (int)uxQty.Value, Convert.ToDouble(uxBaseCost.Value)));
     uxPartName.Enabled = false;
 }
Beispiel #14
0
 private void button1_Click(object sender, EventArgs e)
 {
     MessageBox.Show(FunctionsList.insertOrder(Convert.ToInt32(textBox4.Text), Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox3.Text), Convert.ToDouble(textBox2.Text), Convert.ToInt32(suppliers.Rows[comboBox1.SelectedIndex][0])));
     Close();
 }
Beispiel #15
0
 private void button1_Click(object sender, EventArgs e)
 {
     MessageBox.Show(FunctionsList.partSold(Convert.ToInt32(uxpid.Text), Convert.ToInt32(uxqty.Text), Convert.ToInt32(customers.Rows[comboBox1.SelectedIndex][0]), Convert.ToInt32(uxrid.Text), Convert.ToDouble(uxcostper.Text), new DateTime(2017, 12, 1)));
     Close();
 }