private void rbn_Contract_Insert_Tenant_Click_1(object sender, RoutedEventArgs e) { Contract_Insert_Tenant _Contract_Insert_Tenant = new Contract_Insert_Tenant(); _Contract_Insert_Tenant.Owner = Window.GetWindow(this); _Contract_Insert_Tenant.ShowDialog(); }
private void HandleKeyDownEvent(object sender, KeyEventArgs e) { try { if (e.Key == Key.L && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { LockSystem(); } else if (e.Key == Key.System && e.SystemKey == Key.F4) { Application.Current.Shutdown(); } else if (e.Key == Key.F2) { frmSuggest _frmSuggest = new frmSuggest(); _frmSuggest.Owner = Window.GetWindow(this); _frmSuggest.ShowDialog(); } else if (e.Key == Key.R && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { Contract_Insert_Renter _Contract_Insert_Renter = new Contract_Insert_Renter(); _Contract_Insert_Renter.Owner = Window.GetWindow(this); _Contract_Insert_Renter.ShowDialog(); } else if (e.Key == Key.T && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { Contract_Insert_Tenant _Contract_Insert_Tenant = new Contract_Insert_Tenant(); _Contract_Insert_Tenant.Owner = Window.GetWindow(this); _Contract_Insert_Tenant.ShowDialog(); } else if (e.Key == Key.F && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { } } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
void Insert_Contract_Tenant() { try { Contract_Insert_Tenant _Contract_Insert_Tenant = new Contract_Insert_Tenant(); _Contract_Insert_Tenant.Owner = Window.GetWindow(this); _Contract_Insert_Tenant.ShowDialog(); if (_Contract_Insert_Tenant.c_id_insert != 0) { Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; Search(); DBMemory.LoadFeeTenant(); for (int i = 0; i < c_lst.Count; i++) { Contract_Info ui = (Contract_Info)c_lst[i]; if (ui.Contract_Id == _Contract_Insert_Tenant.c_id_insert) { c_row_select = i; _Contract_Insert_Tenant.c_id_insert = 0; break; } } } Mouse.OverrideCursor = null; DataGridHelper.NVSFocus(dgrContract, c_row_select, 0); } catch (Exception ex) { Mouse.OverrideCursor = null; CommonData.log.Error(ex.ToString()); } }