public IpdSearchResults()
 {
     ObjIpdMRCommonTestModel         = new IpdMRCommonTestModel();
     IpdMRCommontestList             = new List <IpdMRCommonTestModel>();
     ObjIpdMRMainTestModel           = new IpdMrMainTestModel();
     IpdMrMainTestList               = new List <IpdMrMainTestModel>();
     ObjIpdMRMedicalRecord           = new IpdMrMedicineRecord();
     IpdMedecalRecordList            = new List <IpdMedicalRecord>();
     IpdRegistrationMasterModelList  = new List <IpdRegistrationMasterModel>();
     IpdDischargeModelList           = new List <IpdDischargeModel>();
     ObjDischargeModel               = new IpdDischargeModel();
     OperationTheatreMasterModelList = new List <OperationTheatreMasterModel>();
     ObjOperationTheatreMasterModel  = new OperationTheatreMasterModel();
 }
        public int UpdateIpdDischargeDetails(IpdDischargeModel model)
        {
            int i = 0;

            EHMSEntities ent       = new EHMSEntities();
            var          edit2save = ent.IpdDischarges.Where(x => x.IpdDischargeID == model.IpdDischargeID).SingleOrDefault();

            edit2save.BriefHistory      = model.BriefHistory;
            edit2save.ClinicalFindings  = model.ClinicalFindings;
            edit2save.Investigation     = model.Investigation;
            edit2save.Medicinetreatment = model.Medicinetreatment;
            edit2save.FurtherTreatment  = model.FurtherTreatment;
            edit2save.FoloowUp          = model.FoloowUp;
            ent.Entry(edit2save).State  = System.Data.EntityState.Modified;
            i = ent.SaveChanges();
            return(i);
        }