Example #1
0
        /// <summary>
        /// Copy Citations to library Folder.  - RaviM
        /// </summary>
        /// <param name="Model"></param>
        /// <param name="MID"></param>
        /// <param name="Collection"></param>
        /// <param name="start"></param>
        /// <returns></returns>
        public ActionResult CopyCitation(SearchBL.SearchForm Model, int MID, FormCollection Collection, int start = 1)
        {
            bool keepDelete;

            if (Collection["KeepDelete"] == "0")
            {
                keepDelete = false;
            }
            else
            {
                keepDelete = true;
            }

            short?DateEnd = Convert.ToInt16(Collection["dateEnd"]);

            if (!string.IsNullOrEmpty(Collection["ddlUserSubTopic"]))
            {
                var Result = SearchBL.CopyCitation(MID, Collection["ddlUserSubTopic"], CurrentUser.UserId, Convert.ToInt32(Collection["SearchId"]), DateEnd, keepDelete);

                return(RedirectToAction("index", "mylibrary", new { specid = Result, oid = Model.FolderID, fid = Collection["ddlUserSubTopic"], selaction = "saved", start = start }));
            }
            else
            {
                alert(new MyResult()
                {
                    Tittle = "Copy Citiations", Message = "Select Sub Topic", restype = false
                });
                return(RedirectToAction("SearchDetails", "Search", new { PMID = MID }));
            }

            return(RedirectToAction("SearchDetails", "Search", new { PMID = MID }));
        }
Example #2
0
 /// <summary>
 /// Keep the checked Citations in - RaviM
 /// </summary>
 /// <param name="keep"></param>
 /// <returns></returns>
 public ActionResult Action(SearchBL.SearchForm keep)
 {
     if (keep.Parameters != null)
     {
         string[] PMIDList = keep.Parameters.Split(',');
         if (keep.resultFolder2 != null)
         {
             foreach (string pmid in PMIDList)
             {
                 var Result = SearchBL.CopyCitation(Convert.ToInt32(pmid), keep.resultFolder2, CurrentUser.UserId, keep.SearchId, Convert.ToInt16(keep.DateEnd), true);
                 keep.SpecId = Result;
                 keep.showGoToDestionation = true;
                 Session["SearchResults"]  = keep;
             }
             return(RedirectToAction("SearchResults", "Search"));
         }
     }
     return(View(keep));
 }
        public ActionResult CopyCitation(SearchBL.MyQueryForm Model, string actionFirst, string actionSecond, int MID, FormCollection Collection, int start = 1)
        {
            //int specid , oid,fid;
            bool keepDelete;

            if (Collection["KeepDelete"] == "0")
            {
                keepDelete = false;
            }
            else
            {
                keepDelete = true;
            }

            short?DateEnd = Convert.ToInt16(Collection["dateEnd"]);

            if (actionFirst != null)
            {
                if (!string.IsNullOrEmpty(Collection["ddlUserSubTopic"]))
                {
                    var Result = SearchBL.CopyCitation(MID, Collection["ddlUserSubTopic"], CurrentUser.UserId, Convert.ToInt32(Collection["SearchId"]), DateEnd, keepDelete);

                    return(RedirectToAction("index", "mylibrary", new { specid = Result, oid = Model.FolderID, fid = Collection["ddlUserSubTopic"], selaction = "saved", start = start }));
                }
                else
                {
                    return(RedirectToAction("QueryCitationAbstract", "MyQueries", new { MID = MID }));
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(Collection["ddlUserSubTopicSecond"]))
                {
                    var Result = SearchBL.CopyCitation(MID, Collection["ddlUserSubTopicSecond"], CurrentUser.UserId, Convert.ToInt32(Collection["SearchId"]), DateEnd, keepDelete);

                    return(RedirectToAction("index", "mylibrary", new { specid = Result, oid = Model.FolderID, fid = Collection["ddlUserSubTopicSecond"], selaction = "saved", start = start }));
                }
                else
                {
                    return(RedirectToAction("QueryCitationAbstract", "MyQueries", new { MID = MID }));
                }
            }
        }