private void FillGrid() { DataTable dtBrand = objDesg.GetPostMaster(Session["CompId"].ToString().ToString()); lblTotalRecords.Text = Resources.Attendance.Total_Records + ": " + dtBrand.Rows.Count + ""; Session["dtPost"] = dtBrand; Session["dtFilter"] = dtBrand; if (dtBrand != null && dtBrand.Rows.Count > 0) { GvPost.DataSource = dtBrand; GvPost.DataBind(); AllPageCode(); } else { GvPost.DataSource = null; GvPost.DataBind(); } }
public static string[] GetCompletionListPost(string prefixText, int count, string contextKey) { PostMaster objPost = new PostMaster(); DataTable dt = new DataView(objPost.GetPostMaster(HttpContext.Current.Session["CompId"].ToString()), "Post 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]["Post"].ToString(); } return(txt); }