public void SelectNotification() { List <BLLNotice> objlist = new List <BLLNotice>(); BLLNotice objbll = new BLLNotice(); objlist = objbll.SelectNotification(); if (objlist.Count > 0) { dgnotification.DataSource = objlist; dgnotification.DataBind(); for (int i = 0; i <= dgnotification.Rows.Count - 1; i++) { string update = (string)Session["update"]; string delete = (string)Session["delete"]; if (update == "yes") { dgnotification.Rows[i].Cells[1].Enabled = true; } else { dgnotification.Rows[i].Cells[1].Enabled = false; } if (delete == "yes") { dgnotification.Rows[i].Cells[2].Enabled = true; } else { dgnotification.Rows[i].Cells[2].Enabled = false; } } } }
public void SelectNotification() { List <BLLNotice> objlist = new List <BLLNotice>(); BLLNotice objbll = new BLLNotice(); objlist = objbll.SelectNotification(); if (objlist.Count > 0) { dgtnotification.DataSource = objlist; dgtnotification.DataBind(); } }