// GET: /OperationTheatreMaster/Create public ActionResult Create(int id, int Billno) { OpdModel opdmodel = new OpdModel(); OpdProvider pro = new OpdProvider(); BillingCounterProvider Brpro = new BillingCounterProvider(); opdmodel.OpdModelList = pro.Getlist().Where(x => x.OpdID == id).ToList(); //model.BillingCounterPatientInformationModel = pro.GetPatientBasicInformationFromOpd(Convert.ToInt32(ipValue), 0).FirstOrDefault(); //model.BalanceDeposit = pro.getBalanceDeposit(Convert.ToInt32(model.BillingCounterPatientInformationModel.AccountHeadId)); OperationTheatreMasterModel obj = new OperationTheatreMasterModel(); obj.refOfOpdModel = new OpdModel(); foreach (var item in opdmodel.OpdModelList) { obj.refOfOpdModel.FirstName = item.FirstName; obj.refOfOpdModel.MiddleName = item.MiddleName; obj.refOfOpdModel.LastName = item.LastName; obj.refOfOpdModel.COA = item.COA; } obj.PatientACHeadId = (int)obj.refOfOpdModel.COA; obj.PatientDepoAmount = Brpro.getBalanceDeposit(obj.PatientACHeadId); obj.SourceID = id; ViewBag.value = 0; return(View(obj)); }
// // GET: /OperationTheatreMaster/Edit/5 public ActionResult Edit(int id, int PatientId) { EHMSEntities ent = new EHMSEntities(); OperationTheatreMasterModel model = pro.GetObject(id); model.refOfOpdModel = new OpdModel(); OpdModel opdmodel = new OpdModel(); OpdProvider proopd = new OpdProvider(); opdmodel.OpdModelList = proopd.Getlist().Where(x => x.OpdID == PatientId).ToList(); foreach (var item in opdmodel.OpdModelList) { model.refOfOpdModel.FirstName = item.FirstName; model.refOfOpdModel.MiddleName = item.MiddleName; model.refOfOpdModel.LastName = item.LastName; } //model.SourceID = id; model.SourceID = PatientId; model.PersonAllocatedList = new List <PersonAllocated>(); foreach (var item in pro.GetTheatreDetailsList(id)) { PersonAllocated pa = new PersonAllocated(); pa.PersonAllocateId = item.PersonAllocatedID; pa.PersonAllocatedTypeId = item.PersonAllocatedTypeID; model.PersonAllocatedList.Add(pa); } //model.ChargeName = ent.SurgeryCharge.Where(x=>x.ChargeAmount==model.Charge).FirstOrDefault().ChargeName; return(View(model)); }
public ActionResult Main(int?PatientId) { OpdModel opdmodel = new OpdModel(); OpdProvider pro = new OpdProvider(); opdmodel.OpdModelList = pro.Getlist().Where(x => x.OpdID == PatientId).ToList(); return(View("Main", opdmodel)); }
public ActionResult SearchPatient(int srchVal, string value) { PatientTestResultModel model = new PatientTestResultModel(); //OpdModel model = new OpdModel(); OpdProvider pro = new OpdProvider(); if (srchVal == 1) { try { int patientId = Convert.ToInt16(value); string str = ""; model.OpdModelList = pro.SearchOPD(patientId, str); return(PartialView("_OpdPatientRecordsWithPatientId", model)); } catch (Exception e) { TempData["msz"] = "Please Check Patient Id"; return(PartialView("_OpdPatientRecordsWithPatientId", model)); } } if (srchVal == 5) { int age = Convert.ToInt16(value); } if (srchVal == 2) { model.OpdModelList = pro.SearchOPD(0, value); return(PartialView("_OpdPatientRecordsWithPatientId", model)); } if (srchVal == 3) { model.OpdModelList = pro.SearchOPDWithArress(value); return(PartialView("_OpdPatientRecordsWithPatientId", model)); } if (srchVal == 4) { model.OpdModelList = pro.SearchOPDWithPhone(value); return(PartialView("_OpdPatientRecordsWithPatientId", model)); } return(View()); }
public ActionResult OpdVital(int id) { OpdProvider pro = new OpdProvider(); int i = Utility.patientlogid(id); VitalForOthersModel model = new VitalForOthersModel(); model.lstOfVitalForOthersModel = pro.GetListOfVitalWithPatientId(id); model.PatinetLogId = i; model.OpdId = id; return(View(model)); }
public ActionResult EditVital(VitalForOthersModel model) { string str = ""; OpdProvider pro = new OpdProvider(); int i = pro.EditOpdVital(model); if (i != 0) { TempData["Success"] = UtilityMessage.edit; } else { TempData["Success"] = UtilityMessage.editfailed; } return(RedirectToAction("OpdVital", new { id = model.OpdId })); }
public ActionResult OpdVital(VitalForOthersModel model) { OpdProvider pro = new OpdProvider(); int i = pro.InsertOPdVital(model); if (i != 0) { TempData["Success"] = UtilityMessage.save; return(RedirectToAction("OpdVital", new { id = model.OpdId })); } else { TempData["Success"] = UtilityMessage.editfailed; return(RedirectToAction("OpdVital", new { id = model.OpdId })); } }
public ActionResult OpdVitalIndex() { OpdProvider pro = new OpdProvider(); return(View()); }