Ejemplo n.º 1
0
 private void UpdateTable19()
 {
     try
     {
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S3105Codes.UpdateTable19;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add(SelCheckData.AppealDetailID);//AppealDetailID
         if (rbtnAccept.IsChecked == true)
         {
             webRequest.ListData.Add("4"); //C009
             webRequest.ListData.Add("2"); //C008
         }
         else
         {
             webRequest.ListData.Add("3"); //C009
             webRequest.ListData.Add("2"); //C008
             webRequest.ListData.Add("Y"); //C010
         }
         Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         WebReturn          webReturn = client.UMPTaskOperation(webRequest);
         client.Close();
         if (!webReturn.Result)
         {
             ShowException(CurrentApp.GetLanguageInfo("3105T00103", "Update Defeated"));
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void LoadUserScoreSheetList()
 {
     try
     {
         mListScoreSheetItems = new List <BasicScoreSheetItem>();
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S3105Codes.GetUserScoreSheetList;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add(selTaskRecord.RecoredReference.ToString());
         webRequest.ListData.Add(ParentPage.AgentID);
         webRequest.ListData.Add("0");
         Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                            WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         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 == null || webReturn.ListData.Count == 0)
         {
             ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
             return;
         }
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             string          strInfo   = webReturn.ListData[i];
             OperationReturn optReturn = XMLHelper.DeserializeObject <BasicScoreSheetInfo>(strInfo);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 return;
             }
             BasicScoreSheetInfo info = optReturn.Data as BasicScoreSheetInfo;
             if (info == null)
             {
                 ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                 return;
             }
             BasicScoreSheetItem item = new BasicScoreSheetItem(info);
             item.RowNumber  = i + 1;
             item.Background = GetScoreSheetBackground(item);
             //控制唯一評分表 2016年6月7日 16:37:47 目前修改:列出所有可用评分表,但是提示打分被申诉所用的那张评分表
             if (item.ScoreSheetID == Convert.ToInt64(selTaskRecord.TemplateID))
             {
                 item.Title = string.Format("({0})", CurrentApp.GetLanguageInfo("", "Last Score")) + item.Title;
             }
             mListScoreSheetItems.Add(item);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 3
0
 private void LoadUserScoreResultList()
 {
     try
     {
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S3105Codes.GetUserScoreSheetList;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add(selTaskRecord.RecoredReference.ToString());
         //webRequest.ListData.Add(CurrentApp.Session.UserID.ToString());
         webRequest.ListData.Add(selTaskRecord.AgentID);
         webRequest.ListData.Add("1");
         Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                            WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         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 == null)
         {
             ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
             return;
         }
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             string          strInfo   = webReturn.ListData[i];
             OperationReturn optReturn = XMLHelper.DeserializeObject <BasicScoreSheetInfo>(strInfo);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 return;
             }
             BasicScoreSheetInfo info = optReturn.Data as BasicScoreSheetInfo;
             if (info == null)
             {
                 ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                 return;
             }
             BasicScoreSheetItem item =
                 mListScoreSheetItems.FirstOrDefault(s => s.ScoreSheetID == info.ScoreSheetID);
             if (item != null)
             {
                 item.ScoreSheetInfo = info;
                 item.ScoreResultID  = info.ScoreResultID;
                 item.Score          = info.Score;
                 item.Flag           = 1;
             }
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 4
0
 private void ShowAppealData()
 {
     if (SelCheckData != null)
     {
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S3105Codes.GetCheckAndReCheckData;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add(SelCheckData.AppealDetailID.ToString());
         webRequest.ListData.Add("1,2,3,4");
         Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                            WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         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 <CAppeaDetail>(webReturn.ListData[i]);
                 if (!optReturn.Result)
                 {
                     ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                     return;
                 }
                 CAppeaDetail taskdetail = optReturn.Data as CAppeaDetail;
                 if (taskdetail != null)
                 {
                     if (taskdetail.ActionID == "1" || taskdetail.ActionID == "2")
                     {
                         ListCAppeaDetails.Add(taskdetail);
                     }
                     else
                     {
                         ListCCheckDetails.Add(taskdetail);
                     }
                 }
             }
             if (ListCAppeaDetails.Count > 0)
             {
                 lbuseranddate.Content     = SelCheckData.AgentName;
                 txtShowAppealContent.Text = ListCAppeaDetails[0].Note;
             }
             if (ListCCheckDetails.Count > 0)
             {
                 lbchuseranddate.Content = ListCCheckDetails[0].OperationerName;
                 txtCheckDisContent.Text = ListCCheckDetails[0].Note;
             }
         }
     }
 }
Ejemplo n.º 5
0
 // 獲取座席、用戶名
 private void GetAuInfoLists()
 {
     try
     {
         mListAuInfoItems = new ObservableCollection <AgentAndUserInfoItems>();
         WebRequest webRequest = new WebRequest();
         webRequest.Session = CurrentApp.Session;
         webRequest.Code    = (int)S3105Codes.GetAuInfoList;
         webRequest.ListData.Add("11");
         //Service31051Client client = new Service31051Client();
         Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         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 == null)
         {
             ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
             return;
         }
         if (webReturn.ListData.Count <= 0)
         {
             return;
         }
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             OperationReturn optReturn = XMLHelper.DeserializeObject <AgentAndUserInfoList>(webReturn.ListData[i]);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 continue;
             }
             AgentAndUserInfoList auInfoList = optReturn.Data as AgentAndUserInfoList;
             if (auInfoList == null)
             {
                 return;
             }
             AgentAndUserInfoItems item = new AgentAndUserInfoItems(auInfoList);
             mListAuInfoItems.Add(item);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 6
0
        private string GetNewScore(CCheckData tempData)
        {
            string result = string.Empty;

            if (tempData.AppealInt != 6 || string.IsNullOrWhiteSpace(tempData.RecoredReference) || string.IsNullOrWhiteSpace(tempData.TemplateID))
            {
                return(string.Empty);
            }
            try
            {
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3105Codes.GetNewScore;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(tempData.RecoredReference);
                webRequest.ListData.Add(tempData.TemplateID);
                Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                //Service31051Client client = new Service31051Client();
                WebReturn webReturn = client.UMPTaskOperation(webRequest);
                client.Close();
                if (!webReturn.Result)
                {
                    //ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
                    return(string.Empty);
                }
                if (!string.IsNullOrWhiteSpace(webReturn.Data))
                {
                    result = webReturn.Data;
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
                return(string.Empty);
            }
            return(result);
        }
Ejemplo n.º 7
0
        public string UpdateReCheckData(string action, string AppealFlowItemID, CCheckData SelCheckData)
        {
            string error = string.Empty;

            try
            {
                string     opttime    = DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3105Codes.SubmitCheckData;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(SelCheckData.AppealDetailID);          //AppealDetailID   0
                webRequest.ListData.Add(SelCheckData.AppealFlowID);            //AppealFlowID       1
                webRequest.ListData.Add(AppealFlowItemID);                     //AppealFlowItemID        2
                webRequest.ListData.Add(txtReCheckDisContent.Text);            //Note       3
                webRequest.ListData.Add(action);                               //ActionID 5审批通过不修改分数,6审批通过重新评分,7审批驳回       5
                webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); //OperationerID      5
                webRequest.ListData.Add(opttime);                              //操作时间     6
                webRequest.ListData.Add(SelCheckData.ScoreResultID);           //T_31_008成績IDC001      7
                webRequest.ListData.Add(SelCheckData.RecoredReference);        //錄音流水號ID        8
                webRequest.ListData.Add(SelCheckData.ScoreType);               //評分成績來源        9
                webRequest.ListData.Add("0");                                  //新的評分成績ID        10
                //Service31051Client client = new Service31051Client();
                Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                WebReturn          webReturn = client.UMPTaskOperation(webRequest);
                client.Close();
                string actiondetail = "";
                switch (action)
                {
                case "5":
                    actiondetail = "3105T00026";
                    break;

                case "6":
                    actiondetail = "3105T00027";
                    break;

                case "7":
                    actiondetail = "3105T00019";
                    break;
                }
                if (!webReturn.Result)
                {
                    #region 写操作日志
                    CurrentApp.WriteOperationLog(S3105Consts.OPT_Approval.ToString(), ConstValue.OPT_RESULT_FAIL, "");
                    #endregion

                    ShowException(string.Format("{0}.\t{1}\t{2}",
                                                CurrentApp.GetLanguageInfo("3105T00023", "Operation Field."), webReturn.Code, webReturn.Message));
                    return(error);
                }
                else
                {
                    #region 写操作日志
                    string strLog = string.Format("{0} {1}", Utils.FormatOptLogString(actiondetail), SelCheckData.RecoredReference);
                    CurrentApp.WriteOperationLog(S3105Consts.OPT_Approval.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog);
                    #endregion
                    //ParentPage.BindData();
                    //ParentPage.ShowProcessReCheck(false);
                    //ShowInformation(CurrentApp.GetLanguageInfo("3105T00022", "Operation Succeed."));
                }
            }
            catch (Exception ex)
            {
                error = ex.Message;
            }
            return(error);
        }
Ejemplo n.º 8
0
        public void ReviewHistory()
        {
            string deptids = string.Empty;

            if (S3105App.lsAgentInfos.Count > 0)
            {
                deptids = SaveMultiAgent(S3105App.lsAgentInfos);
                deptids = string.Format("SELECT C011  FROM T_00_901 WHERE C001={0}", deptids);
            }
            if (deptids == "")
            {
                return;
            }
            InitReviewedColumns();
            ListReviewHistoryDatas.Clear();
            try
            {
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3105Codes.GetAppealProcessHistory;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(deptids);
                webRequest.ListData.Add("3,4");
                Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                //Service31051Client client = new Service31051Client();
                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 <CCheckData>(webReturn.ListData[i]);
                        if (!optReturn.Result)
                        {
                            ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                            return;
                        }
                        CCheckData taskdetail = optReturn.Data as CCheckData;
                        if (taskdetail != null && !ListReviewHistoryDatas.Contains(taskdetail))
                        {
                            var curentagent = S3105App.ListCtrolAgentInfos.Where(p => p.AgentID == taskdetail.AgentID).ToList();
                            if (curentagent.Count > 0)
                            {
                                taskdetail.AgentName = curentagent.First().AgentName;
                            }
                            else
                            {
                                taskdetail.AgentName = "";
                            }
                            taskdetail.Score = taskdetail.Score;
                            if (taskdetail.AppealInt != 8)
                            {
                                taskdetail.AppealState =
                                    CurrentApp.GetLanguageInfo(string.Format("3105T000{0}", 77 + taskdetail.AppealInt),
                                                               taskdetail.AppealInt.ToString());
                            }
                            else
                            {
                                taskdetail.AppealState = CurrentApp.GetLanguageInfo("3105T000125", taskdetail.AppealInt.ToString());
                            }
                            ListReviewHistoryDatas.Add(taskdetail);
                        }
                    }
                }
                CurrentApp.WriteLog("ReviewHistorySql", string.Format("{0}", webReturn.Message));
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Ejemplo n.º 9
0
        /// Author           : Luoyihua
        ///  Created          : 2014-12-09 17:02:49
        /// <summary>
        /// Gets the check data by dept i ds.
        /// </summary>
        /// <param name="type">获取数据类型:1:复核数据,2:审批数据,3:无复核过程的审批数据</param>
        /// <param name="strcheck">The strcheck.</param>
        /// <param name="strrecheck">The strrecheck.</param>
        /// <param name="lstdata">The lstdata.</param>
        private void GetCheckDataByDeptIDs(string type, string strcheck, string strrecheck, ObservableCollection <CCheckData> lstdata)
        {
            string deptids = string.Empty;

            if (S3105App.lsAgentInfos.Count > 0)
            {
                deptids = SaveMultiAgent(S3105App.lsAgentInfos);
                deptids = string.Format("SELECT C011  FROM T_00_901 WHERE C001={0}", deptids);
            }
            if (deptids == "")
            {
                return;
            }

            try
            {
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)S3105Codes.GetCheckDatasOrRecheckDatas;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(deptids);
                webRequest.ListData.Add(strcheck);
                webRequest.ListData.Add(strrecheck);
                webRequest.ListData.Add(type);
                Service31051Client client = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                                   WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                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 <CCheckData>(webReturn.ListData[i]);
                        if (!optReturn.Result)
                        {
                            ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                            return;
                        }
                        CCheckData taskdetail = optReturn.Data as CCheckData;
                        if (taskdetail != null && !lstdata.Contains(taskdetail))
                        {
                            var curentagent = S3105App.ListCtrolAgentInfos.Where(p => p.AgentID == taskdetail.AgentID).ToList();
                            if (curentagent.Count > 0)
                            {
                                taskdetail.AgentName = curentagent.First().AgentName;
                            }
                            else
                            {
                                taskdetail.AgentName = "";
                            }
                            taskdetail.Score = taskdetail.Score;
                            lstdata.Add(taskdetail);
                        }
                    }
                }
                CurrentApp.WriteLog("ReviewSql", string.Format("{0}", webReturn.Message));
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Ejemplo n.º 10
0
        private void BtnConfirm_Click(object sender, RoutedEventArgs e)
        {
            if ((rbtnAccept.IsChecked == true || rbtnRejected.IsChecked == true) && !string.IsNullOrWhiteSpace(txtCheckDisContent.Text))
            {
                long lserialid = ((S3105App)CurrentApp).GetSerialID();
                if (lserialid != -1)
                {
                    try
                    {
                        string AppealFlowItemID = lserialid.ToString();
                        string action           = rbtnAccept.IsChecked == true ? "4" : "3";
                        string opttime          = DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");

                        WebRequest webRequest = new WebRequest();
                        webRequest.Code    = (int)S3105Codes.SubmitCheckData;
                        webRequest.Session = CurrentApp.Session;
                        webRequest.ListData.Add(SelCheckData.AppealDetailID);          //AppealDetailID  0
                        webRequest.ListData.Add(SelCheckData.AppealFlowID);            //AppealFlowID   1
                        webRequest.ListData.Add(AppealFlowItemID);                     //AppealFlowItemID    2
                        webRequest.ListData.Add(txtCheckDisContent.Text);              //Note     3
                        webRequest.ListData.Add(action);                               //ActionID 3驳回 4通过   4
                        webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); //OperationerID      5
                        webRequest.ListData.Add(opttime);                              //操作时间     6
                        webRequest.ListData.Add(SelCheckData.ScoreResultID);           //T_31_008成績ID C001     7
                        webRequest.ListData.Add(SelCheckData.RecoredReference);        //錄音流水號ID        8
                        webRequest.ListData.Add(SelCheckData.ScoreType);               //評分成績來源        9
                        webRequest.ListData.Add("0");                                  //新的評分成績ID        10
                        //Service31051Client client = new Service31051Client();
                        Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                        WebReturn          webReturn = client.UMPTaskOperation(webRequest);
                        client.Close();
                        string checkdetail = action == "4" ? "3105T00053" : "3105T00028";
                        if (!webReturn.Result)
                        {
                            #region 写操作日志
                            CurrentApp.WriteOperationLog(S3105Consts.OPT_Review.ToString(), ConstValue.OPT_RESULT_FAIL, "");
                            #endregion
                            ShowException(string.Format("{0}.\t{1}\t{2}", CurrentApp.GetLanguageInfo("3105T00023", "Operation Field."), webReturn.Code, webReturn.Message));
                            return;
                        }
                        else
                        {
                            UpdateTable19();
                            ParentPage.ReviewHistory();
                            #region 写操作日志
                            string strLog = string.Format("{0} {1}", Utils.FormatOptLogString(checkdetail), SelCheckData.RecoredReference);
                            CurrentApp.WriteOperationLog(S3105Consts.OPT_Review.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog);
                            #endregion
                            ShowInformation(CurrentApp.GetLanguageInfo("3105T00022", "Operation Succeed."));
                            ParentPage.BindData();
                            ParentPage.PopupPanel.IsOpen = false;
                        }
                    }
                    catch (Exception ex)
                    {
                        ShowException(string.Format("{0}.\t{0}", CurrentApp.GetLanguageInfo("3105T00023", "Operation Field."), ex.Message));
                    }
                }
            }
            else
            {
                ShowException(CurrentApp.GetLanguageInfo("3105T00021", "Incomplete information"));
            }
        }
