示例#1
0
        //For Print,Email
        public bool RaiseAppNotifier(AppUser oDCAppUser, string NTYP, string UDID, string PDID, string NDID)
        {
            //Check Event is sucess or not
            bool _bSetAppNotifierSuccess = false;
            try
            {

                //Validate NTYP before switching to respective notifier
                if (string.IsNullOrEmpty(NTYP)) return _bSetAppNotifierSuccess;

                //Build Post DCAppNotifier
                AppNotifier _oDCAppNotifier = new AppNotifier();
                _oDCAppNotifier.AppUserDID = UDID;
                _oDCAppNotifier.AppProductDID = PDID;

                //Check if NDID already defined if so use it
                if (!string.IsNullOrEmpty(NDID))
                    _oDCAppNotifier.DID = NDID;
                else
                    _oDCAppNotifier.DID = _oDCAppNotifier.GetNewDIDWithPrefix();

                _oDCAppNotifier.NoOfVisits = 0;

                //Check which notifier to call based on NTYP
                switch (NTYP.ToUpper())
                {
                    case "PRINT":
                        _oDCAppNotifier.NotifierType = "PRINT";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    case "EMAIL":
                        _oDCAppNotifier.NotifierType = "LIKE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    default:
                        _bSetAppNotifierSuccess = false;
                        break;
                }

                return _bSetAppNotifierSuccess;
            }
            catch (Exception ex)
            {
                //Log4NetUtility.ErrorDebug(this.GetType().FullName, "Error in DCAppConfiguration GetAppConfiguration()", ex);
                throw ex;
            }
        }
示例#2
0
        //For Share, Like, Lead
        public bool RaiseAppNotifier(AppUser oDCAppUser, string NTYP, string UDID, string PDID, string NDID, AppLeadData oAppLeadData, string TO_id)
        {
            //Check Event is sucess or not
            bool _bSetAppNotifierSuccess = false;
            try
            {

                //Validate NTYP before switching to respective notifier
                if (string.IsNullOrEmpty(NTYP)) return _bSetAppNotifierSuccess;

                //Build Post DCAppNotifier
                AppNotifier _oDCAppNotifier = new AppNotifier();
                _oDCAppNotifier.AppUserDID = UDID;
                _oDCAppNotifier.AppProductDID = PDID;

                //Check if NDID already defined if so use it
                if (!string.IsNullOrEmpty(NDID))
                    _oDCAppNotifier.DID = NDID;
                else
                    _oDCAppNotifier.DID = _oDCAppNotifier.GetNewDIDWithPrefix();

                _oDCAppNotifier.NoOfVisits = 0;

                //Check which notifier to call based on NTYP
                switch (NTYP.ToUpper())
                {
                    case "SHARE":
                        _oDCAppNotifier.NotifierType = "SHARE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    case "LEAD":
                        _oDCAppNotifier.NotifierType = "LEAD";
                        _oDCAppNotifier.SoNetEmailID = oAppLeadData.EmailID;
                        _oDCAppNotifier.SoNetEmailContext = oAppLeadData.Subject;
                        _oDCAppNotifier.SoNetEmailContent = oAppLeadData.Body;
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    case "LIKE": _oDCAppNotifier.NotifierType = "LIKE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;
                    case "MSHARE": _oDCAppNotifier.NotifierType = "MSHARE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    case "TWEET": _oDCAppNotifier.NotifierType = "TWEET";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;
                    case "MPOST": _oDCAppNotifier.NotifierType = "MPOST";
                        _oDCAppNotifier.SoNetFriendID = TO_id;
                        if (!TO_id.Contains(","))
                        {
                            _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        }
                        break;
                    case "MLIKE": _oDCAppNotifier.NotifierType = "MLIKE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;

                    case "CLICK":
                        _oDCAppNotifier.NotifierType = "CLICK";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;
                    case "LISHARE": _oDCAppNotifier.NotifierType = "LISHARE";
                        _bSetAppNotifierSuccess = fbDALC.AddAppNotifierDetails(GetSonetPie, _oDCAppNotifier);
                        break;
                    default:
                        _bSetAppNotifierSuccess = false;
                        break;
                }

                return _bSetAppNotifierSuccess;
            }
            catch (Exception ex)
            {
                //Log4NetUtility.ErrorDebug(this.GetType().FullName, "Error in DCAppConfiguration GetAppConfiguration()", ex);
                throw ex;
            }
        }