Exemple #1
0
        public string[] GetMemberCustomerName(string prefixText, int count, string contextKey)
        {
            CustomerBo    customerBo     = new CustomerBo();
            DataTable     dtCustomerName = new DataTable();
            int           i     = 0;
            List <string> names = new List <string>();

            dtCustomerName = customerBo.GetMemberCustomerName(prefixText, int.Parse(contextKey));
            //string[] customerNameList = new string[dtCustomerName.Rows.Count];

            foreach (DataRow dr in dtCustomerName.Rows)
            {
                string item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr["C_FirstName"].ToString(), dr["C_CustomerId"].ToString());
                names.Add(item);

                //customerNameList[i] = dr["C_FirstName"].ToString() + "|" + dr["C_PANNum"].ToString();
                //i++;
            }
            return(names.ToArray());
        }
Exemple #2
0
        protected void rbnAllCustomer_CheckedChanged(object sender, EventArgs e)
        {
            LBSelectCustomer.Items.Clear();
            LBCustomer.Items.Clear();
            CustomerBo customerBo           = new CustomerBo();
            DataTable  dtIndiviCustomerList = new DataTable();

            if (Session[SessionContents.CurrentUserRole].ToString() == "RM")
            {
                dtIndiviCustomerList = customerBo.GetMemberCustomerName("BULKMAIL", int.Parse(rmVo.RMId.ToString()));
            }
            else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin")
            {
                dtIndiviCustomerList = customerBo.GetAllCustomerName("BULKMAIL", int.Parse(advisorVo.advisorId.ToString()));
            }
            LBCustomer.DataSource     = dtIndiviCustomerList;
            LBCustomer.DataTextField  = "C_FirstName";
            LBCustomer.DataValueField = "C_CustomerId";
            LBCustomer.DataBind();
            tabViewAndEmailReports.ActiveTabIndex = activeTabIndex;
        }