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

        string[] SearchList = Obj_P.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_PR.GetPropertySubTypeForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                    if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                    {
                        TxtPropertySubType.Text       = DS.Tables[0].Rows[0]["PropertySubTypeDesc"].ToString();
                        ddlPropertyType.SelectedValue = DS.Tables[0].Rows[0]["PropertyTypeId"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    DS     = null;
                    Obj_PR = null;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    BtnSave.Visible = false;
                    if (!FlagDel)
                    {
                        BtnDelete.Visible = true;
                    }
                    TxtPropertySubType.Focus();
                }

                break;
            }
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
 private void GetEditRecord()
 {
     if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
     {
         TxtPropertySubType.Text       = DS.Tables[0].Rows[0]["PropertySubTypeDesc"].ToString();
         ddlPropertyType.SelectedValue = DS.Tables[0].Rows[0]["PropertyTypeId"].ToString();
     }
     else
     {
         MakeEmptyForm();
     }
     DS     = null;
     Obj_PR = null;
     if (!FlagEdit)
     {
         BtnUpdate.Visible = true;
     }
     BtnSave.Visible = false;
     if (!FlagDel)
     {
         BtnDelete.Visible = true;
     }
     TxtPropertySubType.Focus();
 }
    public void ReportGrid(string RepCondition)
    {
        try
        {
            DS = Obj_PR.GetPropertySubType(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();
            }
            Obj_PR = null;
            DS     = null;
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }