public ActionResult PatientPrivilegeCard(PatientPrivilegeCard obj, FormCollection fc) { BL_PatientPrivilegeCard _PatientPrivilegeCard = new BL_PatientPrivilegeCard(); obj.CardName = ""; obj.CardName = fc["CardName1"].ToString(); obj.PrivilegeCardID = Convert.ToInt32(fc["CardName"].ToString()); obj.PriceAmt = Convert.ToInt32(fc["Price"].ToString()); obj.PriceName = fc["PriceName1"].ToString(); obj.PrivilegePriceDetailID = fc["PrivilegePriceDetailID"].ToString(); // obj.PatientPrivilegeCardID =Convert.ToInt32(fc["PatientPrivilegeCardID"].ToString()); //obj.AmountName = fc["AccountName1"].ToString(); if (_PatientPrivilegeCard.Save(obj)) { ModelState.Clear(); TempData["msg"] = "Record Saved Successfully"; } else { ViewData["flag"] = "Error"; } return(RedirectToAction("PatientPrivilegeCard", "PatientPrivilegeCard")); // return View(); }
public JsonResult ShowPatientPrivilegeCard() { BL_PatientPrivilegeCard _PatientPrivilegeCard = new BL_PatientPrivilegeCard(); return(new JsonResult { Data = _PatientPrivilegeCard.SelectAllData(), JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public JsonResult GetPatientPrintNo_ToRegNo(string PrintRegNo) { BL_PatientPrivilegeCard BL_Reg = new BL_PatientPrivilegeCard(); string RegNo = BL_Reg.GetPatientPrintNo_ToRegNo(PrintRegNo); return(new JsonResult { Data = RegNo, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult Delete(int PatientPrivilegeCardID) { string del = ""; PatientPrivilegeCardID = Convert.ToInt32(Request.Form["PatientPrivilegeCardID"]); BL_PatientPrivilegeCard _PatientPrivilegeCard = new BL_PatientPrivilegeCard(); if (_PatientPrivilegeCard.DeletePatientPrivilegeCard(PatientPrivilegeCardID)) { del = "Delete"; } return(Json(del, JsonRequestBehavior.AllowGet)); }
public JsonResult CheckPatientReg(string PatientName) { BL_PatientPrivilegeCard blPatientPrivilegeCard = new BL_PatientPrivilegeCard(); // blPatientPrivilegeCard.CheckPatientName( PatientName); List <PatientPrivilegeCard> searchList = new List <PatientPrivilegeCard>(); string chk = ""; if (blPatientPrivilegeCard.CheckPatientName(PatientName)) { chk = "Privilege Card Already Created"; } return(new JsonResult { Data = chk, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public JsonResult FillPatient(string PatientRegNO) { BL_PatientPrivilegeCard blPatientPrivilegeCard = new BL_PatientPrivilegeCard(); DataSet ds = blPatientPrivilegeCard.CheckPatientReg(PatientRegNO); List <PatientPrivilegeCard> searchList = new List <PatientPrivilegeCard>(); string chk = ""; if (ds.Tables[0].Rows.Count > 0) { searchList.Add(new PatientPrivilegeCard { chk = "Privilege Card Already Created", }); return(new JsonResult { Data = searchList, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); } else { return(new JsonResult { Data = _PatientPrivilegeCard.FillPatient(PatientRegNO), JsonRequestBehavior = JsonRequestBehavior.AllowGet }); } }