public CustomerForm(String storeName, String storeDetails, String officeAddress, String shippingAddress, String storeContact, String emailAddress, String phoneNumber , String province, String paymentTerms, String shippingInstructions, string rep) { InitializeComponent(); List <ProvinceTax> provinceTaxList = ProvinceTaxDatabase.GetAllProvinces(); Object[] arr = new Object[provinceTaxList.Count]; for (int i = 0; i < provinceTaxList.Count; i++) { arr[i] = provinceTaxList[i].provinceTax + " - GST: " + provinceTaxList[i].gst + "%/PST: " + provinceTaxList[i].pst + "%"; } provinceTax_comboBox.Items.AddRange(arr); setTextBoxLimits(); storeName_textBox.Text = storeName; storeDetails_textBox.Text = storeDetails; parseStringToGroup(officeAddress, groupBox1); parseStringToGroup(shippingAddress, groupBox2); storeContact_textBox.Text = storeContact; email_textBox.Text = emailAddress; phoneNumber_textBox.Text = phoneNumber; paymentTerms_textBox.Text = paymentTerms; shippingInstructions_textBox.Text = shippingInstructions; provinceTax_comboBox.Text = provinceTax_comboBox.Items[provinceTax_comboBox.FindString(province)].ToString(); rep_textBox.Text = rep; editMode = true; storeNumber = CustomerDatabase.GetStoreID(storeName, shippingAddress); }
private void RefreshView() { foreach (ListViewItem lvItem in provinceTaxesList.Items) { provinceTaxesList.Items.Remove(lvItem); } List <ProvinceTax> provinceList = ProvinceTaxDatabase.GetAllProvinces(); foreach (ProvinceTax p in provinceList) { provinceTaxesList.Items.Add(new ListViewItem(new String[] { p.provinceTax, p.gst.ToString(), p.pst.ToString() })); } }
public CustomerForm() { InitializeComponent(); List <ProvinceTax> provinceTaxList = ProvinceTaxDatabase.GetAllProvinces(); Object[] arr = new Object[provinceTaxList.Count]; for (int i = 0; i < provinceTaxList.Count; i++) { arr[i] = provinceTaxList[i].provinceTax + " - GST: " + provinceTaxList[i].gst + "%/PST: " + provinceTaxList[i].pst + "%"; } provinceTax_comboBox.Items.AddRange(arr); setTextBoxLimits(); }