Beispiel #1
0
        //}
        internal void SaveStatusUpdate(String statusContent, int range)
        {
            if (!_userSession.LoggedIn)
            {
                _view.Message("Chưa đăng nhập");
                return;
            }
            int accountID;
            int senderID;
            senderID = _userSession.CurrentUser.AccountID;
            accountID = _webContext.AccountID;
            bool IsAccount = true;
            if (accountID != senderID)
                IsAccount = false;
            if (accountID <= 0)
                accountID = senderID;

            StatusUpdate status;
            status = new StatusUpdate();
            status.AccountID = accountID;
            status.SenderID = senderID;
            status.Status = statusContent;
            status.VisibilityLevelID = range;

            IStatusUpdateService _statusUpdateService;
            _statusUpdateService = new StatusUpdateService();
            _statusUpdateService.SaveStatusUpdate(status);
            _view.LoadAlert(_alertService.GetAlerts(senderID, accountID), _statusUpdateService.GetStatusUpdateByID( _userSession.CurrentUser,_accountService.GetAccountByAccountID(accountID), IsAccount));
        }
Beispiel #2
0
        internal void SaveStatusUpdate(String statusContent, int range)
        {
            if (!_userSession.LoggedIn)
            {
               // _view.Message("Chưa đăng nhập");
                return;
            }
            int accountID;
            int senderID;
            senderID = _userSession.CurrentUser.AccountID;
            accountID = _webContext.AccountID;
            if (accountID <= 0)
                accountID = senderID;
            StatusUpdate status;
            status = new StatusUpdate();
            status.AccountID = accountID;
            status.SenderID = senderID;
            status.Status = statusContent;
            status.VisibilityLevelID = range;

            IStatusUpdateService _statusUpdateService;
            _statusUpdateService = new StatusUpdateService();
            _statusUpdateService.SaveStatusUpdate(status);
            LogUtil.Logger.Writeln("SaveStatusUpdate: " + statusContent);
            _view.LoadStatus(GetStatusToShow(account), GetAlertToShow(account));
        }