Exemple #1
0
        public async Task <ActionResult> DeleteConfirmed(string id)
        {
            DocReq r = await DocumentDBRepository.GetItemAsync <DocReq>(id);

            await DocumentDBRepository.DeleteItemAsync(r.Id);

            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public async Task <ActionResult> CreateAsync([Bind(Include = "Id,Tag,BridgeModule,DocReqItem,NpsJobId,DbJobId")] DocReq item)
        {
            if (ModelState.IsValid)
            {
                await DocumentDBRepository.CreateItemAsync <DocReq>(item);

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }
Exemple #3
0
        public async Task <ActionResult> CreateAsync()
        {
            var r = new DocReq
            {
                Tag          = "DocReq",
                NpsJobId     = (string)Session["NpsJobId"],
                DbJobId      = (string)Session["DbJobId"],
                BridgeModule = (string)Session["BridgeModule"]
            };

            ViewBag.DocReqSelectList = await DocumentDBRepository.GetItemsAsync <BList>(d => d.Tag == "BList" && d.BridgeModule == r.BridgeModule && d.ListType == "DocReq");


            return(View(r));
        }
Exemple #4
0
        public async Task <ActionResult> Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            DocReq r = await DocumentDBRepository.GetItemAsync <DocReq>(id);

            if (r == null)
            {
                return(HttpNotFound());
            }

            return(View(r));
        }