Guest User

Untitled

a guest
Mar 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. @{Html.RenderPartial("~/Views/Appoinment/GetALLAppoinmentMedicine.cshtml",
  2. new List<HMS.Models.AppointmentViewModel> { new HMS.Models.AppointmentViewModel() },
  3. new ViewDataDictionary { { "aid", Model.AppoinmentIDP} });}
  4.  
  5. public ActionResult GetALLAppoinmentMedicine(int aid)
  6. {
  7. var idParam = new SqlParameter
  8. {
  9. ParameterName = "APPIDP",
  10. Value = aid
  11. };
  12. var SpResult = DB.Database.SqlQuery<AppointmentViewModel>("exec uspAppoinmentMedicine_GetAll @APPIDP", idParam).ToList<AppointmentViewModel>();
  13. IEnumerable<AppointmentViewModel> Result = SpResult.Select(s => new AppointmentViewModel
  14. {
  15. MadicineName = s.MadicineName,
  16. PotencyName = s.PotencyName,
  17. SizeofPills = s.SizeofPills,
  18. Dose = s.Dose,
  19. DoseType = s.DoseType,
  20. Repitation = s.Repitation,
  21. Quantity = s.Quantity,
  22. Duration = s.Duration
  23. });
  24. return View(Result);
  25. }
Add Comment
Please, Sign In to add comment