Exemplo n.º 1
0
            public void GetNextResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance = "20";
                        gffml.Latitude = this.lat;
                        gffml.Longitude = this.lng;
                        gffml.OrderByField = sort;
                        gffml.OrderDirection = dir;

                        //Populate the object with data from the database
                        Int32 calcFrom = Int32.Parse(this.resCount) + resultBuffer.Rows.Count + 1;
                        gffml.GetData(calcFrom, (calcFrom + 20));

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result, set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;

                            //DO NOT CLEAR THE RESULT BUFFER HERE AS WE'LL NEED IT'S CONTENTS IN THIS SITUATION
                        }
                    }
                }
                else
                {
                    using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                    {
                        //Set the Parameters
                        gffs.ServiceID = ThisSession.ServiceID.ToString();
                        gffs.Latitude = this.lat;
                        gffs.Longitude = this.lng;
                        gffs.SpecialtyID = ThisSession.SpecialtyID.ToString();
                        gffs.Distance = "20";
                        gffs.OrderByField = sort;
                        gffs.OrderDirection = dir;
                        //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                        gffs.CCHID = ThisSession.CCHID;
                        gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                        //Populate the object with data from the database
                        Int32 calcFrom = Int32.Parse(this.resCount) + resultBuffer.Rows.Count + 1;
                        gffs.GetData(calcFrom, (calcFrom + 20));

                        //If we got anything back and had no errors...
                        if (!gffs.HasErrors && gffs.RowsBack > 0)
                        {
                            //If we've reached the end of the result, set it even on the first pass
                            lastResult = gffs.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffs.RawResults;

                            //DO NOT CLEAR THE RESULT BUFFER HERE AS WE'LL NEED IT'S CONTENTS IN THIS SITUATION
                        }
                    }
                }
            }
Exemplo n.º 2
0
            public void GetFirstResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance = "20";
                        gffml.Latitude = this.lat;
                        gffml.Longitude = this.lng;
                        gffml.OrderByField = "Distance";
                        gffml.OrderDirection = "ASC";

                        //Populate the object with data from the database
                        gffml.GetData();

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;

                            //Set the LearnMore table for use later
                            learnMoreTable = gffml.LearnMoreResults;
                        }
                    }
                }
                else
                {
                    if (!IsThin)
                    {
                        using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                        {
                            //Set the parameters
                            gffs.ServiceID = ThisSession.ServiceID.ToString();
                            gffs.Latitude = this.lat;
                            gffs.Longitude = this.lng;
                            gffs.SpecialtyID = ThisSession.SpecialtyID.ToString();
                            gffs.Distance = "20";
                            gffs.OrderByField = "Distance";
                            gffs.OrderDirection = "ASC";
                            //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                            gffs.CCHID = ThisSession.CCHID;
                            gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                            //Populate the object with data from the database
                            gffs.GetData();

                            //Is this thin data or no?
                            if (!gffs.DataIsThin)
                            {
                                //If we got anything back and had no errors...
                                if (!gffs.HasErrors && gffs.RowsBack > 0)
                                {
                                    //If we've reached the end of the result set it even on the first pass
                                    lastResult = gffs.ReachedEnd;

                                    //Save the specific results for sorting and geocoding for when we leave the Using
                                    tblResults = gffs.RawResults;

                                    //Set the LearnMore table for use later
                                    learnMoreTable = gffs.LearnMoreResults;
                                }
                            }
                            else
                            { IsThin = true; }
                        }
                    }
                    if (IsThin)
                    {
                        using (GetThinDataResults gtdr = new GetThinDataResults())
                        {
                            //Set the parameters
                            gtdr.ZipCode = ThisSession.PatientZipCode;
                            gtdr.ServiceID = ThisSession.ServiceID.ToString();
                            gtdr.Latitude = this.lat;
                            gtdr.Longitude = this.lng;
                            gtdr.SpecialtyId = ThisSession.SpecialtyID.ToString();

                            //Populate the object with data from the database
                            gtdr.GetData();

                            if (gtdr.HasErrors && gtdr.RowsBack > 0)
                            {
                                lastResult = gtdr.ReachedEnd;
                                tblResults = gtdr.RawResults;

                            }
                        }
                    }
                }
                //Prepare the result buffer to begin with a clean slate
                if (tblResults != null && tblResults.Rows.Count > 0)
                    if (resultBuffer == null)
                        resultBuffer = tblResults.Clone();
                    else
                        resultBuffer.Clear();
            }
