想要为我的收件箱设置已读和未读图标 [英] read and unread icon want to set for my inbox

查看:267
本文介绍了想要为我的收件箱设置已读和未读图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我有两个模块



1.user模块 - 用户注册它存储在数据库表中的投诉

2.admin模块 - 阅读投诉并希望解决



现在我用gridview中的以下格式进行用户投诉显示

图片链接



subject - username-date-msgtype



现在那些msg我没有读过我想让那些msg图标为未读,在我自动阅读msg收件箱之后,tat图标变成了读...



我们怎么做才能帮帮我???

Actually i have two module

1.user module-user register the complaint it was store in database table
2.admin module-read the complaint and want to solved

now i did user complaint show in following format in gridview
image link

subject - username-date-msgtype

now those msg i didn't unread i wanna make those msg icon as unread and after i read the msg inbox automatically tat icon was change into read...

how can we do this please help me???

推荐答案

我无法看到你提供的图片您的查询。据我所知,您的系统不知道该消息已被读取。因此,首先,您必须让您的系统了解您已阅读邮件。为此,您可以在数据库中拥有另一列,每条消息的默认值为未读消息;单击该消息进行读取后,将该列的值更新为读取消息。针对网格中的两个值显示适当的图像。而不是字符串消息,更好地以布尔值的形式存储这些值。如果邮件未读,则为false,否则为true。并且立即更新缓存/内存中的值,以便您可以在整个应用程序中对每条消息具有真实值。
I was unable to see the image you have provided along with your query. As far as I have understood, your system doesn't know that the message has been read. So, first you have to make your system understand that you have read a message. For that you can have another column in your database with a default value of 'unread message' against each message; once you click on that message to read it, update that column's value to 'read message'. Show appropriate images against both values in the grid. Instead of a string message, better store these values in the form of boolean value. If a message is unread, it is false, otherwise true. And yes update your values in the cache/memory instantly so that you can have the true value against each message throughout the application.


FileInfo image = new FileInfo(context.Server.MapPath("~/Product_Images/Image-under-update.gif"));
string image1 = image.ToString();
byte[] buffer = File.ReadAllBytes(image1);
// here you will get binary data which you can insert into database
context.Response.BinaryWrite(buffer);







问...:)




regards...:)


这篇关于想要为我的收件箱设置已读和未读图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