public void Update(Guid UsrId, Guid UsrCurrentCommunityId, Guid UsrCurrentPageId, string UsrCurrentLang)
        {
            HitblUserSettingsUst item = new HitblUserSettingsUst();

            item.MarkOld();
            item.IsLoaded = true;

            item.UsrId = UsrId;

            item.UsrCurrentCommunityId = UsrCurrentCommunityId;

            item.UsrCurrentPageId = UsrCurrentPageId;

            item.UsrCurrentLang = UsrCurrentLang;

            item.Save(UserName);
        }
Exemple #2
0
        private void GetUserSettings()
        {
            if (_CurrentCommunity != null)
            {
                Query qry = new Query(HitblUserSettingsUst.Schema);
                qry.AddWhere(HitblUserSettingsUst.Columns.UsrCurrentCommunityId, Comparison.Equals, _CurrentCommunity.CtyId);
                qry.AddWhere(HitblUserSettingsUst.Columns.UsrId, Comparison.Equals, _UserId);

                IDataReader idr = null;
                try
                {
                    idr = qry.ExecuteReader();
                    HitblUserSettingsUstCollection UserSettingsUSTCollection = new HitblUserSettingsUstCollection();
                    UserSettingsUSTCollection.Load(idr);
                    idr.Close();
                    if (UserSettingsUSTCollection.Count > 0)
                    {
                        _UserSettings = (HitblUserSettingsUst)UserSettingsUSTCollection[0];
                    }
                    else
                    {
                        _UserSettings = new HitblUserSettingsUst();
                        _UserSettings.UsrCurrentCommunityId = _CurrentCommunity.CtyId;
                        _UserSettings.UsrCurrentLang        = _CurrLang;
                        _UserSettings.UsrId = _UserId;
                        if (_CurrentPage != null)
                        {
                            _UserSettings.UsrCurrentPageId = _CurrentPage.PagId;
                        }
                        _UserSettings.Save();
                    }
                }
                finally
                {
                    if (idr != null && !idr.IsClosed)
                    {
                        idr.Close();
                    }
                }
            }
        }
Exemple #3
0
 public bool Destroy(object UsrId)
 {
     return(HitblUserSettingsUst.Destroy(UsrId) == 1);
 }
Exemple #4
0
 public bool Delete(object UsrId)
 {
     return(HitblUserSettingsUst.Delete(UsrId) == 1);
 }