public async Task <ActionResult> DeleteConfirmed(string id) { DocReq r = await DocumentDBRepository.GetItemAsync <DocReq>(id); await DocumentDBRepository.DeleteItemAsync(r.Id); return(RedirectToAction("Index")); }
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)); }
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)); }
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)); }