Created
October 13, 2018 16:19
-
-
Save jinan-kordab/0d63d69354ad03d68f1129f2f4d5d764 to your computer and use it in GitHub Desktop.
WH01 Action Result Copy Product
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult CopyProduct(FormCollection s_formCollection) | |
{ | |
var ModelToReturn = TempData["currModel"]; | |
var prodId = Convert.ToInt32(s_formCollection["hprodid"]); | |
var UpdateContext = new EntityFramework.WH01Entities(); | |
var quwry = from pdet in UpdateContext.PRODUCT_DESCRIPTION | |
where pdet.productID == prodId | |
select pdet; | |
foreach (PRODUCT_DESCRIPTION pd in quwry) | |
{ | |
pd.prodctCopied = true; | |
} | |
UpdateContext.SaveChanges(); | |
return View("SearchProduct", ModelToReturn); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment