public AddLedger() { InitializeComponent(); this.PreviewKeyDown += new KeyEventHandler(HandleEsc); this.DataContext = new LedgerViewModel(); LedgerName.Focus(); }
public bool isValid() { bool RValue = true; if (toList.Where(x => x.LedgerName.ToLower() == LedgerName.ToLower() && x.Id != Id).Count() > 0) { RValue = false; } return(RValue); }