public void ShowGridView()
    {
        DataTable ObjJob_SkillTable = MyJobPortalModel.JobPost_Skills.GetJobPost_SkillsRecords("JobPostId=" + int.Parse(Request.QueryString["Id"]));

        GridViewSkills.DataSource = ObjJob_SkillTable;
        GridViewSkills.DataBind();
    }
Ejemplo n.º 2
0
    public void ShowSkills()
    {
        DataTable ObjSkillTable = (DataTable)ViewState["SkillTable"];

        GridViewSkills.DataSource = ObjSkillTable;
        GridViewSkills.DataBind();
    }
        void addSkills()
        {
            DataTable dt = new DataTable();

            dt.Columns.AddRange(new DataColumn[7] {
                new DataColumn("Employee_ID"), new DataColumn("Communication"), new DataColumn("Teamwork"), new DataColumn("DecisionMaking"), new DataColumn("JobKnow"), new DataColumn("Leadership"), new DataColumn("TotalScore")
            });
            foreach (GridViewRow row in GridViewWorkPerf.Rows)
            {
                if (row.RowType == DataControlRowType.DataRow)
                {
                    LinkButton EID   = (LinkButton)row.FindControl("LinkButton2");
                    var        EmpID = EID.Text;

                    DropDownList comm   = (DropDownList)row.FindControl("DropDownListCom");
                    DropDownList team   = (DropDownList)row.FindControl("DropDownListteam");
                    DropDownList Des    = (DropDownList)row.FindControl("DropDownListDes");
                    DropDownList JK     = (DropDownList)row.FindControl("DropDownListJK");
                    DropDownList lead   = (DropDownList)row.FindControl("DropDownListLead");
                    int          commu  = int.Parse(comm.SelectedItem.Value);
                    int          teamW  = int.Parse(team.SelectedItem.Value);
                    int          Desc   = int.Parse(Des.SelectedItem.Value);
                    int          JKn    = int.Parse(JK.SelectedItem.Value);
                    int          leader = int.Parse(lead.SelectedItem.Value);
                    double       Total  = ((double)commu + (double)teamW) + (double)Desc + (double)JKn + (double)leader;

                    dt.Rows.Add(EmpID, commu, teamW, Desc, JKn, leader, Total);
                }
            }
            GridViewSkills.DataSource = dt;
            GridViewSkills.DataBind();
        }
Ejemplo n.º 4
0
    public void ShowGridView()
    {
        DataTable ObjJob_SkillTable = JobPost_Skills.GetJobPost_SkillsRecords("JobPostId=" + Request.QueryString["Id"]);
        DataTable ActualTable       = Skills.GetSkillsRecords("");

        ActualTable.Rows.Clear();
        foreach (DataRow ObjRow in ObjJob_SkillTable.Rows)
        {
            DataTable ObjSkillTable = Skills.GetSkillsRecords("Id=" + ObjRow["SkillId"]);
            ActualTable.ImportRow(ObjSkillTable.Rows[0]);
        }
        //throw new Exception(ActualTable.Columns.Count.ToString());
        GridViewSkills.DataSource = ActualTable;
        GridViewSkills.DataBind();
    }