Advertisement
Guest User

Untitled

a guest
May 24th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. public ActionResult Login() //Get Method for Login
  2. {
  3. return View("Login");
  4. }
  5. [HttpPost] // Post Method on Login
  6. public ActionResult Defaults(string username, string password)
  7. {
  8. FloorFactor ff = new FloorFactor(); // tried to create model object to pass in view
  9. try
  10. {
  11. Login_Details login_detail = db.Login_Details.Single(x => (x.UserName == username) && (x.Password == password));
  12. if (login_detail != null)
  13. {
  14. return View("../Home/Index",ff ); // need to get view Index of home controller.
  15. }
  16. }
  17. catch { }
  18. return View("Login");
  19. }
  20.  
  21. @model IEnumerable<Pricing_Tool_Test.FloorFactor>
  22.  
  23. @{
  24. ViewBag.Title = "Index";
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement