Esempio n. 1
0
        public static DateTime SystemDate()
        {
            IIQCareSystem SystemManager  = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
            DateTime      theCurrentDate = SystemManager.SystemDate();

            SystemManager = null;
            return(theCurrentDate);
        }
    private void FillSystemDropdown()
    {
        BindFunctions theBindManager = new BindFunctions();
        IIQCareSystem SystemManager  = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
        DataTable     theDT          = SystemManager.GetIQCareSystems(0);

        theBindManager.BindCombo(cmbSystem, theDT, "SystemName", "SystemId");
    }
Esempio n. 3
0
        public PatientRegistrationForm()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            IIQCareSystem appManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");

            PatientInfo.ConnectionString = appManager.GetEMRConnectionString();
            pbLogo.Value = "logo.png";
        }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         IIQCareSystem ReportingTables = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security");
         ReportingTables.RefreshReportingTables(1);
         Response.Redirect("frmFacilityHome.aspx");
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareMsgBox.Show("#C1", theBuilder, this);
     }
 }
        /// <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);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            IIQCareSystem appManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");

            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            System.Collections.Hashtable deviceInfo   = new System.Collections.Hashtable();
            TypeReportSource             reportSource = new TypeReportSource();

            reportSource.TypeName = typeof(PatientSummary).AssemblyQualifiedName;
            ReportSource myrep = reportSource;

            myrep.Parameters.Add(new Telerik.Reporting.Parameter("patientpk", Session["PatientId"].ToString()));
            myrep.Parameters.Add(new Telerik.Reporting.Parameter("logopath", "\\logo.png"));

            reportViewer1.ReportSource          = reportSource;
            reportViewer1.ParametersAreaVisible = false;
            this.reportViewer1.RefreshReport();
        }
Esempio n. 7
0
 /// <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 { }
 }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["AppLocation"] == null || Session.Count == 0 || Session["AppUserID"].ToString() == "")
     {
         IQCareMsgBox.Show("SessionExpired", this);
         Response.Redirect("~/frmlogin.aspx", true);
     }
     try
     {
         IIQCareSystem ReportingTables = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security");
         ReportingTables.RefreshReportingTables(1);
         Response.Redirect("frmFacilityHome.aspx");
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareMsgBox.Show("#C1", theBuilder, this);
     }
 }
Esempio n. 9
0
        public PatientSummary()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            IIQCareSystem appManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
            string        sconstring = appManager.GetEMRConnectionString().ToLower().Replace("initial catalog = iqcare", "initial catalog = iqtools");

            VLs.ConnectionString            = sconstring;
            ARTInfo.ConnectionString        = sconstring;
            CD4.ConnectionString            = sconstring;
            ClinicalNotes.ConnectionString  = sconstring;
            PatientDetails.ConnectionString = sconstring;

            pbLogo.Value = "logo.png";
        }
 protected void btnSystemSave_Click(object sender, EventArgs e)
 {
     try
     {
         Session["SystemId"] = ConfigurationManager.AppSettings["SystemId"].ToString();
         IIQCareSystem SystemManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
         if (cmbSystem.SelectedValue == "2")
         {
             DataTable theDT = SystemManager.GetIQCareSystems(1);
         }
         tblSystem.Visible = false;
         btnAdd.Enabled    = true;
         Init_Form();
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareMsgBox.Show("#C1", theBuilder, this);
         return;
     }
 }
