private void tcMain_SelectedIndexChanged(object sender, EventArgs e) { //Update each tabs components when switching to the tab if (tcMain.SelectedTab.Name == "tSearch") { RegionUtils.PopulateCBRegion(cbSearchAluet); } else if (tcMain.SelectedTab.Name == "tRentControl") { PopulateDGVOrder(); } else if (tcMain.SelectedTab.Name == "tAreaControl") { PopulateDGVRegion(); } else if (tcMain.SelectedTab.Name == "tCustomerControl") { PopulateDGVCustomer(); } else if (tcMain.SelectedTab.Name == "tServiceControl") { PopulateDGVCottage(); PopulateDGVService(); RegionUtils.PopulateCBRegion(cbCottageRegions); RegionUtils.PopulateCBRegion(cbServiceRegion); } else if (tcMain.SelectedTab.Name == "tBilling") { PopulateDGVBilling(); } }
public ModifyServiceForm(Service s) { //Used to import services data to from InitializeComponent(); RegionUtils.PopulateCBRegion(cbModifyServiceRegion); lblModifyServiceID.Text = s.ServiceID.ToString(); cbModifyServiceRegion.Text = RegionUtils.RegionIndexToName(s.RegionID); tbModifyServiceName.Text = s.Name; tbModifyServiceType.Text = s.Type.ToString(); nudModifyServicePrice.Value = (int)s.Price; nudModifyServiceVAT.Value = (int)s.Vat; tbModifyServiceDescription.Text = s.Description; }
public ModifyCottageForm(Cottage c) { //Used to import cottage data to form InitializeComponent(); RegionUtils.PopulateCBRegion(cbModifyCottageRegion); lblModifyCottageID.Text = c.CottageID.ToString(); cbModifyCottageRegion.Text = RegionUtils.RegionIndexToName(c.RegionID); tbModifyCottagePostNum.Text = c.Postal; tbModifyCottageName.Text = c.Name; tbModifyCottageStreet.Text = c.Address; nudModifyCottageCapacity.Value = c.Capacity; cbModifyCottageEquipment.Text = c.Equipment; nudModifyCottagePrice.Value = (int)c.Price; tbModifyCottageDescription.Text = c.Description; }
private void RentCottage_Load(object sender, EventArgs e) { PopulateDGVRegion(); PopulateDGVOrder(); PopulateDGVCustomer(); PopulateDGVService(); PopulateDGVCottage(); PopulateDGVBilling(); RegionUtils.PopulateCBRegion(cbSearchAluet); RegionUtils.PopulateCBRegion(cbCottageRegions); RegionUtils.PopulateCBRegion(cbServiceRegion); cbSearchAluet.SelectedIndex = 0; cbSearchVarustelu.SelectedIndex = 0; cbBillingPaid.SelectedIndex = 2; tbOrderSearch.Tag = tbOrderSearch.Text = "Kirjoita hakusana..."; tbOrderSearch.ForeColor = Color.Gray; tbOrderSearch.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Italic); BillingUtils.rentCottage = this; }
public ModifyServiceForm() { InitializeComponent(); RegionUtils.PopulateCBRegion(cbModifyServiceRegion); }
public ModifyCottageForm() { InitializeComponent(); RegionUtils.PopulateCBRegion(cbModifyCottageRegion); }
public AddCottageForm() { InitializeComponent(); RegionUtils.PopulateCBRegion(cbAddCottageRegion); cbAddCottageEquipment.Text = "Hyvä"; }