private void FillGrid() { DataTable dtBrand = objDesg.GetClassMaster(Session["CompId"].ToString().ToString()); lblTotalRecords.Text = Resources.Attendance.Total_Records + ": " + dtBrand.Rows.Count + ""; Session["dtClass"] = dtBrand; Session["dtFilter"] = dtBrand; if (dtBrand != null && dtBrand.Rows.Count > 0) { GvClass.DataSource = dtBrand; GvClass.DataBind(); AllPageCode(); } else { GvClass.DataSource = null; GvClass.DataBind(); } }
public static string[] GetCompletionListClass(string prefixText, int count, string contextKey) { ClassMaster objClass = new ClassMaster(); DataTable dt = new DataView(objClass.GetClassMaster(HttpContext.Current.Session["CompId"].ToString()), "Class like '" + prefixText.ToString() + "%'", "", DataViewRowState.CurrentRows).ToTable(); string[] txt = new string[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { txt[i] = dt.Rows[i]["Class"].ToString(); } return(txt); }