asp.net <asp:Repeater>下的 asp:LinkButton CommandArgument点击事件

前台

<asp:Repeater ID="rptData" runat="server"  OnItemCommand="rptData_ItemCommand">
  <ItemTemplate>
       <tr id="trRemark" <%# Container.ItemIndex%2==0?"class=\"even\"":" class=\"odd\"" %>>                               
             <td>
                  <%# ReturnDescption(Eval("CaseState").ToString())%>
             </td>
             <td class="last">
                                                 
                <asp:LinkButton CommandArgument='<%#Eval("ID") %>' Text="审核" class="down_btn" id="checkbtns" CommandName="checkbtn" style="cursor: pointer;" runat="server" />
                                                   
             <a class="down_btn" id="userRegistQues" style="cursor: pointer;" onclick="ReturnCase(<%#Eval("ID") %>)" >退回</a>
             <a class="down_btn" id="userRole" style="cursor: pointer;">转交</a> 
         </td>
      </tr>
   </ItemTemplate>
</asp:Repeater>

后台:

 protected void rptData_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName.ToString() == "checkbtn")
            {
                string ID = (e.CommandArgument).ToString();

                string medicalcaseInfoId = ID;
                int i = medicalcaseselectinfoBLL.UpdateAuditStateByMedicalcaseId(medicalcaseInfoId);

                if (i > 0)
                {
                    JavascriptFun("alert('审核通过!');window.location.href='../Medicalcaseauditing/MedicalcaseauditList.aspx'");
                }
                else
                { 
                    JavascriptFun("alert('审核不通过!');window.location.href='../Medicalcaseauditing/MedicalcaseauditList.aspx'");
                }
            }
        }

 

posted @ 2017-05-09 16:57  幽冥狂_七  阅读(1179)  评论(0编辑  收藏  举报