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); } }
public ResponseInfo <RspSystemNotiList> GetSystemNotiList([FromBody] ReqSystemNotiList data) { try { return(base.PostDataToAPINotAuth <ResponseInfo <RspSystemNotiList> >(base.apiPathAndQuery, data)); } catch (Exception ex) { throw ex; } }
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); }
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); }