Exemple #1
0
        public string[] GetAdviserCustomerName(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.GetAdviserCustomerName(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);
            }
            return(names.ToArray());
        }
Exemple #2
0
        protected void rbnIndivisual_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.GetAllRMMemberCustomerName("BULKMAIL", int.Parse(rmVo.RMId.ToString()));
            }
            else if (Session[SessionContents.CurrentUserRole].ToString() == "Admin")
            {
                dtIndiviCustomerList = customerBo.GetAdviserCustomerName("BULKMAIL", int.Parse(advisorVo.advisorId.ToString()));
            }


            LBCustomer.DataSource     = dtIndiviCustomerList;
            LBCustomer.DataTextField  = "C_FirstName";
            LBCustomer.DataValueField = "C_CustomerId";
            LBCustomer.DataBind();
            tabViewAndEmailReports.ActiveTabIndex = activeTabIndex;
        }