public async Task <ActionResult> EditAsync(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BingIORA item = await DocumentDBRepository <BingIORA> .GetItemAsync(id); var j = await DocumentDBRepository <Job> .GetItemAsync("a74571b7-2758-48ae-bd1a-d88efc437f26"); ViewBag.Job = j; var i = await DocumentDBRepository <IORA> .GetItemAsync("290c5999-2076-46f1-b40f-443f42cea4f8"); ViewBag.IORA = i; var f = await DocumentDBRepository <BingFinancial> .GetItemsAsync(d => d.Tag == "BingFinancial" && d.BridgeModule == i.BridgeModule && d.CertType == j.CertType); ViewBag.FinancialSet = f.FirstOrDefault(); if (item == null) { return(HttpNotFound()); } return(View(item)); }
public async Task <ActionResult> EditAsync([Bind(Include = "Tag,Id,BridgeModule,Description,BookMarkName,Formula," + "Condition,Chapter")] BingIORA item) { if (ModelState.IsValid) { await DocumentDBRepository <BingIORA> .UpdateItemAsync(item.Id, item); return(RedirectToAction("Index")); } return(View(item)); }
public async Task <ActionResult> CreateAsync() { var j = await DocumentDBRepository <Job> .GetItemAsync("a74571b7-2758-48ae-bd1a-d88efc437f26"); ViewBag.Job = j; var i = await DocumentDBRepository <IORA> .GetItemAsync("290c5999-2076-46f1-b40f-443f42cea4f8"); ViewBag.IORA = i; var f = await DocumentDBRepository <BingFinancial> .GetItemsAsync(d => d.Tag == "BingFinancial" && d.BridgeModule == j.BridgeModule && d.CertType == j.CertType); ViewBag.FinancialSet = f.FirstOrDefault(); var S = new BingIORA(); return(View(S)); }