private void Purchase_Returns_Load(object sender, EventArgs e)
        {
            txtdate.Text = System.DateTime.Now.ToString("MM/dd/yyyy");
            DBSupplier s = new DBSupplier();

            DR = s.getSupplier();
            while (DR.Read())
            {
                cmbsupname.Items.Add(DR[0]);
            }
        }
Beispiel #2
0
        private void Purchase_Order_Load(object sender, EventArgs e)
        {
            txtdate.Text = System.DateTime.Today.ToString("M/d/yyyy");


            DBSupplier ds = new DBSupplier();

            DR = ds.getSupplier();
            while (DR.Read())
            {
                cmbsupname.Items.Add(DR[0]);
            }
        }
        private void Items_Load(object sender, EventArgs e)
        {
            try
            {
                SqlDataAdapter da;
                DBItem         i = new DBItem();
                da = i.getItem();
                DataTable dt = new DataTable();
                da.Fill(dt);
                dataGridView1.DataSource = dt;

                DBSupplier    s = new DBSupplier();
                SqlDataReader DR;
                DR = s.getSupplier();
                while (DR.Read())
                {
                    comboBox1.Items.Add(DR[0]);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Please fill out all the fields", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }