เ พราะว่าผมทำ ส่วนของ gridview อ่ะ เป็น สองตัว หนึ่งคือ
<asp:CommandField HeaderText="ตรวจรับ" SelectImageUrl ="App_Themes/Pict/OK.gif" ButtonType ="Image" ShowSelectButton ="true" >
<ControlStyle Height ='30px' Width ='30px' />
<HeaderStyle BackColor ="#66ffff" HorizontalAlign ="center" />
<ItemStyle HorizontalAlign ="center" />
</asp:commandfield>
<asp:CommandField ButtonType ="Image" EditImageUrl ="App_Themes/Pict/Notpass.gif" HeaderText ="ไม่รับ" ShowEditButton ="True">
<ControlStyle Height="30px" Width="30px" />
<HeaderStyle BackColor="#66FFFF" HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:CommandField>
คราวนี้ผมไปทำงานของ Event Grid อ่ะสอง Event อ่ะครับ แล้วเมื่อมันทำงาน มันกับ ทำงาน หรือแสดง alert ขึ้นมาพร้อมกันสองตัว
Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles GridView1.SelectedIndexChanging
If MsgBox(" ยืนยัน - ตอบรับผู้ป่วย - ผ่านด่าน ตรวรคนเข้าเมือง ?", 4 + 32, "แจ้งเตือน") = 6 Then
Me.barricadeAcceptPatient(GridView1.DataKeys(e.NewSelectedIndex).Value.ToString, 1)
Else
Server.Transfer("immigrantCheck.aspx")
End If
End Sub
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
If MsgBox(" ยืนยัน - ไม่ตอบรับผู้ป่วย - ผ่านด่าน ตรวรคนเข้าเมือง ?", MsgBoxStyle.OkCancel, "แจ้งเตือน") = MsgBoxResult.Ok Then
Me.barricadeAcceptPatient(GridView1.DataKeys(e.NewEditIndex).Value.ToString, 0)
Else
Server.Transfer("immigrantCheck.aspx")
End If
End Sub
รูปภาพ
Tag : - - - -