示例#1
0
        public virtual ActionResult SaveDeclareInitialDeclareWF(string operationNumber, int procurementId = 0, string tabName = null, int reasonType = 0, string reason = null)
        {
            var viewModel = new DeclareIneligibilityViewModel()
            {
                Reason = reason != null ? reason : string.Empty, IneligibilityReasonTypeId = reasonType
            };
            var response = _procurementDetailsService.SaveDeclareInegibility(procurementId, viewModel);

            return(RedirectToAction("Read", "ProcurementDetail", new { area = "SGP", tabName = ProcurementDetailNavigation.TAB_NAME_PROCUREMENT_DETAIL, procurementId = procurementId, errorMessage = response.ErrorMessage }));
        }
        public static DeclareIneligibilityViewModel UpdateDeclareInegibility(this DeclareIneligibilityViewModel model, ClientFieldData[] formData)
        {
            var declareInegibilityFieldNames = new string[] 
            {
                "reasonText-inegibility",
                "reasonTypeId-inegbility"
            };

            model = new DeclareIneligibilityViewModel();

            var field = formData.FirstOrDefault(x => x.Name == declareInegibilityFieldNames[0]);
            model.Reason = field.ConvertToString();
            field = formData.FirstOrDefault(x => x.Name == declareInegibilityFieldNames[1]);
            model.IneligibilityReasonTypeId = field.ConvertToInt();

            return model;
        }