コード例 #1
0
        /// <summary>
        /// Get a list of suggestions for a photo.
        /// </summary>
        /// <param name="photoId">The photo id of the photo to list the suggestions for.</param>
        /// <param name="status">The type of status to filter by.</param>
        /// <param name="callback"></param>
        /// <returns></returns>
        public void PhotosSuggestionsGetListAsync(string photoId, SuggestionStatus status, Action<FlickrResult<SuggestionCollection>> callback)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary<string, string>();
            parameters.Add("method", "flickr.photos.suggestions.getList");
            parameters.Add("photo_id", photoId);
            parameters.Add("status_id", status.ToString("d"));

            GetResponseAsync<SuggestionCollection>(parameters, callback);
        }
コード例 #2
0
        /// <summary>
        /// Get a list of suggestions for a photo.
        /// </summary>
        /// <param name="photoId">The photo id of the photo to list the suggestions for.</param>
        /// <param name="status">The type of status to filter by.</param>
        /// <returns></returns>
        public SuggestionCollection PhotosSuggestionsGetList(string photoId, SuggestionStatus status)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary<string, string>();
            parameters.Add("method", "flickr.photos.suggestions.getList");
            parameters.Add("photo_id", photoId);
            parameters.Add("status_id", status.ToString("d"));

            return GetResponseCache<SuggestionCollection>(parameters);
        }
コード例 #3
0
        /// <summary>
        /// Get a list of suggestions for a photo.
        /// </summary>
        /// <param name="photoId">The photo id of the photo to list the suggestions for.</param>
        /// <param name="status">The type of status to filter by.</param>
        /// <returns></returns>
        public SuggestionCollection PhotosSuggestionsGetList(string photoId, SuggestionStatus status)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary <string, string>();

            parameters.Add("method", "flickr.photos.suggestions.getList");
            parameters.Add("photo_id", photoId);
            parameters.Add("status_id", status.ToString("d"));

            return(GetResponseCache <SuggestionCollection>(parameters));
        }
コード例 #4
0
        /// <summary>
        /// Get a list of suggestions for a photo.
        /// </summary>
        /// <param name="photoId">The photo id of the photo to list the suggestions for.</param>
        /// <param name="status">The type of status to filter by.</param>
        /// <param name="callback"></param>
        /// <returns></returns>
        public void PhotosSuggestionsGetListAsync(string photoId, SuggestionStatus status, Action <FlickrResult <SuggestionCollection> > callback)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary <string, string>();

            parameters.Add("method", "flickr.photos.suggestions.getList");
            parameters.Add("photo_id", photoId);
            parameters.Add("status_id", status.ToString("d"));

            GetResponseAsync <SuggestionCollection>(parameters, callback);
        }
コード例 #5
0
        public async Task <IActionResult> Register(bool cra, bool cre, SuggestionStatus sstatus, string ros, int maid, [Bind("Id,UILanguage,ReferredById,ArName,EnName,Email,Password,CountryId,UniversityId")] RegisterFromOutsideViewModel registerFromOutsideViewModel)
        {
            _context.ApplicationUsers.Add(new ApplicationUser
            {
                UserName = registerFromOutsideViewModel.Email,
                Email    = registerFromOutsideViewModel.Email,
                // Added by Alrshah =============================================================================================
                ArName = registerFromOutsideViewModel.ArName,
                EnName = registerFromOutsideViewModel.EnName,
                //DateofBirth = model.DateofBirth,
                //Gender = model.Gender,
                UILanguage   = registerFromOutsideViewModel.UILanguage,
                CityId       = 1,
                CountryId    = registerFromOutsideViewModel.CountryId,
                FacultyId    = 1,
                UniversityId = registerFromOutsideViewModel.UniversityId,
                Status       = StatusType.New,
                RegDate      = DateTime.Now,
                ARID         = 0,
                ReferredById = registerFromOutsideViewModel.ReferredById,
                Visitors     = 0,
                DAL          = Guid.NewGuid().ToString(),
                DALEnabled   = true
            });
            _context.SaveChanges();
            var userid = _context.ApplicationUsers.Where(a => a.ReferredById == registerFromOutsideViewModel.ReferredById).OrderByDescending(a => a.RegDate).First().Id;

            _context.SuggestedReviewers.Add(new SuggestedReviewer
            {
                ReviewerUserId     = userid,
                ManuscriptId       = maid,
                SuggestionStatus   = sstatus,
                CanReviewArabic    = cra,
                CanReviewEnglish   = cre,
                ReasonForSuggesion = ros,
            });
            _context.SaveChanges();
            return(RedirectToAction("Create", "SuggestedReviewers", new { /* routeValues, for example: */ mid = maid }));
        }
