public static DateTime SystemDate() { IIQCareSystem SystemManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = SystemManager.SystemDate(); SystemManager = null; return(theCurrentDate); }
/// <summary> /// Fields the validation. /// </summary> /// <param name="labtobedone">The labtobedone.</param> /// <param name="orderbydate">The orderbydate.</param> /// <param name="orderby">The orderby.</param> /// <param name="appcurrentdate">The appcurrentdate.</param> /// <returns></returns> private Boolean FieldValidation(string labtobedone, string orderbydate, string orderby, string appcurrentdate) { IIQCareSystem _iqcareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime _theCurrentDate = (DateTime)_iqcareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); Page page = HttpContext.Current.Handler as Page; if (orderby == "0") { MsgBuilder theMsg = new MsgBuilder(); theMsg.DataElements["Control"] = "Ordered By"; IQCareMsgBox.Show("BlankDropDown", theMsg, page); return(false); } else if (orderbydate == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Ordered By Date"; IQCareMsgBox.Show("BlankTextBox", theBuilder, page); return(false); } else if (Convert.ToDateTime(orderbydate) > Convert.ToDateTime(appcurrentdate)) { IQCareMsgBox.Show("OrderedToDate", page); return(false); } //---------- if (labtobedone != "") { DateTime _theVisitDate = Convert.ToDateTime(theUtils.MakeDate(labtobedone)); if (HttpContext.Current.Session["IEVisitDate"] != null) //ViewState["IEVisitDate"] != null) { DateTime _theIEVisitDate = Convert.ToDateTime(HttpContext.Current.Session["IEVisitDate"].ToString()); //Convert.ToDateTime(ViewState["IEVisitDate"].ToString()); if (_theIEVisitDate > _theVisitDate) { IQCareMsgBox.Show("CompareLabTobeDoneDate", page); return(false); } } } return(true); }
/// <summary> /// Generates the cache. /// </summary> /// <param name="StateInfo">The state information.</param> public static void GenerateCache(object StateInfo) { try { string xmlPath = GblIQCare.GetXMLPath(); IIQCareSystem DateManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theDTime = DateManager.SystemDate(); System.IO.FileInfo theFileInfo1 = new System.IO.FileInfo(xmlPath + "\\AllMasters.con"); System.IO.FileInfo theFileInfo2 = new System.IO.FileInfo(xmlPath + "\\DrugMasters.con"); System.IO.FileInfo theFileInfo3 = new System.IO.FileInfo(xmlPath + "\\LabMasters.con"); if (theFileInfo1.LastWriteTime.Date != theDTime.Date || theFileInfo2.LastWriteTime.Date != theDTime.Date || theFileInfo3.LastWriteTime.Date != theDTime.Date) { IIQCareSystem theCacheManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security"); DataSet theMainDS = theCacheManager.GetSystemCache(); IQCareUtils.WriteCache(ref theMainDS, theDTime); } } catch { } }
private Boolean FieldValidation() { IIQCareSystem IQCareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = (DateTime)IQCareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); if (TxtFirstName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "First Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtFirstName.Focus(); return(false); } if (TxtLastName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Last Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtLastName.Focus(); return(false); } if (TxtAdmissionNo.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Last Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); return(false); } if (TxtRegistrationDate.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Registration Date"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtRegistrationDate.Focus(); return(false); } DateTime theEnrolDate = Convert.ToDateTime(theUtils.MakeDate(TxtRegistrationDate.Text)); if (theEnrolDate > theCurrentDate) { IQCareMsgBox.Show("EnrolDate", this); TxtRegistrationDate.Focus(); return(false); } if (DDGender.SelectedValue == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Sex"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); DDGender.Focus(); return(false); } if (TxtDOB.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "DOB"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDOB.Focus(); return(false); } DateTime theDOBDate = Convert.ToDateTime(theUtils.MakeDate(TxtDOB.Text)); if (theDOBDate > theCurrentDate) { IQCareMsgBox.Show("DOBDate", this); TxtDOB.Focus(); return(false); } if (theDOBDate > theEnrolDate) { IQCareMsgBox.Show("DOB_EnrolDate", this); return(false); } return(true); }
private Boolean FieldValidation() { IIQCareSystem IQCareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = (DateTime)IQCareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); if (DDFinalResult.SelectedItem.Value == "9") { spDeath.Visible = true; } if (TxtFirstName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "First Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtFirstName.Focus(); return(false); } if (TxtLastName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Last Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtLastName.Focus(); return(false); } if (TxtInfantId.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Infant ID"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtInfantId.Focus(); return(false); } try { int i = Convert.ToInt32(TxtInfantId.Text); } catch { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Infant ID"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDateOfBirth.Focus(); return(false); } if (TxtDateOfBirth.Value.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "DOB"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDateOfBirth.Focus(); return(false); } DateTime theDOBDate = Convert.ToDateTime(theUtils.MakeDate(TxtDateOfBirth.Value)); if (theDOBDate > theCurrentDate) { IQCareMsgBox.Show("DOBDate", this); TxtDateOfBirth.Focus(); return(false); } if (TxtDeathDate.Text != "") { spDeath.Visible = true; DateTime theDeathDate = Convert.ToDateTime(theUtils.MakeDate(TxtDeathDate.Text)); if (theDeathDate > theCurrentDate) { IQCareMsgBox.Show("DeathDateCheck", this); TxtDeathDate.Focus(); return(false); } if (theDeathDate < theDOBDate) { IQCareMsgBox.Show("DeathDOBDate", this); TxtDeathDate.Focus(); return(false); } } //if (DDInfantFeedingPractice.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantFeed", this); // DDInfantFeedingPractice.Focus(); // return false; //} //if (DDHIVTestType.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantHivTestType", this); // DDHIVTestType.Focus(); // return false; //} //if (DDResult.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantResult", this); // DDResult.Focus(); // return false; //} //if (DDFinalResult.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantFinalResult", this); // DDFinalResult.Focus(); // return false; //} return(true); }
private Boolean FieldValidation() { IIQCareSystem IQCareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = (DateTime)IQCareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); if (TxtFirstName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "First Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtFirstName.Focus(); return(false); } if (TxtLastName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Last Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtLastName.Focus(); return(false); } if (TxtRegistrationDate.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Registration Date"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtRegistrationDate.Focus(); return(false); } DateTime theEnrolDate = Convert.ToDateTime(theUtils.MakeDate(TxtRegistrationDate.Text)); if (theEnrolDate > theCurrentDate) { IQCareMsgBox.Show("EnrolDate", this); TxtRegistrationDate.Focus(); return(false); } if (DDGender.SelectedValue == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Sex"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); DDGender.Focus(); return(false); } if (TxtDOB.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "DOB"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDOB.Focus(); return(false); } DateTime theDOBDate = Convert.ToDateTime(theUtils.MakeDate(TxtDOB.Text)); if (theDOBDate > theCurrentDate) { IQCareMsgBox.Show("DOBDate", this); TxtDOB.Focus(); return(false); } if (theDOBDate > theEnrolDate) { IQCareMsgBox.Show("DOB_EnrolDate", this); return(false); } /////17-09-09 //if (chkTransferIn.Checked == true && ddReferredFrom.SelectedIndex != 0) //{ // // //MsgBuilder theBuilder = new MsgBuilder(); // // theBuilder.DataElements["Control"] = "RefFrom"; // //// IQCareMsgBox.Show("BlankDropDown", theBuilder, this); // return false; // } ////17-09-09 if (chkTransferIn.Checked == false && ddReferredFrom.SelectedIndex != 0) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Either Tranfer in/Referred From"; IQCareMsgBox.Show("BlankDropDown", theBuilder, this); return(false); } if (chkTransferIn.Checked == true && ddReferredFrom.SelectedIndex == 0) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Either Tranfer in/Referred From"; IQCareMsgBox.Show("BlankDropDown", theBuilder, this); return(false); } if (TxtANCNumber.Text == "" && TxtPMTCTNumber.Text == "" && TxtAdmissionNumber.Text == "" && TxtOutPatientNumber.Text == "") { IQCareMsgBox.Show("PMTCTEnrol_ANC", this); return(false); } IPatientRegistration ValMgrPMTCT = (IPatientRegistration)ObjectFactory.CreateInstance(ObjFactoryParameter); string msg = ""; if (TxtANCNumber.Text != "") { DataTable theDT = ValMgrPMTCT.Validate(TxtANCNumber.Text, "ANC"); if (theDT.Rows.Count > 0) { //if (Request.QueryString["Name"] == "Edit") if (Convert.ToInt32(Session["PatientId"]) > 0) //i.e. update mode { if (theDT.Rows[0]["IDNumber"].ToString() != Convert.ToString(ViewState["ANC"])) { msg = "ANC" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } else { msg = "ANC" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } } if (TxtPMTCTNumber.Text != "") { DataTable theDT = ValMgrPMTCT.Validate(TxtPMTCTNumber.Text, "PMTCT"); if (theDT.Rows.Count > 0) { //if (Request.QueryString["Name"] == "Edit") //if (Request.QueryString["Name"] != "Add") //i.e. edit mode if (Convert.ToInt32(Session["PatientId"]) > 0) { if (theDT.Rows[0]["IDNumber"].ToString() != ViewState["PMTCT"].ToString()) { msg = "PMTCT" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } else { msg = "PMTCT" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } } if (TxtAdmissionNumber.Text != "") { DataTable theDT = ValMgrPMTCT.Validate(TxtAdmissionNumber.Text, "Admission"); if (theDT.Rows.Count > 0) { //if (Request.QueryString["Name"] == "Edit") //if (Request.QueryString["Name"] != "Add") //i.e. edit mode if (Convert.ToInt32(Session["PatientId"]) > 0) { if (theDT.Rows[0]["IDNumber"].ToString() != ViewState["Admission"].ToString()) { msg = "Admission" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } else { msg = "Admission" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } } if (TxtOutPatientNumber.Text != "") { DataTable theDT = ValMgrPMTCT.Validate(TxtOutPatientNumber.Text, "Outpatient"); if (theDT.Rows.Count > 0) { //if (Request.QueryString["Name"] == "Edit") //if (Request.QueryString["Name"] != "Add") //i.e. edit mode if (Convert.ToInt32(Session["PatientId"]) > 0) { if (theDT.Rows[0]["IDNumber"].ToString() != ViewState["Outpatient"].ToString()) { msg = "OutpatientNumber" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } else { msg = "OutpatientNumber" + "' '" + IQCareMsgBox.GetMessage("PMTCTDuplicate", this); MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = msg; IQCareMsgBox.Show("#C1", theBuilder, this); return(false); } } } return(true); }
private int ImportExportDBUpdates(DataSet dsCollectDataToSave, bool isUpdate, bool isVersionUpdate, IImportExportForms objImportFormDetails) { if (dsCollectDataToSave.Tables.Count < 0) { return(-1); } IIQCareSystem objIIQCareSystem = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security"); int iRes = 0; decimal vernumber = Convert.ToDecimal(dsCollectDataToSave.Tables[15].Rows[0]["VersionName"]); DataSet DSFormVerTables = new DataSet(); dtmstformversion = clsCommon.CreateMstVersionTable(); DataRow drfrmver = dtmstformversion.NewRow(); String dtchng; if (dsCollectDataToSave.Tables[15].Rows[0]["VersionDate"] != null) { dtchng = DateTime.Parse(dsCollectDataToSave.Tables[15].Rows[0]["VersionDate"].ToString()).ToString("dd-MMM-yyyy"); } else { dtchng = objIIQCareSystem.SystemDate().ToString("dd-MMM-yyyy"); } drfrmver["VerId"] = 0; drfrmver["VersionDate"] = dtchng.ToString(); drfrmver["UserId"] = GblIQCare.AppUserId; //version will not update if same form is imported if (isUpdate && !isVersionUpdate) { drfrmver["VersionName"] = vernumber.ToString(); } else if (!isUpdate && isVersionUpdate) { //increment version if any changes found on form vernumber = vernumber + Convert.ToDecimal(0.1); dtchng = DateTime.Parse(dsCollectDataToSave.Tables[15].Rows[0]["VersionDate"].ToString()).ToString("dd-MMM-yyyy"); drfrmver["VersionName"] = vernumber.ToString(); dtmstformversion = clsCommon.CreateMstVersionTable(); dtTabchanges = clsCommon.ManageVersionTab(); dtSectionchanges = clsCommon.ManageVersionSection(); dtFieldChanges = clsCommon.ManageVersionField(); dtConFieldchanges = clsCommon.ManageVersionConField(); } else { //dtchng = objIIQCareSystem.SystemDate(); drfrmver["VersionDate"] = dtchng.ToString(); drfrmver["VersionName"] = vernumber.ToString(); dtTabchanges = clsCommon.ManageVersionTab(); dtSectionchanges = clsCommon.ManageVersionSection(); dtFieldChanges = clsCommon.ManageVersionField(); dtConFieldchanges = clsCommon.ManageVersionConField(); } dtmstformversion.Rows.Add(drfrmver); DSFormVerTables.Tables.Add(dtmstformversion); DSFormVerTables.Tables.Add(dtTabchanges); DSFormVerTables.Tables.Add(dtSectionchanges); DSFormVerTables.Tables.Add(dtFieldChanges); DSFormVerTables.Tables.Add(dtConFieldchanges); iRes = objImportFormDetails.ImportForms(dsCollectDataToSave, GblIQCare.AppUserId, System.Convert.ToInt32(GblIQCare.AppCountryId), DSFormVerTables, GblIQCare.AppLocationId); return(iRes); }
private Boolean FieldValidation() { IIQCareSystem IQCareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = (DateTime)IQCareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); if (DDFinalResult.SelectedItem.Value == "9") { spDeath.Visible = true; } if (TxtFirstName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "First Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtFirstName.Focus(); return(false); } if (TxtLastName.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Last Name"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtLastName.Focus(); return(false); } if (TxtInfantId.Text.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Infant ID"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtInfantId.Focus(); return(false); } try { Int64 i = Convert.ToInt64(TxtInfantId.Text); } catch { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Infant ID"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDateOfBirth.Focus(); return(false); } if (TxtDateOfBirth.Value.Trim() == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "DOB"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); TxtDateOfBirth.Focus(); return(false); } DateTime theDOBDate = Convert.ToDateTime(theUtils.MakeDate(TxtDateOfBirth.Value)); if (theDOBDate > theCurrentDate) { IQCareMsgBox.Show("DOBDate", this); TxtDateOfBirth.Focus(); return(false); } int Age = GetAge(theDOBDate); if (TxtDateOfBirth.Value != "") { Decimal AgeinYear = Math.Round(Convert.ToDecimal(Session["PatientAge"]), 0); if (Convert.ToDecimal(Age) >= AgeinYear) { //ScriptManager.RegisterStartupScript(this, GetType(), "PatientAge", "alert('Infant Age cannot be more than Parent Age');", true); MsgBuilder theMsg = new MsgBuilder(); theMsg.DataElements["Control"] = "Infant Age cannot be more than Parent Age"; IQCareMsgBox.Show("PatientAge", theMsg, this); TxtDateOfBirth.Focus(); return(false); } } if (TxtDeathDate.Value != "") { spDeath.Visible = true; DateTime theDeathDate = Convert.ToDateTime(theUtils.MakeDate(TxtDeathDate.Value)); if (theDeathDate > theCurrentDate) { IQCareMsgBox.Show("DeathDateCheck", this); TxtDeathDate.Focus(); return(false); } if (theDeathDate < theDOBDate) { IQCareMsgBox.Show("DeathDOBDate", this); TxtDeathDate.Focus(); return(false); } } //if (DDInfantFeedingPractice.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantFeed", this); // DDInfantFeedingPractice.Focus(); // return false; //} //if (DDHIVTestType.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantHivTestType", this); // DDHIVTestType.Focus(); // return false; //} //if (DDResult.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantResult", this); // DDResult.Focus(); // return false; //} //if (DDFinalResult.SelectedItem.Value.Trim() == "0") //{ // IQCareMsgBox.Show("InfantFinalResult", this); // DDFinalResult.Focus(); // return false; //} return(true); }
/// <summary> /// Generates the cache. /// </summary> /// <param name="StateInfo">The state information.</param> public static void GenerateCache(object StateInfo) { string xmlPath = GblIQCare.GetXMLPath(); IIQCareSystem DateManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theDTime = DateManager.SystemDate(); try { IIQCareSystem theCacheManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security"); DataSet theMainDS = theCacheManager.GetSystemCache(); DataSet WriteXMLDS = new DataSet(); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_CouncellingType"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_CouncellingTopic"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Provider"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Division"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Ward"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_District"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Reason"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Education"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Designation"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Employee"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Occupation"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Province"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Village"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Code"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_HIVAIDSCareTypes"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ARTSponsor"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_HivDisease"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Assessment"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Symptom"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Decode"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Feature"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Function"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_HivDisclosure"].Copy()); //WriteXMLDS.Tables.Add(theMainDS.Tables["mst_Satellite"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_LPTF"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["mst_StoppedReason"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["mst_facility"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_HIVCareStatus"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_RelationshipType"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_TBStatus"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ARVStatus"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_LostFollowreason"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Regimen"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Store"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Supplier"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["mst_Donor"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Program"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Batch"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["VWDiseaseSymptom"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["mst_RegimenLine"].Copy()); if (theMainDS.Tables.Contains("Users")) { WriteXMLDS.Tables.Add(theMainDS.Tables["Users"].Copy()); } WriteXMLDS.WriteXml(xmlPath + "\\AllMasters.con", XmlWriteMode.WriteSchema); WriteXMLDS.Tables.Clear(); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Strength"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_FrequencyUnits"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Drug"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Generic"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_DrugType"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Frequency"].Copy()); WriteXMLDS.WriteXml(xmlPath + "\\DrugMasters.con", XmlWriteMode.WriteSchema); WriteXMLDS.Tables.Clear(); WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_LabTest"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Lnk_TestParameter"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Lnk_LabValue"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["Lnk_ParameterResult"].Copy()); WriteXMLDS.Tables.Add(theMainDS.Tables["LabTestOrder"].Copy()); WriteXMLDS.WriteXml(xmlPath + "\\LabMasters.con", XmlWriteMode.WriteSchema); // IQCareUtils.WriteCache(ref theMainDS, theDTime.AddDays(-1)); } catch { } }