Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TFN = long.Parse(Request.QueryString["TFN"] ?? "0");

            if (!IsPostBack)
            {
                if (TFN > 0)
                {
                    txtQ.DataValueField = "dbid";
                    txtQ.DataTextField  = "name";
                    txtQ.DataSource     = GenesysBLL.Proc_GetCfgSkill().ToList();
                    txtQ.DataBind();

                    var currentQS = dc.SPhone_TFNQueueRel.Where(x => x.TFNID == TFN).Select(x => x.QueueID).ToList();

                    foreach (ListItem item in txtQ.Items)
                    {
                        if (currentQS.Contains(long.Parse(item.Value)))
                        {
                            item.Enabled = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void BindSkills(string skillName)
        {
            var query = GenesysBLL.Proc_GetCfgSkill().ToList();

            this.listSkills.DataSource = query;
            this.listSkills.DataBind();

            if (!string.IsNullOrEmpty(skillName))
            {
                listSkills.Items.Insert(0, new ListItem()
                {
                    Value = "", Text = "--请选择--"
                });
                listSkills.SelectionMode = ListSelectionMode.Single;
                foreach (ListItem item in listSkills.Items)
                {
                    if (item.Text == skillName)
                    {
                        item.Selected = true;
                    }
                }
            }
        }