public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { List <AccountsDetailsListEntity> accountDetails = new List <AccountsDetailsListEntity>(values[0] as IEnumerable <AccountsDetailsListEntity>); AccountsDetailsListEntity selectedAccountDetail = values[1] as AccountsDetailsListEntity; accountDetails.RemoveAll(x => x.AccountType != selectedAccountDetail.AccountType); if (accountDetails != null && accountDetails.Any() && selectedAccountDetail.ID == accountDetails.Min(x => x.ID)) { return(Visibility.Visible); } return(Visibility.Collapsed); }
public AccountsDetailsListEntity StartNewFinancialYear(string status) { AccountsDetailsListEntity Message = new AccountsDetailsListEntity(); try { Message = entities.Database.SqlQuery <AccountsDetailsListEntity>("StartNewFinancialYear @Message", new SqlParameter("Message", status)).SingleOrDefault(); } catch (Exception) { throw; } return(Message); }