-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcessLetter.ashx
43 lines (37 loc) · 1.26 KB
/
ProcessLetter.ashx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<%@ WebHandler Language="C#" Class="ProcessLetter" %>
using System;
using System.Web;
using System.Web.SessionState;
using System.Linq;
public class ProcessLetter : IHttpHandler,IRequiresSessionState {
ProcessLetters p = new ProcessLetters();
FactoryDBDataContext db = new FactoryDBDataContext();
public void ProcessRequest (HttpContext context) {
if (context.Session[CDKey.LOGINUSER] != null)
{
if (context.Request["letterid"] == null)
{
tMember member = (tMember)context.Session[CDKey.LOGINUSER];
p.ProcessLetterMsg(member,context,Convert.ToInt32(context.Request["page"]));
} else
{
var table = from t in db.tLetter
where t.fIdILetter == Convert.ToInt32(context.Request["letterid"])
select t;
if (table.Count() > 0)
{
foreach(tLetter l in table)
{
l.fIsRead = true;
db.SubmitChanges();
}
}
}
}
}
public bool IsReusable {
get {
return false;
}
}
}