Beispiel #1
0
        public void load_employee()
        {
            int num;

            this.comboBoxEmployee.Items.Clear();
            string query = "SELECT employeeId,name,salary FROM firoz_center.tbl_employee t where status='ACTIVE' order by employeeId;";

            for (num = 0; num < 3; num++)
            {
                this.Employee[num] = new List <string>();
            }
            this.Employee = dbc.Select(3L, query);
            for (num = 0; num < this.Employee[0].Count; num++)
            {
                this.comboBoxEmployee.Items.Add(this.Employee[1].ElementAt <string>(num).ToString());
            }
        }
        public void load_party()
        {
            int num;

            this.comboBoxEmployee.Items.Clear();
            string query = "SELECT * FROM firoz_center.tbl_employee t order by employeeId;";

            for (num = 0; num < 9; num++)
            {
                this.Employee[num] = new List <string>();
            }
            this.Employee = dbc.Select(9L, query);
            for (num = 0; num < this.Employee[0].Count; num++)
            {
                this.comboBoxEmployee.Items.Add(this.Employee[1].ElementAt <string>(num).ToString());
            }
        }
Beispiel #3
0
        private void load_price()
        {
            DBConnect dbc = new DBConnect();

            string sql = "SELECT model,cc,color,purchase_price,sale_price  FROM firoz_center.tbl_vehicle_info t where brand='HONDA' order by model,cc,color;";

            List <string>[] listArray = new List <string> [5];

            int num;

            for (num = 0; num < 5; num++)
            {
                listArray[num] = new List <string>();
            }

            listArray = dbc.Select(5L, sql);

            for (num = 0; num < listArray[0].Count; num++)
            {
                dataGridView1.Rows.Add(listArray[0].ElementAt(num), listArray[1].ElementAt(num), listArray[2].ElementAt(num), listArray[3].ElementAt(num), listArray[4].ElementAt(num));
            }
        }