Example #1
0
        public List <SystemNotiList> GetSystemNotiList(ReqSystemNotiList data)
        {
            List <SystemNotiList> ResultSet = new List <SystemNotiList>();

            using (IDbConnection connection = GetOpenConnection())
            {
                try
                {
                    string sql   = @"  select SysNotiID, MsgTitle, MsgValue, MsgUrl, IsReview, CreatedOn
                                     from SystemNotification
                                     where UserID = @UserID
                                    ";
                    var    param = new DynamicParameters();
                    param.Add("@UserID", data.UserID);
                    ResultSet = connection.Query <SystemNotiList>(sql, param).ToList();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (connection != null)
                    {
                        connection.Close();
                    }
                }
                return(ResultSet);
            }
        }
Example #2
0
 public ResponseInfo <RspSystemNotiList> GetSystemNotiList([FromBody] ReqSystemNotiList data)
 {
     try
     {
         return(base.PostDataToAPINotAuth <ResponseInfo <RspSystemNotiList> >(base.apiPathAndQuery, data));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #3
0
        public ResponseInfo <RspSystemNotiList> GetSystemNotiList([FromBody] ReqSystemNotiList data)
        {
            ResponseInfo <RspSystemNotiList> res = new ResponseInfo <RspSystemNotiList>();

            try
            {
                res = process.GetSystemNotiList(data);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(res);
        }
Example #4
0
        public ResponseInfo <RspSystemNotiList> GetSystemNotiList(ReqSystemNotiList data)
        {
            ResponseInfo <RspSystemNotiList> response = new ResponseInfo <RspSystemNotiList>();

            try
            {
                response.ResponseData = new RspSystemNotiList();
                response.ResponseData.systemNotiList = SODAL.GetSystemNotiList(data);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(response);
        }