Example #1
0
 protected void BtnDelete_Click(object sender, EventArgs e)
 {
     CheckBox cb;
     SYCRM.BLL.MessageTemplate BMT = new SYCRM.BLL.MessageTemplate();
     for (int i = 0; i < GridViewMessageTList.Rows.Count; i++)
     {
         cb = (CheckBox)GridViewMessageTList.Rows[i].FindControl("CBSelect");
         if (cb.Checked)
         {
             try
             {
                 SYCRM.Model.MessageTemplate mt= BMT.GetModel(new Guid(GridViewMessageTList.DataKeys[i].Value.ToString()));
                 mt.status = 2;
                 BMT.Update(mt);
             }
             catch
             {
             }
         }
     }
     Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "短信息成功删除!", "<script>alert('短信息成功删除!');window.location.href='smsTemplate.aspx'</script>");
 }