Hi,
dtbl = SPEmployee.Details(DateTime.Today);
for (int i = 0; i < cbxEmployeeAll.Items.Count; i++)
{
if (cbxEmployeeAll.Items[i].Selected == true)
{
infoPerformanceJudge.JudgeId = SPPerformanceJudge.PerformanceJudgeGetMax();
infoPerformanceJudge.Empcode = cbxEmployeeAll.Items[i].Value;
infoPerformanceJudge.Description = "";
infoPerformanceJudge.Status = true;
infoPerformanceJudge.Extra2 = "";
SPPerformanceJudge.PerformanceJudgeAdd(infoPerformanceJudge);
lblMessage.Visible = true;
lblMessage.ForeColor = Color.Green;
lblMessage.Text = "Saved successfully";
}
}
For View details,
foreach (DataRow drow in dtbl.Rows)
{
foreach (ListItem lstitem in cbxEmployeeAll.Items)
{
if (lstitem.Value == drow.ItemArray[1].ToString())
{
lstitem.Selected = true;
}
}
}