public void SelectEmplnfo() { List <BLLEmployeeInfo> objlist = new List <BLLEmployeeInfo>(); BLLEmployeeInfo objbll = new BLLEmployeeInfo(); objlist = objbll.SelectEmployeeInfo(); if (objlist.Count > 0) { dgteacherinfo.DataSource = objlist; dgteacherinfo.DataBind(); for (int i = 0; i <= dgteacherinfo.Rows.Count - 1; i++) { string update = (string)Session["update"]; string delete = (string)Session["delete"]; if (update == "yes") { dgteacherinfo.Rows[i].Cells[1].Enabled = true; } else { dgteacherinfo.Rows[i].Cells[1].Enabled = false; } if (delete == "yes") { dgteacherinfo.Rows[i].Cells[2].Enabled = true; } else { dgteacherinfo.Rows[i].Cells[2].Enabled = false; } } } }
public void SelectEmpcode() { List <BLLEmployeeInfo> objlist = new List <BLLEmployeeInfo>(); BLLEmployeeInfo objbll = new BLLEmployeeInfo(); objlist = objbll.SelectEmployeeInfo(); if (objlist.Count > 0) { cbemployeecode.DataSource = objlist; cbemployeecode.ValueField = "emp_code"; cbemployeecode.TextField = "emp_code"; cbemployeecode.DataBind(); } }