Ejemplo n.º 1
0
        private void populateGrid()
        {
            string selectStatement = "SELECT item.item_id as 'Item Code', item.name as 'Item Name', item.unit_price as 'Item Price', item.qty as 'Quantity' FROM item ";

            DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);

            populateNonComboGrids();
        }
Ejemplo n.º 2
0
        private void populateGrid()
        {
            string selectStatement = "SELECT supplier_material.material_id as 'Material Code', raw_material.name as 'Material Name', raw_material.qty as 'Available Quantity', supplier_material.unit_price as 'Unit Price' FROM supplier_material INNER JOIN raw_material ON raw_material.material_id = supplier_material.material_id WHERE supplier_material.supplier_id = '" + selectedSupplier + "'";

            DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);

            populateNonComboGrids();
        }
Ejemplo n.º 3
0
        private void populateGrid()
        {
            string selectStatement = "SELECT supplier_id as 'Supplier ID', name as 'Supplier Name' , contact_no as 'Contact Number', email as 'Email' FROM SUPPLIER";

            DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);

            string selectStatement4 = "SELECT raw_material.material_id as 'Material ID', raw_material.name as 'Material Name', raw_material.qty as 'Quantity' FROM raw_material ";

            DatabaseHandler.populateViewwithNoParameters(selectStatement4, dataGridView2);
        }
Ejemplo n.º 4
0
 private void findByName_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string selectStatement = "SELECT supplier_id as 'Supplier Code', name as 'Supplier' , contact_no as 'Contact Number', email as 'Email' FROM SUPPLIER WHERE name like '%" + findByName.Text + "%'";
         DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);
     }
     catch (Exception err)
     {
         Console.WriteLine(err);
     }
 }
Ejemplo n.º 5
0
 private void findMemId_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string selectStatement = "SELECT member_name as 'Member Name', username as 'Username' , role as 'User Role' FROM user WHERE username like '%" + findMemId.Text + "%'";
         DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);
     }
     catch (Exception err)
     {
         Console.WriteLine(err);
     }
 }
Ejemplo n.º 6
0
 private void findById_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string selectStatement = "SELECT name as 'Client Name', client_id as 'Client ID' , contact_no as 'Contact Number', email as 'Email' FROM CLIENT WHERE client_id like '%" + findById.Text + "%'";
         DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);
     }
     catch (Exception err)
     {
         Console.WriteLine(err);
     }
 }
Ejemplo n.º 7
0
        private void populateGrid()
        {
            string selectStatement = "SELECT member_name as 'Member Name', username as 'Member ID' , role as 'User Role' , email as 'Email' FROM user";

            DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);
        }
Ejemplo n.º 8
0
        private void populateGrid()
        {
            string selectStatement = "SELECT name as 'Client Name', client_id as 'Client ID' , contact_no as 'Contact Number', email as 'Email' FROM CLIENT";

            DatabaseHandler.populateViewwithNoParameters(selectStatement, dataGridView1);
        }