protected void btnAdd_Click(object sender, EventArgs e) { try { BECourseAdmin objBECourseAdmin = new BECourseAdmin(); BCourseAdmin objBCourseAdmin = new BCourseAdmin(); objBECourseAdmin.strCourseID = txtCourseID.Text.Trim().ToString(); lblCourseID.Text = txtCourseID.Text.Trim().ToString(); objBECourseAdmin.strCourseName = txtCourseName.Text.Trim().ToString(); lblCourseName.Text = txtCourseName.Text.Trim().ToString(); objBECourseAdmin.IntUserID = Convert.ToInt32(ddlprovider.SelectedValue); objBCourseAdmin.BAddCourse(objBECourseAdmin); trMessage.Visible = true; if (objBECourseAdmin.IntResult == 1) { lblInfo.Text = Resources.AppMessages.Provider_AddCourse_Success_AddCourse; 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); trAddCourse.Visible = false; trAddCourseConfirm.Visible = true; } else { lblInfo.Text = Resources.AppMessages.Provider_AddCourse_Error_AddCourse; 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); trAddCourse.Visible = true; trAddCourseConfirm.Visible = false; } } catch (Exception Ex) { ErrorHandlers.ErrorLog.WriteError(Ex); } }