-
Notifications
You must be signed in to change notification settings - Fork 0
/
RemoveFromMailList.aspx.cs
51 lines (45 loc) · 1.95 KB
/
RemoveFromMailList.aspx.cs
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
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Reflection;
public partial class RemoveFromMailList : System.Web.UI.Page
{
private Logger logger = new Logger();
private CoachDal coachingDal = new CoachDal();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void removeYes_Click(object sender, EventArgs e)
{
if (Request["RemoveCode"] == null)
{
this.logger.Error(new AdminException
(". Request[\"RemoveCode\"] == null"), MethodBase.GetCurrentMethod().Name);
this.removeLabel.Text = @"לא הוסרת מרשימת התפוצה עקב בעיות טכניות. אנא פנה ידנית
בדף 'צור קשר' באתר עם כתובת האימייל איתה נרשמת לרשימת התפוצה";
return;
}
MailList mail = this.coachingDal.GetMailListByRemoveCode((string)Request["RemoveCode"]);
if (mail == null)
{
this.logger.Error(new AdminException
(". mail == null"), MethodBase.GetCurrentMethod().Name);
this.removeLabel.Text = @"לא הוסרת מרשימת התפוצה עקב בעיות טכניות. אנא פנה ידנית
בדף 'צור קשר' באתר עם כתובת האימייל איתה נרשמת לרשימת התפוצה";
return;
}
this.coachingDal.DisableMailList(mail.MailListID);
this.removeLabel.Text = "הוסרת מרשימת התפוצה בהצלחה";
this.buttons.Visible = false;
this.question.Visible = false;
}
protected void removeNo_Click(object sender, EventArgs e)
{
this.removeLabel.Text = "לא הוסרת מרשימת התפוצה";
this.buttons.Visible = false;
this.question.Visible = false;
}
}