Beispiel #1
0
        protected void Delete_Click(object sender, EventArgs e)
        {
            LinkButton data       = (LinkButton)sender;
            string     discountID = data.CommandName;

            if (OtherRepos.deleteDiscountCode(int.Parse(discountID)))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Deleted successfully');", true);
                discountCodesList();
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('This code has been used, you can not delete');", true);
            }
        }