Example #1
0
        public Collection <ListItem> GetAccounts()
        {
            if (Switches.AllowParentAccountInGlTransaction())
            {
                if (SessionHelper.IsAdmin())
                {
                    using (DataTable table = Accounts.GetAccounts())
                    {
                        return(GetValues(table));
                    }
                }

                using (DataTable table = Accounts.GetNonConfidentialAccounts())
                {
                    return(GetValues(table));
                }
            }

            if (SessionHelper.IsAdmin())
            {
                using (DataTable table = Accounts.GetChildAccounts())
                {
                    return(GetValues(table));
                }
            }

            using (DataTable table = Accounts.GetNonConfidentialChildAccounts())
            {
                return(GetValues(table));
            }
        }
Example #2
0
        public Collection <ListItem> GetAccounts()
        {
            if (Switches.AllowParentAccountInGlTransaction())
            {
                if (SessionHelper.IsAdmin())
                {
                    using (DataTable table = FormHelper.GetTable("core", "accounts"))
                    {
                        return(GetValues(table));
                    }
                }

                using (DataTable table = FormHelper.GetTable("core", "accounts", "confidential", "0"))
                {
                    return(GetValues(table));
                }
            }

            if (SessionHelper.IsAdmin())
            {
                using (DataTable table = FormHelper.GetTable("core", "account_view", "has_child", "0"))
                {
                    return(GetValues(table));
                }
            }

            using (DataTable table = FormHelper.GetTable("core", "account_view", "has_child, confidential", "0, 0"))
            {
                return(GetValues(table));
            }
        }
Example #3
0
        public Collection <ListItem> GetAccounts()
        {
            if (Switches.AllowParentAccountInGlTransaction())
            {
                if (CurrentUser.GetSignInView().IsAdmin.ToBool())
                {
                    return(GetValues(AccountHelper.GetAccounts()));
                }


                return(GetValues(AccountHelper.GetNonConfidentialAccounts()));
            }

            if (CurrentUser.GetSignInView().IsAdmin.ToBool())
            {
                return(GetValues(AccountHelper.GetChildAccounts()));
            }

            return(GetValues(AccountHelper.GetNonConfidentialChildAccounts()));
        }
Example #4
0
        public Collection <ListItem> GetAccounts()
        {
            if (Switches.AllowParentAccountInGlTransaction())
            {
                if (SessionHelper.IsAdmin())
                {
                    return(GetValues(AccountHelper.GetAccounts()));
                }


                return(GetValues(AccountHelper.GetNonConfidentialAccounts()));
            }

            if (SessionHelper.IsAdmin())
            {
                return(GetValues(AccountHelper.GetChildAccounts()));
            }

            return(GetValues(AccountHelper.GetNonConfidentialChildAccounts()));
        }