Ejemplo n.º 1
0
        public ActionResult Add(Guid contractGuid)
        {
            var contractNoticeViewModel = new ContractNoticeViewModel();

            try
            {
                ViewBag.noticeTypes = GetComboData("NoticeContract", "NoticeType");
                ViewBag.resolutions = GetComboData("NoticeContract", "Resolution");
                var contractInfo = _contractService.GetInfoByContractGuid(contractGuid);
                contractNoticeViewModel.ContractGuid   = contractGuid;
                contractNoticeViewModel.ContractTitle  = contractInfo.ContractTitle;
                contractNoticeViewModel.ProjectNumber  = contractInfo.ProjectNumber;
                contractNoticeViewModel.ContractNumber = contractInfo.ContractNumber;
                contractNoticeViewModel.ActionItem     = "Add";
                ViewBag.Resourcekey             = EnumGlobal.ResourceType.Contract.ToString();
                ViewBag.ContractResourceFileKey = ContractResourceFileKey.RFI.ToString();
                return(PartialView(contractNoticeViewModel));
            }
            catch (Exception e)
            {
                ModelState.AddModelError("", e.Message);
                return(View(contractNoticeViewModel));
            }
        }