public KlientDetail(bool x, RentDetailVaade rentdetailvaade) { InitializeComponent(); Datacontext = new KlientDetailVM(); datacontext.klikkfunktsioon = x; datacontext.rentDetailVaade = rentdetailvaade; cboxFilterArhiiv.IsEnabled = false; btnLisaKlient.IsEnabled = false; }
/// <summary> /// Avab RentDetailVaade vastava rendiga /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lviewRent_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (lviewRent.SelectedItem != null) { var valik = (EasyRent.BLL.Rentimine.RentimineBO)lviewRent.SelectedItem; var uusdetail = new RentDetailVaade(valik); uusdetail.Show(); } }
// kui tahetakse rentdetailvaatesse lisada sõidukit public SqidukDetail(bool x, RentDetailVaade rentdetailvaade) { InitializeComponent(); Datacontext = new SqidukDetailVM(); datacontext.klikkfunktsioon = x; datacontext.rentDetailVaade = rentdetailvaade; datacontext.FilterArhiveeri = false; datacontext.FilterRentBron = false; cboxFilterArhiiv.IsEnabled = false; cboxFilterRentBron.IsEnabled = false; btnLisaSqiduk.IsEnabled = false; }
/// <summary> /// Laenuta nupu eventhandler, loob uue RentDetailVaade /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLaenuta_Click(object sender, RoutedEventArgs e) { var uusaken = new RentDetailVaade(datacontext.Klient); uusaken.Show(); this.Close(); }
/// <summary> /// Avab tühja RentDetailVaade /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLisaRent_Click(object sender, RoutedEventArgs e) { var uusaken = new RentDetailVaade(); uusaken.Show(); }