protected void UpdateCourse_Click(object sender, EventArgs e)
    {
        UserBO ob4 = new UserBO();

        ob4.userid = Session["User"].ToString();

        ob4.coursecodetobechanged = CourseCodeDet.Text;

        if (CourseInsert.Text.Trim() == null || CourseInsert.Text.Trim() == "")
        {
            Response.Write("<script>alert('There is Something Wrong!!!');</script>");
            Server.Transfer("AdminCourseDetails.aspx");
        }

        if (CourseDescriptionInsert.Text.Trim() == null || CourseDescriptionInsert.Text.Trim() == "")
        {
            CourseDescriptionInsert.Text = descriptionmodified;
        }

        ob4.coursecode        = CourseInsert.Text;
        ob4.coursedescription = CourseDescriptionInsert.Text;
        ob4.skillName         = skillmodified;

        ob4.coursedate = DateTime.Today.ToString("dd-MM-yyyy");
        ob4.coursetime = DateTime.Now.ToString("HH:mm:ss");

        ob4.otherreference = OtherReferenceInsert.Text;


        clsBLL ob5 = new clsBLL();

        ob4.courseaddedby = ob5.firstnamerBLL(ob4.userid);


        int response = ob5.CourseUpdateBLL(ob4);

        if (response == 1)
        {
            Response.Write("<script>alert('Done Man!!!');</script>"); Server.Transfer("AdminMainPage.aspx");
        }
        else
        {
            Response.Write("<script>alert('Oops Man!!!');</script>");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try { AdminID.Text = Session["User"].ToString(); }
        catch { Response.Redirect("LoginPage.aspx"); }
        string str = Session["User"].ToString();
        UserBO ob4 = new UserBO();

        ob4.userid = Session["User"].ToString();

        clsBLL ob5    = new clsBLL();
        int    admin1 = ob5.FindUserTypeBLL(ob4);

        if (admin1 != 1)
        {
            Session["User"] = null; Response.Redirect("LoginPage.aspx");
        }

        string name = ob5.firstnamerBLL(str);

        AdminName.Text = name;


        if (!IsPostBack)
        {
            clsBLL        ob1        = new clsBLL();
            List <string> skillList  = ob1.FirstBLL();
            List <string> skillList2 = ob1.First2BLL();
            List <string> skillList3 = ob1.First3BLL();
            try
            {
                skillCard1.Text = skillList[0];
                skillCard2.Text = skillList2[0];
                skillCard3.Text = skillList3[0];
            }
            catch
            {
                skillCard1.Text = "none";
                skillCard2.Text = "none";
                skillCard3.Text = "none";
            }

            Adminsearchshowstat.Visible = false;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try { UserID.Text = Session["User"].ToString(); }
        catch { Response.Redirect("LoginPage.aspx"); }
        string str = Session["User"].ToString();
        UserBO ob4 = new UserBO();

        ob4.userid = Session["User"].ToString();

        clsBLL ob5 = new clsBLL();

        int user1 = ob5.FindUserTypeBLL(ob4);

        if (user1 == 1)
        {
            Session["User"] = null; Response.Redirect("LoginPage.aspx");
        }

        string name = ob5.firstnamerBLL(str);

        UserName.Text = name;


        using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["userdataConnectionString"].ConnectionString.ToString()))
        {
            SqlCommand cmd = new SqlCommand("select CourseCode,Status,Score from Scores where (UserID ='" + Session["User"].ToString() + "')", con);
            con.Open();
            CoursesAccepted.DataSource = cmd.ExecuteReader();
            CoursesAccepted.DataBind();
        }

        using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["userdataConnectionString"].ConnectionString.ToString()))
        {
            SqlCommand cmd = new SqlCommand("select SkillName from SkillSet", con);
            con.Open();
            UserSkillSearchResult.DataSource = cmd.ExecuteReader();
            UserSkillSearchResult.DataBind();
        }
    }