Ejemplo n.º 1
0
 private void tsbChange_Click(object sender, System.EventArgs e)
 {
     HouseServiceTariff tariff = this.bsHouseServiceTariffs.get_Current() as HouseServiceTariff;
     if (tariff != null)
     {
         HouseServiceTariffAddChangeForm form = new HouseServiceTariffAddChangeForm(tariff);
         form.ShowDialog(this);
         if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             form.HouseServiceTariff.SaveChanges();
             this.bsHouseServiceTariffs.ResetBindings(false);
         }
     }
 }
Ejemplo n.º 2
0
 private void tsbAdd_Click(object sender, System.EventArgs e)
 {
     HouseServiceTariffAddChangeForm form = new HouseServiceTariffAddChangeForm(this.House.Id);
     form.ShowDialog(this);
     if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
     {
         form.HouseServiceTariff.SaveChanges();
         this.bsHouseServiceTariffs.Add(form.HouseServiceTariff);
     }
 }