Пример #1
0
    protected void onDelete(object source, CommandEventArgs e)
    {
        int Result = BLL_LMS_Training.Del_Training_Items(Convert.ToInt32(e.CommandArgument.ToString()), Convert.ToInt32(Session["USERID"]));

        if (Result == 1)
        {
            String msgretv = String.Format("alert('Item deleted successfully.')");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgret6v", msgretv, true);
            BindTrainingItems();
        }
        else
        {
            String msgretv = String.Format("alert('Item can not be deleted because it has been assigned to program.')");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgret6v", msgretv, true);
        }
    }