protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            divAddTask.Visible    = false;
            divComment.Visible    = false;
            divAddComment.Visible = false;
        }

        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["LoginConnectionString"].ConnectionString);

        con.Open();

        String     test = "select Name from ProjectInformation where Name='" + Session["project"] + "'";
        SqlCommand com  = new SqlCommand(test, con);
        String     temp = com.ExecuteScalar().ToString().Trim();

        LProjectName.Text = temp;

        test           = "select CodeName from ProjectInformation where Name='" + Session["project"] + "'";
        com            = new SqlCommand(test, con);
        temp           = com.ExecuteScalar().ToString().Trim();
        LCodeName.Text = temp;

        test = "select Description from ProjectInformation where Name='" + Session["project"] + "'";
        com  = new SqlCommand(test, con);
        temp = com.ExecuteScalar().ToString().Trim();
        LProjectDescription.Text = temp;

        test            = "select StartDate from ProjectInformation where Name='" + Session["project"] + "'";
        com             = new SqlCommand(test, con);
        temp            = com.ExecuteScalar().ToString().Trim();
        LStartDate.Text = temp;

        test          = "select EndDate from ProjectInformation where Name='" + Session["project"] + "'";
        com           = new SqlCommand(test, con);
        temp          = com.ExecuteScalar().ToString().Trim();
        LEndDate.Text = temp;

        test           = "select Duration from ProjectInformation where Name='" + Session["project"] + "'";
        com            = new SqlCommand(test, con);
        temp           = com.ExecuteScalar().ToString().Trim();
        LDuration.Text = temp;

        test = "select Status from ProjectInformation where Name='" + Session["project"] + "'";
        com  = new SqlCommand(test, con);
        temp = com.ExecuteScalar().ToString().Trim();
        LProjectStatus.Text = temp;

        con.Close();


        string cs = ConfigurationManager.ConnectionStrings["LoginConnectionString"].ConnectionString;

        using (SqlConnection conn = new SqlConnection(cs))
        {
            SqlCommand cmd = new SqlCommand("Select ResourcePerson as Name, Designation from ProjectResourcePerson where ProjectName='" + Session["project"] + "'", conn);
            //SqlCommand cmd = new SqlCommand("Select * from TimeTable", con);
            conn.Open();
            ProjectResourcePerson.DataSource = cmd.ExecuteReader();
            ProjectResourcePerson.DataBind();
            conn.Close();
        }


        using (SqlConnection conn = new SqlConnection(cs))
        {
            SqlCommand cmd = new SqlCommand("Select Description, AssignedTo, AssignedBy, Priority, DueDate from ProjectTask where ProjectName='" + Session["project"] + "'", conn);
            //SqlCommand cmd = new SqlCommand("Select * from TimeTable", con);
            conn.Open();
            ProjectTask.DataSource = cmd.ExecuteReader();
            ProjectTask.DataBind();
            conn.Close();
        }
    }