Exemple #1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.IntCourseID = Convert.ToInt32(Request.QueryString["CourseID"].ToString());
            objBCourseAdmin.BDeleteCourse(objBECourseAdmin);
            if (objBECourseAdmin.IntResult == 1)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeleteCourse_Success_DeleteCourse;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                trMessage.Visible = true;
                trDelete.Visible  = false;
            }
            if (objBECourseAdmin.IntResult == 0)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeletCourse_Error_DeleteCoursePending;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                trMessage.Visible = true;
            }
        }