public LifeStyleDetails GetLifeStyleDetails(string CPno) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@flag", 2); sqlparam[1] = new SqlParameter("@CPno", CPno); DataTable ds = CommonFunction.GetDataTable("USP_Get_Precription", sqlparam, ""); LifeStyleDetails Ob = new LifeStyleDetails(); List <LifeStyleDetails> lst = new List <LifeStyleDetails>(); if (ds != null && ds.Rows.Count > 0) { DataTable dt = ds; foreach (DataRow dr in dt.Rows) { LifeStyleDetails Model = new LifeStyleDetails(); CommonFunction.ReflectSingleData(Ob, dr); lst.Add(Model); } } Ob.lst = lst; return(Ob); } catch (Exception Ex) { throw Ex; } }
public ActionResult PatientLifeStyleDetails() { PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"]; LifeStyleDetails Ls = new LifeStyleDetails(); //Load lime always null not requird get data Ls = BM.GetLifeStyleDetails(patientDETAILS.CasePapaerNo); if (Ls.Diat != null) { Ls.Diat = Ls.Diat.Trim(); } if (Ls.Alcohol != null) { Ls.Alcohol = Ls.Alcohol.Trim(); } if (Ls.Bladder != null) { Ls.Bladder = Ls.Bladder.Trim(); } if (Ls.Bowel != null) { Ls.Bowel = Ls.Bowel.Trim(); } if (Ls.Sleep != null) { Ls.Sleep = Ls.Sleep.Trim(); } if (Ls.Smoting != null) { Ls.Smoting = Ls.Smoting.Trim(); } return(View("LifeStyle", Ls)); }
public ActionResult ManageLifeStyleDetails(LifeStyleDetails LD) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"]; ModelState.Clear(); LD.HospitalId = patientDETAILS.HospitalId.ToString(); LD.CreatedBy = admObj.UserId; LD.PatientId = patientDETAILS.Id; LD.CasePaperNo = patientDETAILS.CasePapaerNo; //Ob.CasePaperNo = int Flag = BM.ManageLifeStyleDetails(LD); return(RedirectToAction("PatientLifeStyleDetails", "MyOPD")); }
public int ManageLifeStyleDetails(LifeStyleDetails LD) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[11]; sqlparam[0] = new SqlParameter("@Id", LD.Id); sqlparam[1] = new SqlParameter("@Diat", LD.Diat); sqlparam[2] = new SqlParameter("@Smoting", LD.Smoting); sqlparam[3] = new SqlParameter("@Alcohol", LD.Alcohol); sqlparam[4] = new SqlParameter("@Bowel", LD.Bowel); sqlparam[5] = new SqlParameter("@Bladder", LD.Bladder); sqlparam[6] = new SqlParameter("@Sleep", LD.Sleep); sqlparam[7] = new SqlParameter("@CasePaperNo", LD.CasePaperNo); sqlparam[8] = new SqlParameter("@HospitalId", LD.HospitalId); sqlparam[9] = new SqlParameter("@PatientId", LD.PatientId); sqlparam[10] = new SqlParameter("@CreatedBy", LD.CreatedBy); return(CommonFunction.Save("[USP_PD_LifeStyleDetails]", sqlparam, "")); } catch (Exception) { throw; } }
public int ManageLifeStyleDetails(LifeStyleDetails LD) { return DM.ManageLifeStyleDetails(LD); }