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