Exemplo n.º 3
0
            public void ChangeSortResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance = "20";
                        gffml.Latitude = this.lat;
                        gffml.Longitude = this.lng;
                        gffml.OrderByField = sort;
                        gffml.OrderDirection = dir;

                        //Populate the object with data from the databdase
                        gffml.GetData();

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;
                        }
                    }
                }
                else
                {
                    using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                    {
                        //Set the Parameters
                        gffs.ServiceID = ThisSession.ServiceID.ToString();
                        gffs.Latitude = this.lat;
                        gffs.Longitude = this.lng;
                        gffs.SpecialtyID = ThisSession.SpecialtyID.ToString();
                        gffs.Distance = "20";
                        gffs.OrderByField = sort;
                        gffs.OrderDirection = dir;
                        //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                        gffs.CCHID = ThisSession.CCHID;
                        gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                        //Populate the object with data from the database
                        gffs.GetData();

                        //If we got anything back and had no errors...
                        if (!gffs.HasErrors && gffs.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffs.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffs.RawResults;
                        }
                    }
                }

                //Prepare the result buffer to begin with a clean slate
                if (resultBuffer == null)
                    resultBuffer = tblResults.Clone();
                else
                    resultBuffer.Clear();
            }
Exemplo n.º 4
0
            public void GetNextResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance       = "20";
                        gffml.Latitude       = this.lat;
                        gffml.Longitude      = this.lng;
                        gffml.OrderByField   = sort;
                        gffml.OrderDirection = dir;

                        //Populate the object with data from the database
                        Int32 calcFrom = Int32.Parse(this.resCount) + resultBuffer.Rows.Count + 1;
                        gffml.GetData(calcFrom, (calcFrom + 20));

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result, set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;

                            //DO NOT CLEAR THE RESULT BUFFER HERE AS WE'LL NEED IT'S CONTENTS IN THIS SITUATION
                        }
                    }
                }
                else
                {
                    using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                    {
                        //Set the Parameters
                        gffs.ServiceID      = ThisSession.ServiceID.ToString();
                        gffs.Latitude       = this.lat;
                        gffs.Longitude      = this.lng;
                        gffs.SpecialtyID    = ThisSession.SpecialtyID.ToString();
                        gffs.Distance       = "20";
                        gffs.OrderByField   = sort;
                        gffs.OrderDirection = dir;
                        //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                        gffs.CCHID  = ThisSession.CCHID;
                        gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                        //Populate the object with data from the database
                        Int32 calcFrom = Int32.Parse(this.resCount) + resultBuffer.Rows.Count + 1;
                        gffs.GetData(calcFrom, (calcFrom + 20));

                        //If we got anything back and had no errors...
                        if (!gffs.HasErrors && gffs.RowsBack > 0)
                        {
                            //If we've reached the end of the result, set it even on the first pass
                            lastResult = gffs.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffs.RawResults;

                            //DO NOT CLEAR THE RESULT BUFFER HERE AS WE'LL NEED IT'S CONTENTS IN THIS SITUATION
                        }
                    }
                }
            }
Exemplo n.º 5
0
            public void ChangeSortResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance       = "20";
                        gffml.Latitude       = this.lat;
                        gffml.Longitude      = this.lng;
                        gffml.OrderByField   = sort;
                        gffml.OrderDirection = dir;

                        //Populate the object with data from the databdase
                        gffml.GetData();

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;
                        }
                    }
                }
                else
                {
                    using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                    {
                        //Set the Parameters
                        gffs.ServiceID      = ThisSession.ServiceID.ToString();
                        gffs.Latitude       = this.lat;
                        gffs.Longitude      = this.lng;
                        gffs.SpecialtyID    = ThisSession.SpecialtyID.ToString();
                        gffs.Distance       = "20";
                        gffs.OrderByField   = sort;
                        gffs.OrderDirection = dir;
                        //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                        gffs.CCHID  = ThisSession.CCHID;
                        gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                        //Populate the object with data from the database
                        gffs.GetData();

                        //If we got anything back and had no errors...
                        if (!gffs.HasErrors && gffs.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffs.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffs.RawResults;
                        }
                    }
                }

                //Prepare the result buffer to begin with a clean slate
                if (resultBuffer == null)
                {
                    resultBuffer = tblResults.Clone();
                }
                else
                {
                    resultBuffer.Clear();
                }
            }