Ejemplo n.º 11
0
 /// <summary>
 /// 申诉详情--右側信息欄
 /// </summary>
 private void CreatAppealInfoDetail()
 {
     try
     {
         stkAppealInfo.Children.Clear();
         if (mListAppealInfoItems != null && mListAppealInfoItems.ReferenceID != 0 && mListAppealInfoItems.ScoreID != 0)
         {
             WebRequest webRequest = new WebRequest();
             webRequest.Session = CurrentApp.Session;
             webRequest.Code    = (int)S3105Codes.GetAppealRecordsHistory;
             webRequest.ListData.Add(mListAppealInfoItems.ReferenceID.ToString()); //录音记录ID C003
             webRequest.ListData.Add(mListAppealInfoItems.ScoreID.ToString());     //成绩ID C002
             //Service31051Client client = new Service31051Client();
             Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
             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.Message == S3105Consts.AppealOvered)
             {
                 return;
             }
             if (webReturn.ListData == null)
             {
                 ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                 return;
             }
             if (webReturn.ListData.Count <= 0)
             {
                 return;
             }
             for (int i = 0; i < webReturn.ListData.Count; i++)
             {
                 OperationReturn optReturn = XMLHelper.DeserializeObject <AppealInfoDetailItem>(webReturn.ListData[i]);
                 if (!optReturn.Result)
                 {
                     ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                     continue;
                 }
                 AppealInfoDetailItem appealInfo = optReturn.Data as AppealInfoDetailItem;
                 if (appealInfo == null)
                 {
                     ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                     return;
                 }
                 if (appealInfo.ID == 1 || appealInfo.ID == 2)
                 {
                     GroupBox gpBox = new GroupBox();
                     gpBox.Header = CurrentApp.GetLanguageInfo("3105T00097", "Appeal");
                     StackPanel stkPanel = new StackPanel();
                     TextBlock  txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00098", "Type") + ":" + gpBox.Header;
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00014", "Appeal Person") + ":" + AgentAndUserFullName(appealInfo.PersonID);
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00030", "Appeal Time") + ":" + appealInfo.Time.ToString("yyyy/MM/dd HH:mm:ss");
                     stkPanel.Children.Add(txb);
                     txb = new TextBlock();
                     txb.TextWrapping = TextWrapping.Wrap;
                     txb.Text         = CurrentApp.GetLanguageInfo("3105T00099", "Appeal Reason") + ":" + appealInfo.Demo;
                     stkPanel.Children.Add(txb);
                     gpBox.Content = stkPanel;
                     stkAppealInfo.Children.Add(gpBox);
                 }
                 if (appealInfo.ID == 3 || appealInfo.ID == 4)
                 {
                     GroupBox gpBox = new GroupBox();
                     gpBox.Header = CurrentApp.GetLanguageInfo("3105T00010", "ReCheck");
                     StackPanel stkPanel = new StackPanel();
                     TextBlock  txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00098", "Type") + ":" + gpBox.Header;
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00100", "Check Person") + ":" + AgentAndUserFullName(appealInfo.PersonID);
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00050", "Check Time") + ":" + appealInfo.Time.ToString("yyyy/MM/dd HH:mm:ss");
                     stkPanel.Children.Add(txb);
                     txb = new TextBlock();
                     if (appealInfo.ID == 3)//复核驳回
                     {
                         txb.Text = CurrentApp.GetLanguageInfo("3105T00024", "ReCheck Result") + ":" + CurrentApp.GetLanguageInfo("3105T00028", "ReCheck-reject");
                     }
                     else//复核通过
                     {
                         txb.Text = CurrentApp.GetLanguageInfo("3105T00024", "ReCheck Result") + ":" + CurrentApp.GetLanguageInfo("3105T00081", "accept");
                     }
                     stkPanel.Children.Add(txb);
                     txb = new TextBlock();
                     txb.TextWrapping = TextWrapping.Wrap;
                     txb.Text         = CurrentApp.GetLanguageInfo("3105T00025", "ReCheck Remarks") + ":" + appealInfo.Demo;
                     stkPanel.Children.Add(txb);
                     gpBox.Content = stkPanel;
                     stkAppealInfo.Children.Add(gpBox);
                 }
                 if (appealInfo.ID == 5 || appealInfo.ID == 6 || appealInfo.ID == 7)
                 {
                     GroupBox gpBox = new GroupBox();
                     gpBox.Header = CurrentApp.GetLanguageInfo("3105T00009", "Check");
                     StackPanel stkPanel = new StackPanel();
                     TextBlock  txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00098", "Type") + ":" + gpBox.Header;
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00015", "Check Person") + ":" + AgentAndUserFullName(appealInfo.PersonID);
                     stkPanel.Children.Add(txb);
                     txb      = new TextBlock();
                     txb.Text = CurrentApp.GetLanguageInfo("3105T00049", "Check Time") + ":" + appealInfo.Time.ToString("yyyy/MM/dd HH:mm:ss");
                     stkPanel.Children.Add(txb);
                     txb = new TextBlock();
                     if (appealInfo.ID == 5)//审批通过不修改分数
                     {
                         txb.Text = CurrentApp.GetLanguageInfo("3105T00018", "Check Result") + ":" + CurrentApp.GetLanguageInfo("3105T00082", "Review by not modify the score");
                     }
                     if (appealInfo.ID == 6)//审批通过重新评分
                     {
                         txb.Text = CurrentApp.GetLanguageInfo("3105T00018", "Check Result") + ":" + CurrentApp.GetLanguageInfo("3105T00083", "Check through to score");
                     }
                     if (appealInfo.ID == 7)//审批驳回
                     {
                         txb.Text = CurrentApp.GetLanguageInfo("3105T00018", "Check Result") + ":" + CurrentApp.GetLanguageInfo("3105T00084", "ReCheck-reject");
                     }
                     stkPanel.Children.Add(txb);
                     txb = new TextBlock();
                     txb.TextWrapping = TextWrapping.Wrap;
                     txb.Text         = CurrentApp.GetLanguageInfo("3105T00017", "Check Remarks") + ":" + appealInfo.Demo;
                     stkPanel.Children.Add(txb);
                     gpBox.Content = stkPanel;
                     stkAppealInfo.Children.Add(gpBox);
                 }
             }
             PanelAppealDetail.IsVisible = true;
         }
         else
         {
             PanelAppealDetail.IsVisible = false;
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 12
0
        public void QueryAppealInfo(string strCondition, List <DateTimeSpliteAsDay> lstDateTimeSplitAsDay)
        {
            mListAllAppealInfo.Clear();
            mListCurrentAppealItems.Clear();
            mListAppealInfoItems = null;
            mRecordTotal         = 0;
            mPageIndex           = 0;
            mPageCount           = 0;
            mPageSize            = S3105Consts.USER_PARAM_PAGESIZE;
            mMaxRecords          = S3105Consts.USER_PARAM_MAXRECORDS;
            try
            {
                PanelBasicOpts.IsEnabled = false;
                PanelOtherOpts.IsEnabled = false;
                SetBusy(true, string.Empty);
                mWorker = new BackgroundWorker();
                //注册线程主体方法
                mWorker.DoWork += (s, de) =>
                {
                    CurrentApp.WriteLog("QueryRecord", string.Format("{0}", strCondition));

                    WebRequest webRequest = new WebRequest();
                    webRequest.Session = CurrentApp.Session;
                    webRequest.Code    = (int)S3105Codes.GetAppealInfoData;
                    webRequest.ListData.Add(strCondition);
                    //Service31051Client client = new Service31051Client();
                    Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
                    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 == null)
                    {
                        ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                        return;
                    }
                    if (webReturn.ListData.Count <= 0)
                    {
                        SetPageState();
                        return;
                    }
                    for (int i = 0; i < webReturn.ListData.Count; i++)
                    {
                        OperationReturn optReturn = XMLHelper.DeserializeObject <AppealInfo>(webReturn.ListData[i]);
                        if (!optReturn.Result)
                        {
                            ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                            continue;
                        }
                        AppealInfo appealInfo = optReturn.Data as AppealInfo;
                        if (appealInfo == null)
                        {
                            ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
                            return;
                        }
                        AppealInfoItems item = new AppealInfoItems(appealInfo);
                        mRecordTotal    = item.RowNumber;
                        item.Background = GetRecordBackground(item);
                        if (item.Appealint > 0)
                        {
                            item.AppealState = CurrentApp.GetLanguageInfo(string.Format("3105T000{0}", 77 + item.Appealint), item.Appealint.ToString());
                        }
                        if (item.AgentNum != 0)
                        {
                            item.AgentName = AgentAndUserFullName(item.AgentNum);
                            item.AgentID   = AgentAndUserName(item.AgentNum);
                        }
                        mListAllAppealInfo.Add(item);
                        if (mRecordTotal < mPageSize + 1)
                        {
                            AddNewAppealInfo(item);
                        }
                    }
                    SetPageState();
                };
                //当后台操作已完成、被取消或引发异常时发生
                mWorker.RunWorkerCompleted += (s, re) =>
                {
                    mWorker.Dispose();
                    SetBusy(false, string.Empty);
                    PanelBasicOpts.IsEnabled = true;
                    PanelOtherOpts.IsEnabled = true;
                };
                mWorker.RunWorkerAsync();//触发DoWork事件
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
                CurrentApp.WriteOperationLog(S3105Consts.OPT_Query.ToString(), ConstValue.OPT_RESULT_FAIL, "");
            }
            #region 写操作日志
            CurrentApp.WriteOperationLog(S3105Consts.OPT_Query.ToString(), ConstValue.OPT_RESULT_SUCCESS, "");
            #endregion
        }