Example #1
0
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        DMFlatTypeMaster Obj_FlatType = new DMFlatTypeMaster();

        string[] SearchList = Obj_FlatType.GetSuggestRecord(prefixText);
        return(SearchList);
    }
Example #2
0
    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);
                    LinkButton lnk = (LinkButton)e.Item.FindControl("lbtn_List");
                    Label      lbl = (Label)e.Item.FindControl("lblUsedCnt");
                    if (lnk != null)
                    {
                        hdnFldUsedCnt.Value = lbl.Text;
                    }
                    DS = Obj_FlatType.GetFlatTypeForEdit(Convert.ToInt32(e.CommandArgument), out StrError);
                    if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
                    {
                        txtFlatType.Text = DS.Tables[0].Rows[0]["FlatType"].ToString();
                    }
                    else
                    {
                        MakeEmptyForm();
                    }
                    DS              = null;
                    Obj_FlatType    = null;
                    BtnSave.Visible = false;
                    if (!FlagEdit)
                    {
                        BtnUpdate.Visible = true;
                    }
                    if (!FlagDel)
                    {
                        BtnDelete.Visible = true;
                    }
                    txtFlatType.Focus();
                }

                break;
            }
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
Example #3
0
    private void ReportGrid(string RepCondition)
    {
        try
        {
            DS = Obj_FlatType.GetFlatTypeList(RepCondition, out StrError);

            if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
            {
                GrdReport.DataSource = DS;
                GrdReport.DataBind();
            }
            else
            {
                GrdReport.DataSource = null;
                GrdReport.DataBind();
            }
            Obj_FlatType = null;
            DS           = null;
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }