Skip to content

Instantly share code, notes, and snippets.

Created May 16, 2016 21:21
Show Gist options
  • Save anonymous/ff37cb3de82cae399389ec773206ebb0 to your computer and use it in GitHub Desktop.
Save anonymous/ff37cb3de82cae399389ec773206ebb0 to your computer and use it in GitHub Desktop.
if (ModelState.IsValid)
{
if (returnDetails != null)
{
returnDetails.ReturnDate = DateTime.Now;
}
returnDetails.Name = currentUser;
db.returnDetails.Add(returnDetails);
db.SaveChanges();
order.ReturnId = returnDetails.ReturnId;
db.SaveChanges();
return RedirectToAction("Index");
}
return View(returnDetails);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment