private void btnDelete_Click(object sender, EventArgs e)
 {
     if (G_MemberCard.Delete())
     {
         MessageBox.Show("Xóa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Xóa thất bại", "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     LoadData();
     RefreshForm();
 }
示例#2
0
    /// <summary>
    /// 执行操作的方法
    /// </summary>
    private void Action()
    {
        string cmd = Request["cmd"];

        if (String.IsNullOrEmpty(cmd))
        {
            return;
        }
        string ids = Request.QueryString["ids"];

        if (cmd == "sold")
        {
            bll_memberCard.UpdateStatus(ids, "sold");
        }
        else if (cmd == "del")
        {
            bll_memberCard.Delete(ids);
        }

        Response.Redirect(Request.Url.AbsolutePath + WebUtility.GetUrlParams("?", true));
    }