public ActionResult SaveMedicine(string Name) { var districtList = headManager.GetDistrictList(); ViewBag.DistrictList = new SelectList(districtList, "Id", "Name"); var thanaList = headManager.GetThanaList(); ViewBag.ThanaList = new SelectList(thanaList, "Id", "Name"); var centerList = headManager.GetCenterList(); ViewBag.CenterList = new SelectList(centerList, "Id", "Name"); var medicineList = headManager.GetMedicineList(); ViewBag.MedicineList = new SelectList(medicineList, "Id", "GenericName"); List <SendMedicine> sendMedicines = (Session["SendMedicine"]) as List <SendMedicine>; if (sendMedicines.Count != 0) { int rowAffected = headManager.SaveSendMedicine(sendMedicines); ViewBag.Message = "Medinice list is saved for sending "; Session["SendMedicine"] = new List <SendMedicine>(); } else { ViewBag.Message = "Please add some Medinice first."; Session["SendMedicine"] = new List <SendMedicine>(); } return(View("SendMedicine")); }