示例#1
0
        public void LVTaskDetail_SelectedItemChanged(object sender, SelectionChangedEventArgs e)
        {
            TaskInfoDetail focuseitem = LVTaskDetail.SelectedItem as TaskInfoDetail;

            recorditem                            = new RecordInfoItem();
            recorditem.VoiceIP                    = focuseitem.VoiceIP;
            recorditem.RecordReference            = focuseitem.RecoredReference.ToString();
            recorditem.EncryptFlag                = focuseitem.EncryptFlag;
            recorditem.MediaType                  = focuseitem.MediaType;
            recorditem.RecordInfo                 = new RecordInfo();
            recorditem.RecordInfo.EncryptFlag     = focuseitem.EncryptFlag;
            recorditem.RecordInfo.MediaType       = focuseitem.MediaType;
            recorditem.RecordInfo.RecordReference = focuseitem.RecoredReference.ToString();
            recorditem.RecordInfo.VoiceIP         = focuseitem.VoiceIP;
            recorditem.RecordInfo.ChannelID       = focuseitem.ChannelID;
            recorditem.RecordInfo.WaveFormat      = focuseitem.WaveFormat;
            recorditem.RecordInfo.StartRecordTime = focuseitem.StartRecordTime;
            recorditem.RecordInfo.SerialID        = focuseitem.RecoredReference;
            recorditem.RecordInfo.RowID           = focuseitem.RowID;

            WebRequest webRequest = new WebRequest();

            webRequest.Code    = (int)S3103Codes.GetRecordHistoryOpt;
            webRequest.Session = CurrentApp.Session;
            webRequest.ListData.Add(recorditem.RecordReference);
            webRequest.ListData.Add(SelectTask.TaskType.ToString());
            //Service31031Client client = new Service31031Client();
            Service31031Client client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031"));
            //WebHelper.SetServiceClient(client);
            WebReturn webReturn = client.UMPTaskOperation(webRequest);

            client.Close();
            recordOptHistory = webReturn.Data;
            //有查看分数权限 && 记录有分数
            if (focuseitem.TaskScore != null && S3103App.ListOperationInfos.Where(p => p.ID == S3103Consts.OPT_VIEWSCORE).ToList().Count > 0)
            {
                mScore = false;
                //没有查看按钮
                if (mListBasicOperations.Where(p => p.ID == 3103018).ToList().Count == 0)
                {
                    mShowViewScore = true;
                    CreateOperationButton();
                }
            }
            else
            {
                mScore         = true;
                mShowViewScore = false;
                CreateOperationButton();
            }
        }
示例#2
0
        /// Author           : Luoyihua
        ///  Created          : 2015-01-13 09:34:43
        /// <summary>
        /// Removes the task record.
        /// </summary>
        /// <param name="selrecord">The selrecord.</param>
        private void RemoveTaskRecord(string RecordList, int Dnum, int recordLength)
        {
            TaskInfoDetail item = LVTaskDetail.SelectedItem as TaskInfoDetail;

            try
            {
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3103Codes.DeleteRecordFromTask;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(RecordList);
                webRequest.ListData.Add((ListCurrentTaskDetail.Count - Dnum).ToString());            //当前任务中录音数量
                webRequest.ListData.Add(item.TaskID.ToString());
                webRequest.ListData.Add(SelectTask.AlreadyScoreNum.ToString());                      //当前任务中已评分数量
                webRequest.ListData.Add((SelectTask.TaskAllRecordLength - recordLength).ToString()); //当前任务中录音总时长
                //Service31031Client client = new Service31031Client();
                Service31031Client client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031"));
                //WebHelper.SetServiceClient(client);
                WebReturn webReturn = client.UMPTaskOperation(webRequest);
                client.Close();
                if (!webReturn.Result)
                {
                    CurrentApp.WriteOperationLog(S3103Consts.OPT_REMOVETASKRECORD.ToString(), ConstValue.OPT_RESULT_FAIL, "");
                    ShowException(string.Format("{0}.\t{1}\t{2}", CurrentApp.GetLanguageInfo("3103T00043", "Operation Field."), webReturn.Code, webReturn.Message));
                    return;
                }
                else
                {
                    #region 写操作日志
                    string strLog = string.Format("{0} {1}", Utils.FormatOptLogString("3103T00001"), SelectTask.TaskName);
                    strLog += string.Format("{0} {1}", Utils.FormatOptLogString("3103T00025"), RecordList);
                    CurrentApp.WriteOperationLog(S3103Consts.OPT_REMOVETASKRECORD.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog);
                    CurrentApp.WriteLog("DeleteTaskRecord", string.Format("{0} \t OldTaskCount {1} \t DeleteCount {2} \t NowTaskCount {3}", strLog, ListCurrentTaskDetail.Count, Dnum, ListCurrentTaskDetail.Count - Dnum));
                    #endregion
                    ShowInformation(CurrentApp.GetLanguageInfo("3103T00042", "Operation Succeed."));
                    SelectTask.AssignNum = ListCurrentTaskDetail.Count - Dnum;
                    InitTaskDetail();
                }
            }
            catch (Exception ex)
            {
                ShowException(string.Format("{0}.\t{0}", CurrentApp.GetLanguageInfo("3103T00043", "Operation Field."), ex.Message));
            }
        }
