// GET: OpenCalls/ChangeStatus/5
        public async Task <ActionResult> ChangeStatus(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CallsViewModel     vm;
            VUMM_HH_OPEN_CALLS call = _conntext.VUMM_HH_OPEN_CALLS.Find(id);

            if (call == null)
            {
                VUMM_HH_HNDL_CALLS call2 = _conntext.VUMM_HH_HNDL_CALLS.Find(id);
                if (call2 == null)
                {
                    return(HttpNotFound());
                }
                else
                {
                    vm = _hndlCallsMapper.Map <CallsViewModel>(call2);
                }
            }
            else
            {
                vm = _callsMapper.Map <CallsViewModel>(call);
            }
            vm.StatusList = createStatusList(vm.CALL_STAT_CODE);

            return(View(vm));
        }
        //// GET: OpenCalls/Create
        //public ActionResult Create()
        //{
        //    return View();
        //}

        //// POST: OpenCalls/Create
        //// To protect from overposting attacks, please enable the specific properties you want to bind to, for
        //// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
        //[HttpPost]
        //[ValidateAntiForgeryToken]
        //public async Task<ActionResult> Create([Bind(Include = "DOC_NBR,LINE_NBR,LINE_EVNT_DATE,RQSTD_SHIP_DATE,LINE_EXPR_DATE,STRM_CODE,STRM_NAME,PARENT_STRM_CODE,CALL_DSCR,APT_CODE,APT_NAME,APT_SHRT_NAME,DSTN_CODE,DSTN_NAME,CELL_PHONE,EMAIL,CALL_STAT_CODE,CALL_STAT,CALL_STAT_DATE,CALL_STAT_RMRK,CALL_STAT_FULL,BILL_TO_CUST_CODE,OPEN_DATE,HAS_IMAGES")] VUMM_HH_OPEN_CALLS vUMM_HH_OPEN_CALLS)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        db.VUMM_HH_OPEN_CALLS.Add(vUMM_HH_OPEN_CALLS);
        //        await db.SaveChangesAsync();
        //        return RedirectToAction("Index");
        //    }

        //    return View(vUMM_HH_OPEN_CALLS);
        //}

        // GET: OpenCalls/Edit/5

        public async Task <ActionResult> Edit(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            VUMM_HH_OPEN_CALLS callO = _conntext.VUMM_HH_OPEN_CALLS.Find(id);
            CallsViewModel     vm;

            if (callO == null)
            {
                VUMM_HH_HNDL_CALLS callH = _conntext.VUMM_HH_HNDL_CALLS.Find(id);
                if (callH == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
                }

                vm = _hndlCallsMapper.Map <CallsViewModel>(callH);
            }
            else
            {
                vm = _callsMapper.Map <CallsViewModel>(callO);
            }

            vm.StrmList = getStrmsList(vm.STRM_CODE);

            return(View(vm));
        }
示例#3
0
        // GET: HandelCalls/Details/5
        public async Task <ActionResult> Details(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VUMM_HH_HNDL_CALLS dto = await _conntext.VUMM_HH_HNDL_CALLS.FindAsync(id);

            if (dto == null)
            {
                return(HttpNotFound());
            }
            CallsViewModel vm = _mapper.Map <VUMM_HH_HNDL_CALLS, CallsViewModel>(dto);

            return(View(vm));
        }
示例#4
0
        // GET: HandelCalls/Edit/5
        public async Task <ActionResult> Edit(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VUMM_HH_HNDL_CALLS call = _conntext.VUMM_HH_HNDL_CALLS.Find(id);

            if (call == null)
            {
                return(HttpNotFound());
            }
            CallsViewModel vm = _mapper.Map <CallsViewModel>(call);

            vm.StrmList = getStrmsList(vm.STRM_CODE);

            return(View(vm));
        }
示例#5
0
        public async Task <ActionResult> ChangeStatus([Bind(Include = "doc_nbr,stat_rmrk, CALL_STAT_CODE, line_nbr")] CallsViewModel iVm)
        {
            if (ModelState.IsValid)
            {
                if (iVm.CALL_STAT_CODE < 301 || iVm.CALL_STAT_CODE > 340)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }
                VUMM_HH_HNDL_CALLS call = _conntext.VUMM_HH_HNDL_CALLS.Find(iVm.doc_nbr);
                if (call == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
                }
                else
                {
                    await _conntext.ExecuteStoreProcedureAsync("mm_hh.mm_hh_close", iVm.doc_nbr, call.LINE_NBR, iVm.CALL_STAT_CODE, User.Identity.Name, iVm.stat_rmrk);

                    return(RedirectToAction("Index"));
                }
            }
            return(View(iVm));
        }