public static void insert(calendar_entity db, calendar_notification newn) { newn.id = Guid.NewGuid(); newn.createtime = DateTime.Now; db.calendar_notification.AddObject(newn); db.SaveChanges(); }
public static void correspondingAction(calendar_notification not,HttpSessionState session, HttpResponse response) { calendar_entity db = new calendar_entity(); string redurl = not.redirecturl; Guid userid2 = (Guid)not.userid2.Value; string user2name= Membership.GetUser(not.userid2, true).UserName; DAL.Notification_DAL.deleteById(db, not.id); if (not.eventtype == "addfriend") { Utilities.Utilities.redirectToFriendHome(session, response,userid2,user2name); } else if (not.eventtype == "commentedOnWall") { response.Redirect("Default.aspx"); } else if (not.eventtype == "joinevent") { response.Redirect(redurl); } }