示例#3
0
 /// Author           : Luoyihua
 ///  Created          : 2014-11-06 16:46:002
 /// <summary>
 /// 选择评分表
 /// </summary>
 private void TaskDetailOptScore()
 {
     currentSelRecord = (TaskInfoDetail)LVTaskDetail.SelectedItem;
     if (currentSelRecord != null)
     {
         PopupPanel.Title = CurrentApp.GetLanguageInfo("3103T00044", "Choose Scoring Template");
         TemplateSelect popSelTemplate = new TemplateSelect();
         popSelTemplate.CurrentApp    = CurrentApp;
         popSelTemplate.ParentPage    = this;
         popSelTemplate.selTaskRecord = currentSelRecord;
         popSelTemplate.LoadUserScoreSheetList();
         if (popSelTemplate.mListScoreSheetItems.Count() == 1)
         {
             popSelTemplate.LoadUserScoreResultList();
             ScoreTaskRecord(popSelTemplate.mListScoreSheetItems[0]);
         }
         else
         {
             PopupPanel.Content = popSelTemplate;
             PopupPanel.IsOpen  = true;
         }
     }
 }
示例#4
0
        /// <summary>
        /// 加载当前任务的任务详情
        /// </summary>
        public void InitTaskDetail()
        {
            try
            {
                try
                {
                    ListCurrentTaskDetail.Clear();
                }
                catch { }
                string isSeptable = "0";//0:不分表  1:分表
                var    tableInfo  =
                    CurrentApp.Session.ListPartitionTables.FirstOrDefault(
                        t => t.TableName == ConstValue.TABLE_NAME_RECORD && t.PartType == TablePartType.DatetimeRange);
                if (tableInfo != null)
                {
                    isSeptable = "1";
                }
                string tempStr = string.Empty;
                //判斷當前任務類型
                if (SelectTask.TaskType == 1 || SelectTask.TaskType == 2)
                {
                    tempStr = string.Format("T08.C010='3' OR T08.C010='4'");
                }
                if (SelectTask.TaskType == 3 || SelectTask.TaskType == 4)
                {
                    tempStr = string.Format("T08.C010='5' OR T08.C010='6'");
                }

                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3103Codes.GetTaskRecordByTaskID;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(SelectTask.TaskID.ToString());
                webRequest.ListData.Add(SelectTask.TaskName);
                webRequest.ListData.Add(isSeptable);
                webRequest.ListData.Add(tempStr);//任務類型
                //Service31031Client client = new Service31031Client();
                Service31031Client client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031"));
                //WebHelper.SetServiceClient(client);
                WebReturn webReturn = client.UMPTaskOperation(webRequest);
                client.Close();
                if (!webReturn.Result)
                {
                    ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
                    return;
                }
                if (webReturn.ListData.Count > 0)
                {
                    for (int i = 0; i < webReturn.ListData.Count; i++)
                    {
                        OperationReturn optReturn = XMLHelper.DeserializeObject <TaskInfoDetail>(webReturn.ListData[i]);
                        if (!optReturn.Result)
                        {
                            ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                            return;
                        }
                        TaskInfoDetail taskdetail = optReturn.Data as TaskInfoDetail;
                        if (taskdetail != null && !ListCurrentTaskDetail.Contains(taskdetail))
                        {
                            //AllotTypeName:1任务分配过来,2从其它任务移动过来的 3推荐录音 4申诉审批到复检
                            taskdetail.AllotTypeName = GetAllotTypeName(taskdetail.AllotType);
                            taskdetail.IsLock        = taskdetail.IsLock == "Y" ? CurrentApp.GetLanguageInfo("3103T00022", "Yes") : CurrentApp.GetLanguageInfo("3103T00023", "No");
                            taskdetail.strDirection  = taskdetail.Direction == 1 ? CurrentApp.GetLanguageInfo("3103T00089", "Call In") : CurrentApp.GetLanguageInfo("3103T00090", "Call Out");
                            taskdetail.CalledID      = S3103App.DecryptString(taskdetail.CalledID);
                            taskdetail.CallerID      = S3103App.DecryptString(taskdetail.CallerID);
                            if (string.IsNullOrWhiteSpace(taskdetail.AgtOrExtID))
                            {
                                taskdetail.AgtOrExtID = AgentAndUserFullName(taskdetail.AgtOrExtName, 1);
                            }
                            taskdetail.AgentFullName = AgentAndUserFullName(taskdetail.AgtOrExtID, 0);
                            ListCurrentTaskDetail.Add(taskdetail);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }