Protected Sub btnRequestFiles_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRequestFiles.Click
If RequestFiles.SelectedItems.Count = 0 Then
lblNoFilesSelected.Text = "No files have been requested"
Else
lblNoFilesSelected.Text = ""
If String.IsNullOrEmpty(txtEmail.Text) Then
Dim dvEmailAddress As Data.DataView = GetEmailAddress.Select(DataSourceSelectArguments.Empty)
txtEmailAddress.Text = dvEmailAddress.ToTable.Rows(0)("EmailAddress")
Else
txtEmailAddress.Text = txtEmail.Text
End If
Dim FileID As Integer
Dim ArraySelectedFiles As New ArrayList
For Each item As GridDataItem In RequestFiles.MasterTableView.Items
If item.Selected Then
Dim Filename As String = item("FileNumber").Text.ToString()
Session("FileID") = Filename
ArraySelectedFiles.Add(Session("FileID"))
FileID = Convert.ToInt32(item.GetDataKeyValue("FileID"))
'Grab the objects out array and put into string.
For Each objitem In ArraySelectedFiles.ToArray
Session("PropertyString") = Session("PropertyString") & objitem.ToString
lblArrayList.Text = Session("PropertyString")
Next
Dim conFiles As SqlConnection
Dim strConnection As String
Dim cmd As New SqlCommand
Dim cmdinsert As SqlCommand
Dim strInsert As String
strConnection = ConfigurationManager.ConnectionStrings("FileawaySQLConnectionString").ConnectionString
conFiles = New SqlConnection(strConnection)
conFiles.Open()
cmd.Connection = conFiles
cmd.CommandText = "UPDATE dbo.Files SET FileStatus = 2 WHERE FileID = '" + FileID.ToString() + "'"
cmd.ExecuteNonQuery()
conFiles.Close()
conFiles = New SqlConnection(strConnection)
strInsert = "INSERT INTO dbo.FileHistory (FileID, Action, ActionedBy) VALUES (@RowID, @Action, @ActionedBy)"
cmdinsert = New SqlCommand(strInsert, conFiles)
cmdinsert.Parameters.AddWithValue("@RowID", FileID)
cmdinsert.Parameters.AddWithValue("@Action", 2)
cmdinsert.Parameters.AddWithValue("@ActionedBy", txtEmailAddress.Text)
conFiles.Open()
cmdinsert.ExecuteNonQuery()
conFiles.Close()
End If
Next
Me.RequestFiles.Rebind()
send_email()
End If
Session.Remove("PropertyString")
End Sub
Dear Team,
I want to achieve the below.
I have a parent page which displays the details about a project. From this, on a button click , I open a radwindow which displays some specific details about the project which displayed in the parent window. The radpopup window has some textboxes and other controls with values along with a UPDATE button.
What I need is, if I change values in the popup and try to close the radwindow without update, it should ask me a confirmation that” Are you sure to close this window without updating your data? The changes will be lost!! Click on CANCEL to return to the window and update". If i try to close the popup radwindow after updated [ie,if I not changed any values after updated] or without any change, it should not ask the confirmation before close the radpopupwindow.
Please help me to achieve this.
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"True"
UseClientSelectColumnOnly
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"False"
/>
<
ClientEvents
OnRowSelected
=
"PaymentLedgerRowSelected"
/>
<
ClientEvents
OnRequestStart
=
"ThisEvent"
/>
</
ClientSettings
>
For
Each
SelItem AS RadListBoxItem in Selectedlist
availiablelist.Items.Add(SelItem)
Next