Exemplo n.º 1
0
 /// <summary>
 /// Returns miscellaneous Partner data.
 /// </summary>
 /// <remarks>Used by the Partner Info UserControl.</remarks>
 /// <param name="APartnerKey">PartnerKey of the Partner for which the data
 /// should be retrieved.</param>
 /// <param name="ALocationKey">LocationKey of the Location for which data
 /// for the Partner specified should be retrieved.</param>
 /// <param name="APartnerInfoScope">Scope of data that should be loaded and
 /// returned by the PetraServer.</param>
 /// <param name="APartnerInfoDS">Typed DataSet that contains the requested Partner data.</param>
 /// <returns>True if the Partner exists, otherwise false.</returns>
 public static Boolean PartnerInfo(Int64 APartnerKey, TLocationPK ALocationKey,
                                   TPartnerInfoScopeEnum APartnerInfoScope,
                                   out PartnerInfoTDS APartnerInfoDS)
 {
     return(TRemote.MPartner.Partner.ServerLookups.WebConnectors.PartnerInfo(APartnerKey,
                                                                             ALocationKey, APartnerInfoScope, out APartnerInfoDS));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns miscellaneous Partner data.
 /// </summary>
 /// <remarks>Used by the Partner Info UserControl.</remarks>
 /// <param name="APartnerKey">PartnerKey of the Partner for which the data
 /// should be retrieved.</param>
 /// <param name="APartnerInfoScope">Scope of data that should be loaded and
 /// returned by the PetraServer.</param>
 /// <param name="APartnerInfoDS">Typed DataSet that contains the requested Partner data.</param>
 /// <param name="ASeparateDBConnection">If you *must have* a separate DB Connection</param>
 /// <returns>True if the Partner exists, otherwise false.</returns>
 public static Boolean PartnerInfo(Int64 APartnerKey,
                                   TPartnerInfoScopeEnum APartnerInfoScope,
                                   out PartnerInfoTDS APartnerInfoDS,
                                   Boolean ASeparateDBConnection = false)
 {
     return(TRemote.MPartner.Partner.ServerLookups.WebConnectors.PartnerInfo(APartnerKey,
                                                                             APartnerInfoScope, out APartnerInfoDS, ASeparateDBConnection));
 }
Exemplo n.º 3
0
        public static Boolean PartnerInfo(Int64 APartnerKey, TLocationPK ALocationKey,
            TPartnerInfoScopeEnum APartnerInfoScope,
            out PartnerInfoTDS APartnerInfoDS)
        {
            const string DATASET_NAME = "PartnerInfo";

            Boolean ReturnValue = false;

            APartnerInfoDS = new PartnerInfoTDS(DATASET_NAME);

            switch (APartnerInfoScope)
            {
                case TPartnerInfoScopeEnum.pisHeadOnly:

                    throw new NotImplementedException();

                case TPartnerInfoScopeEnum.pisPartnerLocationAndRestOnly:

                    if (TServerLookups_PartnerInfo.PartnerLocationAndRestOnly(APartnerKey,
                            ALocationKey, ref APartnerInfoDS))
                    {
                        ReturnValue = true;
                    }
                    else
                    {
                        ReturnValue = false;
                    }

                    break;

                case TPartnerInfoScopeEnum.pisPartnerLocationOnly:

                    if (TServerLookups_PartnerInfo.PartnerLocationOnly(APartnerKey,
                            ALocationKey, ref APartnerInfoDS))
                    {
                        ReturnValue = true;
                    }
                    else
                    {
                        ReturnValue = false;
                    }

                    break;

                case TPartnerInfoScopeEnum.pisLocationPartnerLocationAndRestOnly:

                    if (TServerLookups_PartnerInfo.LocationPartnerLocationAndRestOnly(APartnerKey,
                            ALocationKey, ref APartnerInfoDS))
                    {
                        ReturnValue = true;
                    }
                    else
                    {
                        ReturnValue = false;
                    }

                    break;

                case TPartnerInfoScopeEnum.pisLocationPartnerLocationOnly:

                    if (TServerLookups_PartnerInfo.LocationPartnerLocationOnly(APartnerKey,
                            ALocationKey, ref APartnerInfoDS))
                    {
                        ReturnValue = true;
                    }
                    else
                    {
                        ReturnValue = false;
                    }

                    break;

                case TPartnerInfoScopeEnum.pisFull:

                    if (TServerLookups_PartnerInfo.AllPartnerInfoData(APartnerKey,
                            ref APartnerInfoDS))
                    {
                        ReturnValue = true;
                    }
                    else
                    {
                        ReturnValue = false;
                    }

                    break;

                default:

                    break;
            }

            return ReturnValue;
        }
Exemplo n.º 4
0
 public static Boolean PartnerInfo(Int64 APartnerKey,
     TPartnerInfoScopeEnum APartnerInfoScope,
     out PartnerInfoTDS APartnerInfoDS)
 {
     return PartnerInfo(APartnerKey, null, APartnerInfoScope, out APartnerInfoDS);
 }
Exemplo n.º 5
0
        public static Boolean PartnerInfo(Int64 APartnerKey, TLocationPK ALocationKey,
                                          TPartnerInfoScopeEnum APartnerInfoScope,
                                          out PartnerInfoTDS APartnerInfoDS)
        {
            const string DATASET_NAME = "PartnerInfo";

            Boolean ReturnValue = false;

            APartnerInfoDS = new PartnerInfoTDS(DATASET_NAME);

            switch (APartnerInfoScope)
            {
            case TPartnerInfoScopeEnum.pisHeadOnly:

                throw new NotImplementedException();

            case TPartnerInfoScopeEnum.pisPartnerLocationAndRestOnly:

                if (TServerLookups_PartnerInfo.PartnerLocationAndRestOnly(APartnerKey,
                                                                          ALocationKey, ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            case TPartnerInfoScopeEnum.pisPartnerLocationOnly:

                if (TServerLookups_PartnerInfo.PartnerLocationOnly(APartnerKey,
                                                                   ALocationKey, ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            case TPartnerInfoScopeEnum.pisLocationPartnerLocationAndRestOnly:

                if (TServerLookups_PartnerInfo.LocationPartnerLocationAndRestOnly(APartnerKey,
                                                                                  ALocationKey, ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            case TPartnerInfoScopeEnum.pisLocationPartnerLocationOnly:

                if (TServerLookups_PartnerInfo.LocationPartnerLocationOnly(APartnerKey,
                                                                           ALocationKey, ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            case TPartnerInfoScopeEnum.pisPartnerAttributesOnly:

                if (TServerLookups_PartnerInfo.PartnerAttributesOnly(APartnerKey,
                                                                     ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            case TPartnerInfoScopeEnum.pisFull:

                if (TServerLookups_PartnerInfo.AllPartnerInfoData(APartnerKey,
                                                                  ref APartnerInfoDS))
                {
                    ReturnValue = true;
                }
                else
                {
                    ReturnValue = false;
                }

                break;

            default:

                break;
            }

            return(ReturnValue);
        }
Exemplo n.º 6
0
 public static Boolean PartnerInfo(Int64 APartnerKey,
                                   TPartnerInfoScopeEnum APartnerInfoScope,
                                   out PartnerInfoTDS APartnerInfoDS)
 {
     return(PartnerInfo(APartnerKey, null, APartnerInfoScope, out APartnerInfoDS));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Returns miscellaneous Partner data.
 /// </summary>
 /// <remarks>Used by the Partner Info UserControl.</remarks>
 /// <param name="APartnerKey">PartnerKey of the Partner for which the data
 /// should be retrieved.</param>
 /// <param name="ALocationKey">LocationKey of the Location for which data
 /// for the Partner specified should be retrieved.</param>
 /// <param name="APartnerInfoScope">Scope of data that should be loaded and
 /// returned by the PetraServer.</param>
 /// <param name="APartnerInfoDS">Typed DataSet that contains the requested Partner data.</param>
 /// <returns>True if the Partner exists, otherwise false.</returns>
 public static Boolean PartnerInfo(Int64 APartnerKey, TLocationPK ALocationKey,
     TPartnerInfoScopeEnum APartnerInfoScope,
     out PartnerInfoTDS APartnerInfoDS)
 {
     return TRemote.MPartner.Partner.ServerLookups.WebConnectors.PartnerInfo(APartnerKey,
         ALocationKey, APartnerInfoScope, out APartnerInfoDS);
 }
Exemplo n.º 8
0
            /// <summary>
            /// Construcor.
            /// </summary>
            /// <param name="APartnerKey">PartnerKey of Partner that should be retrieved.</param>
            /// <param name="ALocationKey">Location Primary Key of Partner that should be retrieved.</param>
            /// <param name="AScope">Scope of data that is already available client-side.</param>
            /// <param name="ALoadRestOfData">Determines whether the 'rest' of the data needs to be retrieved as well.</param>
            /// <param name="APartnerInfoScope">Scope of data that should be retrieved.</param>
            public TServerCallParams(Int64 APartnerKey, TLocationPK ALocationKey,
                TPartnerInfoAvailDataEnum AScope,
                bool ALoadRestOfData,
                TPartnerInfoScopeEnum APartnerInfoScope)
            {
                FPartnerKey = APartnerKey;
                FLocationKey = ALocationKey;
                FLoadRestOfData = ALoadRestOfData;
                FScope = AScope;
                FPartnerInfoScope = APartnerInfoScope;

//                TLogging.Log("Created new TServerCallParams. PartnerKey: " + FPartnerKey.ToString() +
//                             "; LocationKey: " + FLocationKey.LocationKey.ToString() +
//                             "; PartnerInfoScope: " + FPartnerInfoScope.ToString("G"));
            }