private void btnStudentIDLookup_Click(object sender, EventArgs e) { using (frmItemLookup itemLookup = new frmItemLookup(config["Default_Price_Level"].ToString(), config["Default_Currency"].ToString(), true /*subjects only*/)) { itemLookup.ShowDialog(); txtCourse.Text = itemLookup.GetSelectedItems()[1]; } }
private void btnStudentIDLookup_Click(object sender, EventArgs e) { using (frmItemLookup itemLookup = new frmItemLookup(config["Default_Price_Level"].ToString(), config["Default_Currency"].ToString(), true /*subjects only*/)) { itemLookup.ShowDialog(); txtCourse.Text = itemLookup.GetSelectedItems()[1]; } }
private void btnAddItem_Click(object sender, EventArgs e) { if (txtAssessmentNo.Text.Trim().Length > 0) { using (frmItemLookup itemLookup = new frmItemLookup(transaction.PriceLevel, transaction.CurrencyID)) { itemLookup.ShowDialog(); string[] selectedItems = itemLookup.GetSelectedItems(); if (selectedItems != null && selectedItems.Length > 0) { for (int i = 0; i <= selectedItems.Length - 1; i++) { Item item = ItemAdapter.Instance.GetItem(transaction.PriceLevel, transaction.CurrencyID, selectedItems[i], config["Default_U_of_M"].ToString()); if (item != null) { if (item.ItemType == ItemType.Service) { addItem(item); } else if (item.ItemType == ItemType.Kit) { foreach (Item component in getKitComponents(item)) { addItem(component); } } } } } } populateDetails(); populateTotals(); btnDeleteItem.Enabled = false; } else { Prompt.ShowError("Please enter a document number."); txtAssessmentNo.Focus(); } }
private void btnAddItem_Click(object sender, EventArgs e) { if (txtAssessmentNo.Text.Trim().Length > 0) { using (frmItemLookup itemLookup = new frmItemLookup(transaction.PriceLevel, transaction.CurrencyID)) { itemLookup.ShowDialog(); string[] selectedItems = itemLookup.GetSelectedItems(); if (selectedItems != null && selectedItems.Length > 0) { for (int i = 0; i <= selectedItems.Length - 1; i++) { Item item = ItemAdapter.Instance.GetItem(transaction.PriceLevel, transaction.CurrencyID, selectedItems[i], config["Default_U_of_M"].ToString()); if (item != null) if (item.ItemType == ItemType.Service) addItem(item); else if (item.ItemType == ItemType.Kit) foreach (Item component in getKitComponents(item)) addItem(component); } } } populateDetails(); populateTotals(); btnDeleteItem.Enabled = false; } else { Prompt.ShowError("Please enter a document number."); txtAssessmentNo.Focus(); } }