Пример #1
0
        internal int AddUpdateNotification(int portalID, string userName, AdminNotificationInfo objNotification)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();

            param.Add(new KeyValuePair <string, object>("@PortalID", portalID));
            param.Add(new KeyValuePair <string, object>("@NotificationID", objNotification.NotificationID));
            param.Add(new KeyValuePair <string, object>("@NotifyUserName", objNotification.NotifyUserName));
            param.Add(new KeyValuePair <string, object>("@Name", objNotification.Name));
            param.Add(new KeyValuePair <string, object>("@Message", objNotification.Message));
            param.Add(new KeyValuePair <string, object>("@Status", objNotification.Status));
            param.Add(new KeyValuePair <string, object>("@PageUrl", objNotification.PageUrl));
            param.Add(new KeyValuePair <string, object>("@IsActive", objNotification.IsActive));
            param.Add(new KeyValuePair <string, object>("@UserName", userName));
            SQLHandler sagesql = new SQLHandler();

            try
            {
                return(sagesql.ExecuteNonQuery("[dbo].[usp_AdminNotification_AddUpdate]", param, "@output"));
            }
            catch
            {
                throw;
            }
        }
        public int AddUpdateNotification(int portalID, string userName, AdminNotificationInfo objNotification)
        {
            AdminNotificationProvider provider = new AdminNotificationProvider();

            return(provider.AddUpdateNotification(portalID, userName, objNotification));
        }