private void FillGrid()
    {
        DataTable dtBrand = objAddressM.GetAddressAllData(StrCompId);

        lblTotalRecords.Text  = Resources.Attendance.Total_Records + " : " + dtBrand.Rows.Count + "";
        Session["dtCurrency"] = dtBrand;
        Session["dtFilter"]   = dtBrand;
        if (dtBrand != null && dtBrand.Rows.Count > 0)
        {
            GvAddress.DataSource = dtBrand;
            GvAddress.DataBind();
        }
        else
        {
            GvAddress.DataSource = null;
            GvAddress.DataBind();
        }
        lblTotalRecords.Text = Resources.Attendance.Total_Records + " : " + dtBrand.Rows.Count.ToString() + "";
        AllPageCode();
    }
Esempio n. 2
0
    public static string[] GetCompletionListAddressName(string prefixText, int count, string contextKey)
    {
        Set_AddressMaster AddressN = new Set_AddressMaster();
        DataTable         dt       = AddressN.GetDistinctAddressName(HttpContext.Current.Session["CompId"].ToString(), prefixText);



        string[] str = new string[dt.Rows.Count];
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                str[i] = dt.Rows[i]["Address_Name"].ToString();
            }
        }
        else
        {
            if (prefixText.Length > 2)
            {
                str = null;
            }
            else
            {
                dt = AddressN.GetAddressAllData(HttpContext.Current.Session["CompId"].ToString());
                if (dt.Rows.Count > 0)
                {
                    str = new string[dt.Rows.Count];
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        str[i] = dt.Rows[i]["Address_Name"].ToString();
                    }
                }
            }
        }
        return(str);
    }