Esempio n. 1
0
 public void Save()
 {
     if (SortMainObject.CheckUserHasWriteAccess(SortMainId))
     {
         SortMainObject.UpdateReminderDate(SortMainId, ReminderDate);
     }
 }
 public void Save()
 {
     if (SortMainObject.CheckUserHasWriteAccess(SortMainId))
     {
         SortMainObject.UpdateDelayToDate(SortMainId, DelayToDate, DelayReason);
     }
 }
Esempio n. 3
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult JorunalSave(JournalModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();
            }

            return(null);
        }
Esempio n. 4
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AbstractSave(AbstractModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();
            }

            return(null);
        }
Esempio n. 5
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult ProtectedDataSave(ProtectedDataModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();
            }

            return(null);
        }
Esempio n. 6
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult ConferenceSave(ConferenceModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();
            }

            return(null);
        }
Esempio n. 7
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public JsonResult AddAttachment(AttachmentModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(Json(model.SortAttachmentId));
            }

            return(null);
        }
Esempio n. 8
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AddCoreCapabilities(MetadataModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(PartialView("Partials/_coreCapabilitiesList", SortMetaDataObject.GetSortMetaDatas(model.SortMainId, MetaDataTypeEnum.CoreCapabilities)));
            }

            return(null);
        }
Esempio n. 9
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AddContact(ContactModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(PartialView("Partials/_contactList", ContactObject.GetContacts(model.SortMainId)));
            }

            Response.StatusCode = (int)HttpStatusCode.BadRequest;
            return(null);
        }
Esempio n. 10
0
        public ActionResult ResetReleaseDelay(int?id)
        {
            if (id.HasValue)
            {
                if (SortMainObject.CheckUserHasWriteAccess(id.Value))
                {
                    SortMainObject.ResetDelayToDate(id.Value);
                }
            }

            return(RedirectToAction("Index", "Artifact", new{ id }));
        }
Esempio n. 11
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AddAuthor(AuthorModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(PartialView("Partials/_authorList", AuthorObject.GetAuthors(model.SortMainId)));
            }

            Response.StatusCode = (int)HttpStatusCode.BadRequest;
            return(null);
        }
Esempio n. 12
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AddSponsor(MetadataModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(PartialView("Partials/_sponsorOrgList", SortMetaDataObject.GetSortMetaDatas(model.SortMainId, MetaDataTypeEnum.SponsoringOrgs)));
            }

            Response.StatusCode = (int)HttpStatusCode.BadRequest;
            return(null);
        }
Esempio n. 13
0
        [HttpPost]/*, ValidateAntiForgeryToken]*/
        public ActionResult AddFunding(FundingModel model)
        {
            if (ModelState.IsValid && SortMainObject.CheckUserHasWriteAccess(model.SortMainId))
            {
                model.Save();

                return(PartialView("Partials/_fundingList", FundingObject.GetFundings(model.SortMainId)));
            }

            Response.StatusCode = (int)HttpStatusCode.BadRequest;
            return(null);
        }
Esempio n. 14
0
        public ActionResult DeleteOstiDocument(int?id, bool?aRtn)
        {
            if (id.HasValue)
            {
                if (SortMainObject.CheckUserHasWriteAccess(id.Value))
                {
                    SortAttachmentObject.GetOstiAttachment(id.Value)?.PerminateDelete();
                }
            }

            if (aRtn.HasValue && aRtn.Value)
            {
                return(RedirectToAction("Index", "Artifact", new { id }));
            }

            return(RedirectToAction("Index", "Home"));
        }
Esempio n. 15
0
        public ActionResult RemoveContact(int?id)
        {
            int sid = 0;

            if (id.HasValue)
            {
                var contact = ContactObject.GetContact(id.Value);
                if (contact != null)
                {
                    sid = contact.SortMainId;
                    if (SortMainObject.CheckUserHasWriteAccess(sid))
                    {
                        contact.Delete();
                    }
                }
            }

            return(PartialView("Partials/_contactList", ContactObject.GetContacts(sid)));
        }
Esempio n. 16
0
        public ActionResult SetPrimaryAuthor(int?id)
        {
            int sid = 0;

            if (id.HasValue)
            {
                var author = AuthorObject.GetAuthor(id.Value);
                if (author != null)
                {
                    sid = author.SortMainId;
                    if (SortMainObject.CheckUserHasWriteAccess(sid))
                    {
                        author.SetAsPrimary();
                    }
                }
            }

            return(PartialView("Partials/_authorList", AuthorObject.GetAuthors(sid)));
        }
Esempio n. 17
0
        public ActionResult RemoveSponsor(int?id)
        {
            int sid = 0;

            if (id.HasValue)
            {
                var meta = SortMetaDataObject.GetSortMetaData(id.Value);
                if (meta != null)
                {
                    sid = meta.SortMainId;
                    if (SortMainObject.CheckUserHasWriteAccess(sid))
                    {
                        meta.Delete();
                    }
                }
            }

            return(PartialView("Partials/_sponsorOrgList", SortMetaDataObject.GetSortMetaDatas(sid, MetaDataTypeEnum.SponsoringOrgs)));
        }
Esempio n. 18
0
        public ActionResult RemoveCoreCapabilities(int?id)
        {
            int mid = 0;

            if (id.HasValue)
            {
                var meta = SortMetaDataObject.GetSortMetaData(id.Value);
                if (meta != null)
                {
                    mid = meta.SortMainId;
                    if (SortMainObject.CheckUserHasWriteAccess(mid))
                    {
                        meta.Delete();
                    }
                }
            }

            return(PartialView("Partials/_coreCapabilitiesList", SortMetaDataObject.GetSortMetaDatas(mid, MetaDataTypeEnum.CoreCapabilities)));
        }
Esempio n. 19
0
        public ActionResult RemoveFunding(int?id)
        {
            int sid = 0;

            if (id.HasValue)
            {
                var funding = FundingObject.GetFunding(id.Value);
                if (funding != null)
                {
                    sid = funding.SortMainId;
                    if (SortMainObject.CheckUserHasWriteAccess(sid))
                    {
                        funding.Delete();
                    }
                }
            }

            return(PartialView("Partials/_fundingList", FundingObject.GetFundings(sid)));
        }