Esempio n. 11
0
        private static void GenerateCacheImpl(string path)
        {
            string allMaster  = path + "AllMasters.con";
            string drugMaster = path + "DrugMasters.con";
            string labMaster  = path + "LabMasters.con";
            string frequency  = path + "Frequency.xml";

            System.IO.FileInfo theFileInfo1 = new System.IO.FileInfo(allMaster);
            System.IO.FileInfo theFileInfo2 = new System.IO.FileInfo(drugMaster);
            System.IO.FileInfo theFileInfo3 = new System.IO.FileInfo(labMaster);
            System.IO.FileInfo theFileInfo4 = new System.IO.FileInfo(frequency);

            theFileInfo1.Delete();
            theFileInfo2.Delete();
            theFileInfo3.Delete();
            theFileInfo4.Delete();
            IIQCareSystem theCacheManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security");
            DataSet       theMainDS       = theCacheManager.GetSystemCache();
            DataSet       WriteXMLDS      = new DataSet();

            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Provider"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Ward"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Division"].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_CouncellingType"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_CouncellingTopic"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ReferredFrom"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_pmtctDeCode"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Module"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModDecode"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ARVSideEffects"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModCode"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Country"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Town"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["VWDiseaseSymptom"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["VW_ICDList"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["mst_RegimenLine"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["mst_Store"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["mst_BlueCode"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["mst_BlueDecode"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_FormBuilderTab"].Copy());
            WriteXMLDS.Tables.Add(theMainDS.Tables["VW_UserDesignationTransaction"].Copy());
            WriteXMLDS.WriteXml(allMaster, 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.Tables.Add(theMainDS.Tables["Mst_DrugSchedule"].Copy());
            WriteXMLDS.WriteXml(drugMaster, 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.Tables.Add(theMainDS.Tables["mst_PatientLabPeriod"].Copy());
            WriteXMLDS.WriteXml(labMaster, XmlWriteMode.WriteSchema);

            WriteXMLDS.Tables.Clear();
            WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Frequency"].Copy());
            WriteXMLDS.WriteXml(frequency, XmlWriteMode.WriteSchema);
        }
Esempio n. 12
0
    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);
    }
Esempio n. 13
0
        private void mnuRefereshSystemCache_Click(object sender, EventArgs e)
        {
            string strGetXMLPath = GblIQCare.GetXMLPath();

            System.IO.FileInfo theFileInfo1 = new System.IO.FileInfo(strGetXMLPath + "\\AllMasters.con");
            System.IO.FileInfo theFileInfo2 = new System.IO.FileInfo(strGetXMLPath + "\\DrugMasters.con");
            System.IO.FileInfo theFileInfo3 = new System.IO.FileInfo(strGetXMLPath + "\\LabMasters.con");

            theFileInfo1.Delete();
            theFileInfo2.Delete();
            theFileInfo3.Delete();

            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());
            WriteXMLDS.WriteXml(strGetXMLPath + "\\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(strGetXMLPath + "\\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(strGetXMLPath + "\\LabMasters.con", XmlWriteMode.WriteSchema);
            IQCareWindowMsgBox.ShowWindow("SysCacheRefresh", this);
        }
    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);
    }
Esempio n. 15
0
        /// <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 { }
        }
Esempio n. 16
0
        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);
        }
