-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditCoupons.ascx.cs
52 lines (42 loc) · 1.2 KB
/
EditCoupons.ascx.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
52
using DotNetNuke.Services.Exceptions;
using System;
using Ventrian.Modules.Subscriptions.Base;
using Ventrian.Modules.Subscriptions.Components.Entities;
namespace Ventrian.Modules.Subscriptions
{
public partial class EditCoupons : SubscriptionBase<SubscriptionSettings>
{
#region Private Methods
private void BindCoupons()
{
grdCoupons.DataSource = Coupons;
grdCoupons.DataBind();
if (grdCoupons.Items.Count == 0)
{
grdCoupons.Visible = false;
phNoCoupons.Visible = true;
}
}
#endregion
#region Protected Methods
protected string GetEditUrl(int planID)
{
return EditUrl("cid", planID.ToString(), "EditCoupon");
}
#endregion
#region Event Handlers
protected void Page_Load(object sender, EventArgs e)
{
try
{
BindCoupons();
lnkAddEntry.NavigateUrl = EditUrl("EditCoupon");
}
catch (Exception ex)
{
Exceptions.ProcessModuleLoadException(this, ex);
}
}
#endregion
}
}