public object GetNotificationlist(cls_NotificationInput Notification)
        {
            dynamic       TBNotificationDetailResult;
            List <object> NotificationDetailResult = new List <object>();

            try
            {
                List <cls_NotificationDetails> Result = Gallery.GetNotificationlist(Notification);

                for (int i = 0; i < Result.Count; i++)
                {
                    NotificationDetailResult.Add(new { AlbumDetail = Result[i] });
                }

                if (Result != null && Result.Count != 0)
                {
                    TBNotificationDetailResult = new { status = "0", message = "success", NotificationDetailResult = NotificationDetailResult };
                }
                else
                {
                    TBNotificationDetailResult = new { status = "0", message = "Record not found", NotificationDetailResult = NotificationDetailResult };
                }
            }
            catch
            {
                TBNotificationDetailResult = new { status = "1", message = "failed" };
            }

            return(new { TBNotificationDetailResult });
        }
Exemple #2
0
        public static List <cls_NotificationDetails> GetNotificationlist(cls_NotificationInput Notification)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[2];

                parameterList[0] = new MySqlParameter("?p_GroupID", Notification.GroupID);
                parameterList[1] = new MySqlParameter("?p_Type", Notification.Type);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <cls_NotificationDetails>("CALL Web_Activity_Notification_List_Get(?p_GroupID,?p_Type)", parameterList).ToList();

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }