Esempio n. 1
0
        private void loadHolders()
        {
            DataTable table = new DataTable();

            if (rbEmployee.Checked == true)
            {
                table = inventory.getHolders(true);
                lblHolderName.Text = "Employee Name: *";
            }
            else
            {
                table = inventory.getHolders(false);
                lblHolderName.Text = "Name/Group/Facility: *";
            }

            cbHolderName.Items.Clear();
            foreach (DataRow row in table.Rows)
            {
                cbHolderName.Items.Add(
                    new ComboBoxItem(row["holder_name"].ToString(), row["holder_id"].ToString())
                    );
            }
            cbHolderName.SelectedIndex = -1;
            cbHolderName.Text          = string.Empty;
        }
Esempio n. 2
0
 private void loadHolders()
 {
     cbHolderName.Items.Clear();
     foreach (DataRow row in inventory.getHolders(true).Rows)
     {
         cbHolderName.Items.Add(
             new ComboBoxItem(row["holder_name"].ToString(), row["holder_id"].ToString())
             );
     }
     cbHolderName.SelectedIndex = -1;
     cbHolderName.Text          = string.Empty;
 }