public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMSubCategory Obj_IS = new DMSubCategory();

        string[] SearchList = Obj_IS.GetSuggestRecord(prefixText);
        return(SearchList);
    }
 protected void GrdReport_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         switch (e.CommandName)
         {
         case ("Select"):
         {
             if (Convert.ToInt32(e.CommandArgument) != 0)
             {
                 ViewState["EditID"] = Convert.ToInt32(e.CommandArgument);
                 DS = Obj_IS.GetSubCategoryForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                 if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                 {
                     TxtItemSubCat.Text        = DS.Tables[0].Rows[0]["SubCategory"].ToString();
                     ddlCategory.SelectedValue = DS.Tables[0].Rows[0]["CategoryID"].ToString();
                     txtRemark.Text            = DS.Tables[0].Rows[0]["Remark"].ToString();
                 }
                 else
                 {
                     MakeEmptyForm();
                 }
                 DS     = null;
                 Obj_IS = null;
                 if (!FlagEdit)
                 {
                     BtnUpdate.Visible = true;
                 }
                 BtnSave.Visible = false;
                 if (!FlagDel)
                 {
                     BtnDelete.Visible = true;
                 }
                 TxtItemSubCat.Focus();
             }
             break;
         }
         }
     }
     catch (Exception ex)
     {
         StrError = ex.Message;
     }
 }
 public void ReportGrid(string RepCondition)
 {
     try
     {
         DS = Obj_IS.GetSubCategory(RepCondition, out StrError);
         if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
         {
             GrdReport.DataSource = DS.Tables[0];
             GrdReport.DataBind();
         }
         else
         {
             GrdReport.DataSource = null;
             GrdReport.DataBind();
         }
         if (DS.Tables.Count > 0 && DS.Tables[1].Rows.Count > 0)
         {
             ddlCategory.DataSource     = DS.Tables[1];
             ddlCategory.DataValueField = "CategoryId";
             ddlCategory.DataTextField  = "CategoryName";
             ddlCategory.DataBind();
         }
         else
         {
             ddlCategory.DataSource = null;
             ddlCategory.DataBind();
         }
         ddlCategory.SelectedIndex = 0;
         Obj_IS = null;
         DS     = null;
     }
     catch (Exception ex)
     {
         StrError = ex.Message;
     }
 }