Esempio n. 17
0
    private void GetApplicationParameters()
    {
        try
        {
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: GetApplicationParameters() begin!");
            IUser ApplicationManager;
            ApplicationManager = (IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser, BusinessProcess.Security");
            DataSet   theDS = ApplicationManager.GetFacilitySettings(1);
            DataTable theDT = theDS.Tables[0];

            if (theDT.Rows.Count < 1)
            {
                string theUrl = string.Format("{0}", "./AdminForms/frmAdmin_FacilityList.aspx?BS=true");
                Response.Redirect(theUrl);
            }
            if (!string.IsNullOrEmpty(theDT.Rows[0]["Image"].ToString()))
            {
                imgLogin.ImageUrl = string.Format("images/{0}", theDT.Rows[0]["Image"].ToString());
            }
            else
            {
                imgLogin.ImageUrl = "~/Images/Login.jpg";
            }
            Session["SystemId"] = Convert.ToInt32(theDT.Rows[0]["SystemId"]);
            #region "Version Control"

            //Run upgrade scripts here
            //--------------------------------------------------------------------------------------------------------------------
            if (theDS.Tables[1].Rows[0]["AppVer"].ToString() != AuthenticationManager.AppVersion || ((DateTime)theDS.Tables[1].Rows[0]["RelDate"]).ToString("dd-MMM-yyyy") != AuthenticationManager.ReleaseDate)
            {
                IIQCareSystem appManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");

                string scriptDirectory = @"C:\inetpub\wwwroot\IQCare\scripts\";
                string dbversion       = theDS.Tables[1].Rows[0]["AppVer"].ToString();

                int iDBVersion  = Convert.ToInt16(dbversion.Replace(".", ""));
                int iAppversion = Convert.ToInt16(AuthenticationManager.AppVersion.Replace(".", ""));

                DirectoryInfo di      = new DirectoryInfo(scriptDirectory);
                FileInfo[]    rgFiles = di.GetFiles("*.sql");

                foreach (FileInfo fi in rgFiles)
                {
                    int iScriptVersion = Convert.ToInt16(fi.Name.Replace(".sql", "").Replace(".", ""));

                    if (iScriptVersion > iDBVersion)
                    {
                        FileInfo fileInfo = new FileInfo(fi.FullName);
                        string   script   = fileInfo.OpenText().ReadToEnd();
                        appManager.ExecuteBatchNonQuery(script);
                    }
                }

                theDS = ApplicationManager.GetFacilitySettings(1);
            }
            //--------------------------------------------------------------------------------------------------------------------

            //Check if DB has been upgraded to latest version
            if (theDS.Tables[1].Rows[0]["AppVer"].ToString() != AuthenticationManager.AppVersion || ((DateTime)theDS.Tables[1].Rows[0]["RelDate"]).ToString("dd-MMM-yyyy") != AuthenticationManager.ReleaseDate)
            {
                string script = "<script language = 'javascript' defer ='defer' id = 'confirm'>\n";
                script += "var ans=true;\n";
                script += "alert('You are using a Wrong Version of Application. Please contact Support staff.');\n";
                script += "if (ans==true)\n";
                script += "{\n";
                script += "window.close() - y;\n";
                script += "}\n";
                script += "</script>\n";
                RegisterStartupScript("confirm", script);
                btnLogin.Enabled = false;
            }
            #endregion

            ApplicationManager = null;
            IIQCareSystem DateManager;
            DateManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
            DateTime theDTime = DateManager.SystemDate();

            ViewState["theCurrentDate"] = theDTime;
            lblDate.Text = theDTime.ToString("dd-MMM-yyyy");
            Application["AppCurrentDate"]  = theDTime.ToString("dd-MMM-yyyy");
            Session["AppCurrentDateClass"] = theDTime.ToString("dd-MMM-yyyy");
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: GetApplicationParameters() end!");
        }
        catch (Exception ex)
        {
            CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: GetApplicationParameters() ", ex);
        }
    }
Esempio n. 18
0
        private void GenerateCache()
        {
            IIQCareSystem DateManager;

            DateManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
            DateTime theDTime = DateManager.SystemDate();

            System.IO.FileInfo theFileInfo1 = new System.IO.FileInfo(Server.MapPath(@"~\XMLFiles\AllMasters.con").ToString());
            System.IO.FileInfo theFileInfo2 = new System.IO.FileInfo(Server.MapPath(@"~\XMLFiles\DrugMasters.con").ToString());
            System.IO.FileInfo theFileInfo3 = new System.IO.FileInfo(Server.MapPath(@"~\XMLFiles\LabMasters.con").ToString());

            if (theFileInfo1.LastWriteTime.Date != theDTime.Date || theFileInfo2.LastWriteTime.Date != theDTime.Date || theFileInfo3.LastWriteTime.Date != theDTime.Date)
            {
                theFileInfo1.Delete();
                theFileInfo2.Delete();
                theFileInfo3.Delete();
                IIQCareSystem theCacheManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security");
                DataSet       theMainDS       = theCacheManager.GetSystemCache();
                DataSet       WriteXMLDS      = new DataSet();

                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Provider"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Ward"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Division"].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_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_CouncellingType"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_CouncellingTopic"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ReferredFrom"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_pmtctDeCode"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Module"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModDecode"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ARVSideEffects"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModCode"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Country"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Town"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["VWDiseaseSymptom"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["VW_ICDList"].Copy());
                WriteXMLDS.Tables.Add(theMainDS.Tables["mst_RegimenLine"].Copy());
                WriteXMLDS.WriteXml(Server.MapPath(@"~\XMLFiles\AllMasters.con").ToString(), 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.Tables.Add(theMainDS.Tables["Mst_DrugSchedule"].Copy());
                WriteXMLDS.WriteXml(Server.MapPath(@"~\XMLFiles\DrugMasters.con").ToString(), 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.Tables.Add(theMainDS.Tables["mst_PatientLabPeriod"].Copy());
                WriteXMLDS.WriteXml(Server.MapPath(@"~\XMLFiles\LabMasters.con").ToString(), XmlWriteMode.WriteSchema);
            }
        }
        protected void btnRefresh_Click(object sender, EventArgs e)
        {
            IIQCareSystem theRptTables = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem,BusinessProcess.Security");

            theRptTables.RefreshReportingTables(1);
        }
    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);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            System.IO.FileInfo theFileInfo1 = new System.IO.FileInfo(Server.MapPath(".\\XMLFiles\\AllMasters.con").ToString());
            System.IO.FileInfo theFileInfo2 = new System.IO.FileInfo(Server.MapPath(".\\XMLFiles\\DrugMasters.con").ToString());
            System.IO.FileInfo theFileInfo3 = new System.IO.FileInfo(Server.MapPath(".\\XMLFiles\\LabMasters.con").ToString());
            theFileInfo1.Delete();
            theFileInfo2.Delete();
            theFileInfo3.Delete();
        }
        catch { }

        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_pmtctDeCode"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Module"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModDecode"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ARVSideEffects"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_ModCode"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Country"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Town"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["VWDiseaseSymptom"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["VW_ICDList"].Copy());
        WriteXMLDS.Tables.Add(theMainDS.Tables["mst_RegimenLine"].Copy());
        if (theMainDS.Tables.Contains("Users"))
        {
            WriteXMLDS.Tables.Add(theMainDS.Tables["Users"].Copy());
        }
        WriteXMLDS.Tables.Add(theMainDS.Tables["Mst_Store"].Copy());
        try
        {
            WriteXMLDS.WriteXml(Server.MapPath(".\\XMLFiles\\").ToString() + "AllMasters.con", XmlWriteMode.WriteSchema);
        }
        catch { }
        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.Tables.Add(theMainDS.Tables["Mst_DrugSchedule"].Copy());
        WriteXMLDS.WriteXml(Server.MapPath(".\\XMLFiles\\").ToString() + "DrugMasters.con", XmlWriteMode.WriteSchema);

        WriteXMLDS.Tables.Clear();
        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.Tables.Add(theMainDS.Tables["mst_PatientLabPeriod"].Copy());
        try
        {
            WriteXMLDS.WriteXml(Server.MapPath(".\\XMLFiles\\").ToString() + "LabMasters.con", XmlWriteMode.WriteSchema);
        }
        catch { }
        try
        {
            WriteXMLDS.Tables.Clear();
            WriteXMLDS = new DataSet("QBReportList");
            WriteXMLDS.Tables.Add(theMainDS.Tables["QueryBuilderReports"].Copy());
            WriteXMLDS.WriteXml(Server.MapPath("~\\XMLFiles\\QueryBuilderReports.con"), XmlWriteMode.WriteSchema);
        }
        catch { }
        Response.Redirect("frmFacilityHome.aspx");
    }
Esempio n. 22
0
        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);
        }