コード例 #1
0
        protected void btnDeleteChoice_Click(object sender, EventArgs e)
        {
            string _val = hidChoice2DeleteID.Value;

            _val = CommonUtilities.GlobalDecrypt(_val, BSWSession.SessionKey);
            int _id = -1;

            if (int.TryParse(_val, out _id))
            {
                bool res = gAssessment.DeleteAssessmentItemXChoice(_id);
                if (res)
                {
                    Prepare_Choice_Section();
                    Set_Success_Message("Deleted Successfully");
                }
                else
                {
                    Set_Error_Message("The item could not be deleted!");
                }
            }
            else
            {
                Set_Error_Message("Item can not be found!");
            }
        }