コード例 #6
0
 public void Skip()
 {
     Status = SuggestionStatus.Skipped;
 }
コード例 #7
0
 public void Reject()
 {
     Status = SuggestionStatus.Rejected;
 }
コード例 #8
0
 public void Accept()
 {
     Status = SuggestionStatus.Accepted;
 }
コード例 #9
0
 public VacancySuggestion(Summary summary, Vacancy vacancy, SuggestionStatus status = SuggestionStatus.Ready)
 {
     Summary = summary;
     Vacancy = vacancy;
     Status  = status;
 }
コード例 #10
0
ファイル: SummarySuggestionDto.cs プロジェクト: s4xack/Jinder
 public SummarySuggestionDto(Int32 id, SummaryDto summary, SuggestionStatus status)
 {
     Id      = id;
     Summary = summary;
     Status  = status;
 }
コード例 #11
0
 public IReadOnlyCollection <VacancySuggestion> GetForSummaryByState(Int32 summaryId, SuggestionStatus state)
 {
     return(_context.VacancySuggestions
            .Include(s => s.Summary)
            .ThenInclude(s => s.User)
            .Include(s => s.Summary)
            .ThenInclude(s => s.Specialization)
            .Include(s => s.Summary)
            .ThenInclude(s => s.Skills)
            .ThenInclude(s => s.Skill)
            .Include(s => s.Vacancy)
            .ThenInclude(v => v.User)
            .Include(s => s.Vacancy)
            .ThenInclude(v => v.Specialization)
            .Include(s => s.Vacancy)
            .ThenInclude(v => v.Skills)
            .ThenInclude(s => s.Skill)
            .Where(v => v.SummaryId == summaryId)
            .Where(v => v.Status == state)
            .Select(v => v.ToModel())
            .ToList());
 }
コード例 #12
0
 /// <summary>
 /// Convert <see cref="SuggestionStatus"/> to <see cref="Domain.Enums.Support.SuggestionStatus"/>.
 /// </summary>
 /// <param name="status">See <see cref="SuggestionStatus"/>.</param>
 /// <returns>See <see cref="Domain.Enums.Support.SuggestionStatus"/>.</returns>
 public static Domain.Enums.Support.SuggestionStatus ToDomain(this SuggestionStatus status)
 {
     return((Domain.Enums.Support.SuggestionStatus)status);
 }
コード例 #13
0
 public IReadOnlyCollection <VacancySuggestion> GetForSummaryByState(Int32 summaryId, SuggestionStatus state)
 {
     return(_vacancySuggestions
            .Where(s => s.Summary.Id == summaryId)
            .Where(s => s.Status == state)
            .Select(s => s.Copy())
            .ToList());
 }
コード例 #14
0
ファイル: SummarySuggestion.cs プロジェクト: s4xack/Jinder
 public SummarySuggestion(Vacancy vacancy, Summary summary, SuggestionStatus status = SuggestionStatus.Ready)
 {
     Vacancy = vacancy;
     Summary = summary;
     Status  = status;
 }
コード例 #15
0
 public VacancySuggestionDto(Int32 id, VacancyDto vacancy, SuggestionStatus status)
 {
     Id      = id;
     Vacancy = vacancy;
     Status  = status;
 }
コード例 #16
0
 public void Reset()
 {
     Status = SuggestionStatus.Ready;
 }
コード例 #17
0
 public SuggestionCollection PhotosSuggestionsGetList(string photoId, SuggestionStatus status)
 {
     var dictionary = new Dictionary<string, string>();
     dictionary.Add("method", "flickr.photos.suggestions.getList");
     dictionary.Add("photo_id", photoId);
     dictionary.Add("status", status.ToString().ToLower());
     return GetResponse<SuggestionCollection>(dictionary);
 }
コード例 #18
0
 /// <summary>
 /// Convert <see cref="Domain.Enums.Support.SuggestionStatus"/> to <see cref="SuggestionStatus"/>.
 /// </summary>
 /// <param name="status">See <see cref="SuggestionStatus"/>.</param>
 /// <param name="domainStatus">See <see cref="Domain.Enums.Support.SuggestionStatus"/>.</param>
 /// <returns>See <see cref="SuggestionStatus"/> returned.</returns>
 public static SuggestionStatus ToModel(this SuggestionStatus status, Domain.Enums.Support.SuggestionStatus domainStatus)
 {
     return((SuggestionStatus)domainStatus);
 }