-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgive_gift.aspx.vb
More file actions
49 lines (36 loc) · 1.52 KB
/
give_gift.aspx.vb
File metadata and controls
49 lines (36 loc) · 1.52 KB
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
Partial Class give_gift
Inherits System.Web.UI.Page
Protected Sub InsertButton_Click(sender As Object, e As EventArgs)
Dim txtAmount As TextBox
Dim txtDate As TextBox
Dim ddlCamps As DropDownList
txtAmount = FormView1.FindControl("txtgiftamount")
txtDate = FormView1.FindControl("txtgiftdate")
ddlCamps = FormView1.FindControl("ddlCampaign")
SqlDataSource1.InsertParameters("amount").DefaultValue = txtAmount.Text
SqlDataSource1.InsertParameters("date").DefaultValue = txtDate.Text
SqlDataSource1.InsertParameters("cid").DefaultValue = ddlCamps.SelectedValue
SqlDataSource1.InsertParameters("did").DefaultValue = Session("did")
End Sub
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
If Session("user") = "" Then
Response.Redirect("first_login.aspx")
Else
If Session("level") = 1 Then
Me.Master.AdmimMenu = True
Me.Master.userMenu = False
Else
Me.Master.AdmimMenu = False
Me.Master.userMenu = True
End If
End If
Catch ex As Exception
Me.Master.statusLabel.Text = ex.Message
End Try
End Sub
Protected Sub FormView1_ItemInserted(sender As Object, e As FormViewInsertedEventArgs) Handles FormView1.ItemInserted
FormView1.DefaultMode = FormViewMode.ReadOnly
End Sub
End Class