示例#1
0
        //判断员工编号是否正确
        public ActionResult Authenticate(string employeeId)
        {
            var r = new LoginResult();

            r.EventAuthenticated = ProcBLL.Proc_PersonExists(employeeId) == 1;
            if (!r.EventAuthenticated)
            {
                r.ErrorMessage = "没有找到员工编号";
            }
            return(Jsonp(r, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        //获取员工坐席信息
        public ActionResult GetAgentInfo(string employee_id)
        {
            var r     = new InitInfoVM();
            var agent = ProcBLL.Proc_GetPersonAgentInfo(employee_id);

            if (agent == null)
            {
                r.ErrCode    = -1;
                r.ErrMessage = "没有找到对应的员工。";
            }
            else
            {
                r.Person.AgentInfo.IsInitAgentInfo = true;

                r.Person.DN         = "";
                r.Person.Place      = "";
                r.Person.DBID       = agent.person_dbid.Value;
                r.Person.EmployeeID = agent.employee_id;
                r.Person.FirstName  = agent.first_name;
                r.Person.UserName   = agent.user_name;
                r.Person.LoginCode  = agent.login_code;

                r.Person.CHAT  = agent.chat.Value;
                r.Person.VOICE = 1;

                r.Person.AgentInfo.AgentLogins.Add(new AgentLogin()
                {
                    DBID      = agent.login_dbid.Value,
                    LoginCode = agent.login_code
                });

                var skillLevels = ProcBLL.Proc_GetPersonSkills(r.Person.DBID);
                foreach (var item in skillLevels)
                {
                    r.Person.AgentInfo.SkillLevels.Add(new SkillLevel()
                    {
                        DBID = item.skill_dbid.Value, Level = item.level.Value
                    });
                }

                r.DN    = "";
                r.Place = "";

                r.AgentID     = agent.login_code;
                r.FirstName   = agent.first_name;
                r.EmployeeID  = agent.employee_id;
                r.EnableVoice = r.Person.VOICE > 0;
                r.EnableChat  = r.Person.CHAT > 0;
            }
            return(Jsonp(r, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        public ActionResult GetChatRightEnterID(int enterID, string machineNo)
        {
            AjaxReturn r = new AjaxReturn();

            try
            {
                if (!string.IsNullOrEmpty(machineNo))
                {
                    r.d = ProcBLL.Proc_GetChatRightEnterID(enterID, machineNo);
                }
                else
                {
                    r.SetError("machineNo是必须的");
                }
            }
            catch (Exception ex)
            {
                r.SetError(ex.Message);
            }
            return(Json(r, JsonRequestBehavior.AllowGet));
        }
        protected void BindUsers()
        {
            Dictionary <string, int> selectedIDs = new Dictionary <string, int>();
            string employeeID = this.txtUserID.Text.Trim();

            if (!string.IsNullOrEmpty(this.PrimaryValue))
            {
                ddlRole.Enabled            = false;
                this.ddlRole.SelectedValue = this.PrimaryValue;
                selectedIDs = SPhone_UserPermissionBLL.GetSelectedIDs(new Guid(this.PrimaryValue));
            }


            listUsers.DataSource = ProcBLL.Proc_GetCfgAdmin().Select(x => x.employee_id).ToList();
            listUsers.DataBind();

            foreach (ListItem item in listUsers.Items)
            {
                if (selectedIDs.ContainsKey(item.Value))
                {
                    item.Selected = true;
                }
            }
        }
示例#5
0
        public ActionResult ProcessAgentStatus(string logID, string employeeID, Nullable <int> typeID, Nullable <int> insertOrUpdate)
        {
            var r = ProcBLL.Proc_AgentStatusChangeLog(logID, employeeID, typeID, insertOrUpdate);

            return(Jsonp(r, JsonRequestBehavior.AllowGet));
        }