Exemplo n.º 6
0
            public void GetFirstResults()
            {
                if (IsMultiLab)
                {
                    using (GetFacilitiesForMultiLab gffml = new GetFacilitiesForMultiLab())
                    {
                        //Set the parameters
                        using (DataView dv = new DataView(ThisSession.ChosenLabs))
                            gffml.ServiceList = dv.ToTable("ChosenLabs", true, new String[] { "ServiceID" });
                        gffml.Distance       = "20";
                        gffml.Latitude       = this.lat;
                        gffml.Longitude      = this.lng;
                        gffml.OrderByField   = "Distance";
                        gffml.OrderDirection = "ASC";

                        //Populate the object with data from the database
                        gffml.GetData();

                        //If we got anything back and had no errors...
                        if (!gffml.HasErrors && gffml.RowsBack > 0)
                        {
                            //If we've reached the end of the result set it even on the first pass
                            lastResult = gffml.ReachedEnd;

                            //Save the specific results for sorting and geocoding for when we leave the Using
                            tblResults = gffml.RawResults;

                            //Set the LearnMore table for use later
                            learnMoreTable = gffml.LearnMoreResults;
                        }
                    }
                }
                else
                {
                    if (!IsThin)
                    {
                        using (GetFacilitiesForService gffs = new GetFacilitiesForService())
                        {
                            //Set the parameters
                            gffs.ServiceID      = ThisSession.ServiceID.ToString();
                            gffs.Latitude       = this.lat;
                            gffs.Longitude      = this.lng;
                            gffs.SpecialtyID    = ThisSession.SpecialtyID.ToString();
                            gffs.Distance       = "20";
                            gffs.OrderByField   = "Distance";
                            gffs.OrderDirection = "ASC";
                            //gffs.MemberMedicalID = ThisSession.SubscriberMedicalID;
                            gffs.CCHID  = ThisSession.CCHID;
                            gffs.UserID = Membership.GetUser().ProviderUserKey.ToString();

                            //Populate the object with data from the database
                            gffs.GetData();

                            //Is this thin data or no?
                            if (!gffs.DataIsThin)
                            {
                                //If we got anything back and had no errors...
                                if (!gffs.HasErrors && gffs.RowsBack > 0)
                                {
                                    //If we've reached the end of the result set it even on the first pass
                                    lastResult = gffs.ReachedEnd;

                                    //Save the specific results for sorting and geocoding for when we leave the Using
                                    tblResults = gffs.RawResults;

                                    //Set the LearnMore table for use later
                                    learnMoreTable = gffs.LearnMoreResults;
                                }
                            }
                            else
                            {
                                IsThin = true;
                            }
                        }
                    }
                    if (IsThin)
                    {
                        using (GetThinDataResults gtdr = new GetThinDataResults())
                        {
                            //Set the parameters
                            gtdr.ZipCode     = ThisSession.PatientZipCode;
                            gtdr.ServiceID   = ThisSession.ServiceID.ToString();
                            gtdr.Latitude    = this.lat;
                            gtdr.Longitude   = this.lng;
                            gtdr.SpecialtyId = ThisSession.SpecialtyID.ToString();

                            //Populate the object with data from the database
                            gtdr.GetData();

                            if (gtdr.HasErrors && gtdr.RowsBack > 0)
                            {
                                lastResult = gtdr.ReachedEnd;
                                tblResults = gtdr.RawResults;
                            }
                        }
                    }
                }
                //Prepare the result buffer to begin with a clean slate
                if (tblResults != null && tblResults.Rows.Count > 0)
                {
                    if (resultBuffer == null)
                    {
                        resultBuffer = tblResults.Clone();
                    }
                    else
                    {
                        resultBuffer.Clear();
                    }
                }
            }