private JmsDoctor ReadScr() { try { JmsDoctor objJmsDoctor = null; objJmsDoctor = new JmsDoctor(); objJmsDoctor.JurisID = lstJuris.JurisID; objJmsDoctor.DoctorID = KPICounter.GetCounterID(objJmsDoctor.JurisID); objJmsDoctor.DoctorName = txtDoctorName.Text; objJmsDoctor.Location = txtadrMainAddress.Text; objJmsDoctor.City = KPIHlp.CVS(custHeaderCSZ.City); objJmsDoctor.State = KPIHlp.CVS(custHeaderCSZ.State); objJmsDoctor.Zip = KPIHlp.CVS(custHeaderCSZ.Zip); objJmsDoctor.PhoneNbr = KPIHlp.CVS(cusHeaderPhone.PhoneNumber); objJmsDoctor.PhoneType = KPIHlp.CVS(cusHeaderPhone.PhoneType); objJmsDoctor.PhoneID = KPICounter.GetCounterID(objJmsDoctor.JurisID); if (chkDentist.Checked) { objJmsDoctor.IsDental = 1; } else { objJmsDoctor.IsDental = 0; } if (chkInActive.Checked) { objJmsDoctor.IsActive = 0; objJmsDoctor.InActiveDttm = KPIHlp.CVDttm(txtInActive.Text.ToString()); } else { objJmsDoctor.IsActive = 1; } return(objJmsDoctor); } catch (Exception objErr) { throw objErr; } }
public void NextScheduleDisplay(ref JMMDentistVisit objJMMDentistVisit) { DataSet dsSchedule = null; KPIEvents objKPIEvents = new KPIEvents(); KPIEventsBL objKPIEventsBL = new KPIEventsBL(); string ScreenName = "Dentist"; dsSchedule = objKPIEventsBL.GetSchedule(long.MinValue, objJMMDentistVisit.JMBookingID.Value, ScreenName); if (dsSchedule != null && dsSchedule.Tables.Count > 0 && dsSchedule.Tables[0].Rows.Count > 0) { DataRow objSchedule = dsSchedule.Tables[0].Rows[0]; dttmNewVisit.DateValue = KPIHlp.CVDttm(objSchedule["StartDttm"].ToString()); } else { clearSchedule(); } }
protected void cmdExcel() { try { DataSet objDS = GetData(true); objDS.Tables[0].Columns.Add("MedDateTime", Type.GetType("System.String")); for (int iCount = 0; iCount < objDS.Tables[0].Rows.Count; iCount++) { if (objDS.Tables[0].Rows[iCount]["ACTIVITYDTTM"].ToString() != null) { DateTime objdate = KPIHlp.CVDttm(objDS.Tables[0].Rows[iCount]["ACTIVITYDTTM"].ToString()); objDS.Tables[0].Rows[iCount]["MedDateTime"] = objdate.ToString("MM/dd/yy HH:mm"); } } ExportToExcel(ref objDS, grdMedLog.GetExcelColumns(), "MedicalLogInquiry.xls"); } catch (Exception objErr) { throw objErr; } }
protected void LoadData() { try { KPITrace.Debug(TraceWeight.Five, "Getting Prescription History info from JmmMedPresHist DB."); string sCaller = ""; NameValueCollection nvcXMLResponseData = new NameValueCollection(); NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); sCaller = nvcXMLPOSTData.Get("Caller") == null ? string.Empty : nvcXMLPOSTData.Get("Caller"); if (sCaller.Equals("RefillHist")) { string sMode, sActDttm, sBalQuan, sPresID, sRefill, sBalRefill = ""; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sActDttm = nvcXMLPOSTData.Get("ActivityDate") == null ? string.Empty : nvcXMLPOSTData.Get("ActivityDate"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); sBalQuan = nvcXMLPOSTData.Get("BalQuan") == null ? string.Empty : nvcXMLPOSTData.Get("BalQuan"); sRefill = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sBalRefill = nvcXMLPOSTData.Get("RefillBal") == null ? string.Empty : nvcXMLPOSTData.Get("RefillBal"); ///JmmMedPresHist--Adding into prescription History table JmmMedPresHist objJmmMedPresHist = new JmmMedPresHist(); JmmMedPresHistBL objJmmMedPresHistBL = new JmmMedPresHistBL(); objJmmMedPresHist.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmMedPresHist.JurisID = GetPageJuris(); objJmmMedPresHist.MedPresHistID = KPICounter.GetCounterID(objJmmMedPresHist.JurisID); objJmmMedPresHist.ActivityDttm = KPIHlp.CVDttm(sActDttm); objJmmMedPresHist.BalanceQty = KPIHlp.CVI32(sBalQuan); objJmmMedPresHist.DispenseQty = 0; objJmmMedPresHist.FillQty = KPIHlp.CVI32(sRefill); objJmmMedPresHist.IsFill = 1; objJmmMedPresHist.OfficerPFID = State.sPFID; objJmmMedPresHist.PendRefills = KPIHlp.CVI32(sBalRefill); ////Updating Prescription Table on refill. JmmMedPrescribe objMedPres = new JmmMedPrescribe(); JmmMedPrescribeBL objMedPresBL = new JmmMedPrescribeBL(); objMedPres.MedPrescribeID = KPIHlp.CVI64(sPresID); objMedPres.JurisID = GetPageJuris(); objMedPres.CurQuantity = KPIHlp.CVI32(sBalQuan); objMedPres.RefillBal = KPIHlp.CVI16(sBalRefill); if (sMode.Equals("A")) { objJmmMedPresHistBL.Insert(objJmmMedPresHist); objMedPresBL.UpdateBalance(objMedPres); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); nvcXMLResponseData.Add("PFid", objJmmMedPresHist.OfficerPFID.ToString()); } else { objJmmMedPresHistBL.Update(objJmmMedPresHist); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } else if (sCaller.Equals("PrescripUseEnd")) { string sMode, sUseEnd, sComments, sPresID = ""; int result = 0; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sUseEnd = nvcXMLPOSTData.Get("UseEnd") == null ? string.Empty : nvcXMLPOSTData.Get("UseEnd"); sComments = nvcXMLPOSTData.Get("comments") == null ? string.Empty : nvcXMLPOSTData.Get("comments"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPresc.EndedDttm = KPIHlp.CVDttm(sUseEnd); objJmmPresc.PrescribeNotes = sComments; objJmmPresc.JurisID = GetPageJuris(); if (sMode.Equals("C")) { try { result = objJmmPrescBL.UpdateUseEnd(objJmmPresc); } catch (Exception ex) { string exp = ex.Message; } if (result == 1) { nvcXMLResponseData.Add("Success", "1"); } else { nvcXMLResponseData.Add("Success", "0"); } } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } try { KPITrace.Debug(TraceWeight.Five, "Getting Doctor info from JmsDoctor DB."); string sDoctor, sCallertype = ""; string sDrug, sDosage, sPrescribedAmt, sRefills, sGenericAllowed, sNotes, sPresID, sVisitID, sBookID, sMode, sCurBalance = ""; string JurisID = string.Empty; string JMMDentVisitID = string.Empty; string RecType = string.Empty; string JMMMedVisitID = string.Empty; NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); NameValueCollection nvcXMLResponseData = new NameValueCollection(); sCallertype = nvcXMLPOSTData.Get("CallerType") == null ? string.Empty : nvcXMLPOSTData.Get("CallerType"); if (sCallertype.Equals("PrimaryDoctor")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 0; objJmsDoc = objJmsDocBL.SelectDoctor(ref objJmsDoc); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("PrimaryDentist")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 1; objJmsDoc = objJmsDocBL.SelectDentist(objJmsDoc.DoctorID); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("Prescription")) { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sVisitID = nvcXMLPOSTData.Get("VisitId") == null ? string.Empty : nvcXMLPOSTData.Get("VisitId"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sPrescribedAmt.ToString()); //need to change objJmmPresc.cMode = KPIHlp.CVC(sMode); objJmmPresc.IsPersonalProp = 0; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #region else if (sCallertype == "DentistEntryNotes") { JMMDentVisitID = nvcXMLPOSTData.Get("JMMDentVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMDentVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMDentVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion #region Medical Visit Facility Notes else if (sCallertype == "MedicalVisitNotes") { JMMMedVisitID = nvcXMLPOSTData.Get("JMMMedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMMedVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMMedVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion else { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sCurBalance = nvcXMLPOSTData.Get("CurBalance") == null ? string.Empty : nvcXMLPOSTData.Get("CurBalance"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); sVisitID = nvcXMLPOSTData.Get("MedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("MedVisitID"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sCurBalance.ToString()); //need to change if (!String.IsNullOrEmpty(sMode)) { objJmmPresc.cMode = KPIHlp.CVC(sMode); } objJmmPresc.IsPersonalProp = 1; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } }
private JMMPrescriptionSchdule ReadScr() { JMMPrescriptionSchdule objJMPrescriptionSchdule = new JMMPrescriptionSchdule(); JMMPrescriptionSchduleList objJMPrescriptionSchduleList = null; try { if (ValidateScr()) { objJMPrescriptionSchduleList = new JMMPrescriptionSchduleList(); int times = grdSchedule.Rows.Count; for (int iRowCount = 0; iRowCount < grdSchedule.Rows.Count; iRowCount++) { if (grdSchedule.IsActiveRow(iRowCount)) { objJMPrescriptionSchdule = new JMMPrescriptionSchdule(); objJMPrescriptionSchdule.JurisID = KPIHlp.CVI32(hdnJurisId.Value); DateTime StartDate = grdSchedule.GetDateTime(iRowCount, "StartDate"); DateTime FinishDate = grdSchedule.GetDateTime(iRowCount, "FinishDate"); String RepeatEvery = grdSchedule.GetString(iRowCount, "RepeatEvery"); if (KPIHlp.CVI64(grdSchedule.GetString(iRowCount, "KPIID")) > 0) { objJMPrescriptionSchdule.JMPrescriptionSchduleID = KPIHlp.CVI64(grdSchedule.GetString(iRowCount, "KPIID")); objJMPrescriptionSchdule.cMode = grdSchedule.GetChar(iRowCount, "KPIMode"); } else { objJMPrescriptionSchdule.JMPrescriptionSchduleID = KPICounter.GetCounterID(objJMPrescriptionSchdule.JurisID.Value); if (grdSchedule.GetChar(iRowCount, "KPIMode").Equals('D')) { objJMPrescriptionSchdule.cMode = grdSchedule.GetChar(iRowCount, "KPIMode"); } else { objJMPrescriptionSchdule.cMode = 'A'; } } objJMPrescriptionSchdule.IsActive = 0; objJMPrescriptionSchdule.JMMedPrescriptionID = grdSchedule.GetLong(iRowCount, "JMMedPrescriptionID"); objJMPrescriptionSchdule.JMBookingID = grdSchedule.GetLong(iRowCount, "JMBookingID"); objJMPrescriptionSchdule.Dispense = grdSchedule.GetInt(iRowCount, "Dispense"); objJMPrescriptionSchdule.DistributionPeriod = grdSchedule.GetString(iRowCount, "DistributionPeriod"); if (grdSchedule.GetDateTime(iRowCount, "Startdttm") != DateTime.MinValue) { objJMPrescriptionSchdule.StartTime = grdSchedule.GetDateTime(iRowCount, "Startdttm"); } if (grdSchedule.GetDateTime(iRowCount, "Enddttm") != DateTime.MinValue) { objJMPrescriptionSchdule.EndTime = grdSchedule.GetDateTime(iRowCount, "Enddttm"); } if (objJMPrescriptionSchdule.cMode.Equals('D')) { times--; objJMPrescriptionSchdule.IsActive = 2; objJMPrescriptionSchdule.StartTime = grdSchedule.GetDateTime(iRowCount, "PeriodStartTime"); objJMPrescriptionSchdule.EndTime = grdSchedule.GetDateTime(iRowCount, "PeriodEndTime"); if (StartDate != DateTime.MinValue) { objJMPrescriptionSchdule.StartDttm = KPIHlp.CVDttm(grdSchedule.GetDateTime(iRowCount, "StartDate").ToString("MM/dd/yyyy") + " " + grdSchedule.GetDateTime(iRowCount, "PeriodStartTime").ToString("HH:mm:ss")); } if (FinishDate != DateTime.MinValue) { objJMPrescriptionSchdule.EndDttm = KPIHlp.CVDttm(grdSchedule.GetDateTime(iRowCount, "FinishDate").ToString("MM/dd/yyyy") + " " + grdSchedule.GetDateTime(iRowCount, "PeriodEndTime").ToString("HH:mm:ss")); } } else { if (StartDate != DateTime.MinValue) { objJMPrescriptionSchdule.StartDttm = KPIHlp.CVDttm(grdSchedule.GetDateTime(iRowCount, "StartDate").ToString("MM/dd/yyyy") + " " + grdSchedule.GetDateTime(iRowCount, "Startdttm").ToString("HH:mm:ss")); } if (FinishDate != DateTime.MinValue) { objJMPrescriptionSchdule.EndDttm = KPIHlp.CVDttm(grdSchedule.GetDateTime(iRowCount, "FinishDate").ToString("MM/dd/yyyy") + " " + grdSchedule.GetDateTime(iRowCount, "Enddttm").ToString("HH:mm:ss")); } } if (!String.IsNullOrWhiteSpace(RepeatEvery)) { objJMPrescriptionSchdule.RepeatEvery = RepeatEvery; } objJMPrescriptionSchdule.Instructions = grdSchedule.GetString(iRowCount, "Instructions"); objJMPrescriptionSchduleList.Add(objJMPrescriptionSchdule); } } objJMPrescriptionSchdule.Times = times; objJMPrescriptionSchdule.objJMMPrescriptionSchduleList = objJMPrescriptionSchduleList; } } catch (Exception objError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError); } return(objJMPrescriptionSchdule); }