Esempio n. 1
0
        private void btn_po_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_name.Text) || string.IsNullOrEmpty(txt_tele.Text) || string.IsNullOrEmpty(txt_a1.Text) || string.IsNullOrEmpty(txt_A2.Text) || string.IsNullOrEmpty(txt_q.Text) || dataGridView1.Rows.Count == 0 || cmb_ic.SelectedValue == null)
            {
                MessageBox.Show("fields cannot be blank");
                return;
            }
            CusOrder a = new CusOrder()
            {
                cusName = txt_name.Text,
                cusTel  = txt_tele.Text,
                cusAdd1 = txt_a1.Text,
                cusAdd2 = txt_A2.Text,
                cusAdd3 = txt_A3.Text
            };

            var expirydate = dateTimePicker1.Value;

            a.oderMenu(a, lbl_cus.Text, expirydate, dataGridView1, lbl_order.Text);
            MessageBox.Show("Successfull", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //Dispose();
            CustomerOrder c = new CustomerOrder();

            c.Show();
            Dispose();
            Refresh();
        }
Esempio n. 2
0
        private void btn_vo_Click(object sender, EventArgs e)
        {
            CusOrder b = new CusOrder()
            {
                orderNumber = Convert.ToInt32(txt_eon.Text)
            };
            var dt = b.viewOrder(b);

            dataGridView1.DataSource = dt;
        }