Beispiel #1
0
        public IActionResult Claim(Claim claim)
        {
            var hiddenState = Request.Form["hiddenState"];

            if (ModelState.IsValid)
            {
                UpdateClaim         updClaim  = new UpdateClaim(claim);
                List <SqlParameter> parameter = updClaim.parameterMap;
                if (!claim.Check)
                {
                    parameter[12] = new SqlParameter("@mailingState", hiddenState.ToString());
                }

                var result = _context.Database.ExecuteSqlCommand("sp_updClaim @claimID, @currentAPN, @ClaimStatusRefID, @AssigneeID, @AssignorID, @claimant, @claimantSSN, @spouse, @spouseSSN, @mailingStName, @mailingApt, @mailingCity, @mailingState, @mailingZip, @priorAPN, @dateMovedOut, @priorStName, @priorApt, @priorCity, @priorState, @priorZip, @ClaimActionRefID, @FindingReasonRefID, @Comments, @Late,  @rollTaxYear, @suppTaxYear, @exemptRE, @exemptRE2"
                                                                 , parameter[0], parameter[1], parameter[2], parameter[3], new SqlParameter("@AssignorID", User.Identity.Name)
                                                                 , parameter[5], parameter[6], parameter[7], parameter[8], parameter[9]
                                                                 , parameter[10], parameter[11], parameter[12], parameter[13], parameter[14]
                                                                 , parameter[15], parameter[16], parameter[17], parameter[18], parameter[19]
                                                                 , parameter[20], parameter[21], parameter[22], parameter[23], parameter[24]
                                                                 , parameter[25], parameter[26], parameter[27], parameter[28]);



                return(LocalRedirect("~/Home/Claim/" + claim.claimID));
            }
            return(View("Claim", "Home"));
        }
Beispiel #2
0
        public IActionResult Claim(int?id)
        {
            ViewBag.history = new ClaimHistory();
            DropdownListClaim drop = GetDropdown(id);
            var modelUser          = new Claim();

            ViewBag.ModelMessage = false;
            if (id != null && id > 1)
            {
                var EmpID = new SqlParameter("@ClaimID", id);

                modelUser = _context.Claim.FromSql("sp_getClaim @ClaimID", EmpID).FirstOrDefaultAsync().Result;
                if (modelUser == null)
                {
                    ViewBag.ModelMessage = true;
                    return(RedirectToAction(nameof(Index)));
                }
                modelUser.CreatedDate = DateTime.Now;
                var test = _context.History.FromSql("sp_getClaimHistory @ClaimID", EmpID).ToListAsync().Result.ToList();

                ViewBag.history = test;
            }
            else
            {
                modelUser = new Claim();
            }
            ViewBag.Staffs       = GetAllStaffs();
            ViewBag.dropdownInfo = drop;

            return(View(modelUser));
        }