Beispiel #1
0
        public void ShowTemplatePop(string action, string AppealFlowItemID, CCheckData SelCheckData, string strDisContent)
        {
            try
            {
                if (CurrentFocusReCheckData != null)
                {
                    PopupPanel.Title = CurrentApp.GetLanguageInfo("3105T00032", "Choose Scoring Template");
                    TemplateSelect popSelTemplate = new TemplateSelect();
                    popSelTemplate.CurrentApp    = CurrentApp;
                    popSelTemplate.ParentPage    = this;
                    popSelTemplate.selTaskRecord = CurrentFocusReCheckData;

                    popSelTemplate.action           = action;
                    popSelTemplate.AppealFlowItemID = AppealFlowItemID;
                    popSelTemplate.SelCheckData     = SelCheckData;
                    popSelTemplate.strDisContent    = strDisContent;

                    PopupPanel.Content = popSelTemplate;
                    PopupPanel.IsOpen  = true;
                }
            }
            catch (Exception)
            {
            }
        }
 //复核處理
 private void ProcessReview()
 {
     try
     {
         CurrentFocusCheckData = new CCheckData();
         CurrentFocusCheckData = (CCheckData)LvCheck.SelectedItem;
         if (S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).Count() != 0)
         {
             DateTime dealTime = Convert.ToDateTime(CurrentFocusCheckData.AppealDatetime).AddHours(Convert.ToInt32((S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).First().ParamValue.Substring(9, 4))));//申诉后任务处理截至日期
             if (S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).First().ParamValue.Substring(8, 1) == "1" && DateTime.Compare(dealTime, DateTime.Now) < 0)
             {
                 ShowInformation(CurrentApp.GetLanguageInfo("3105T00116", "Has exceeded the task processing time.")); return;
             }
         }
         if (CurrentFocusCheckData != null)
         {
             PopupPanel.Title = CurrentApp.GetLanguageInfo("3105T00029", "Re-examine");
             ProcessCheck popProcessCheck = new ProcessCheck();
             popProcessCheck.CurrentApp   = CurrentApp;
             popProcessCheck.SelCheckData = CurrentFocusCheckData;
             popProcessCheck.ParentPage   = this;
             PopupPanel.Content           = popProcessCheck;
             PopupPanel.IsOpen            = true;
         }
         else
         {
             ShowInformation(CurrentApp.GetLanguageInfo("3105T00052", "Please select one record at least."));
         }
     }
     catch (Exception)
     {
     }
 }
 private void ShowMemo(CCheckData cditem)
 {
     mUCRecordMemo                  = new UCRecordMemo();
     mUCRecordMemo.CurrentApp       = CurrentApp;
     mUCRecordMemo.RecoredReference = cditem.RecoredReference;
     BorderMemo.Child               = mUCRecordMemo;
     PanelMemo.IsVisible            = true;
 }
Beispiel #4
0
 public UC_AssignToQA()
 {
     InitializeComponent();
     SelCheckData       = new CCheckData();
     mRootItem          = new ObjectItem();
     mListCtrolQA       = new List <CtrolQA>();
     mListObjectItems   = new List <ObjectItem>();
     mListCurrentRecord = new RecordInfoItem();
     AppealFlowItemID   = string.Empty;
     Loaded            += UC_AssignToQA_Loaded;
 }
Beispiel #5
0
        public UC_AddToTask()
        {
            InitializeComponent();
            SelCheckData       = new CCheckData();
            mListCtrolQA       = new List <CtrolQA>();
            mListCurrentRecord = new RecordInfoItem();
            AppealFlowItemID   = string.Empty;

            BtnConfirm.Click += BtnConfirm_Click;
            BtnClose.Click   += BtnClose_Click;
            BtnPre.Click     += BtnPre_Click;
            this.Loaded      += UC_AddToTask_Loaded;
        }
        private void PlayRecord(CCheckData seldate)
        {
            try
            {
                mUCPlayBox                  = new UCPlayBox();
                mUCPlayBox.CurrentApp       = CurrentApp;
                mUCPlayBox.ParentPage2      = this;
                mUCPlayBox.RecoredReference = seldate.RecoredReference;
                mUCPlayBox.IsAutoPlay       = true;
                BorderPlayBox.Child         = mUCPlayBox;
                PanelPlayBox.IsVisible      = true;

                #region 写操作日志
                string strLog = string.Format("{0} {1}", Utils.FormatOptLogString("3105T00001"), seldate.RecoredReference);
                CurrentApp.WriteOperationLog(S3105Consts.OPT_Play.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog);
                #endregion
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #7
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);
        }
Beispiel #8
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);
        }
        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);
            }
        }
        /// 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);
            }
        }
Beispiel #11
0
        public void ScoreTaskRecord(BasicScoreSheetItem selScoreSheet, string action, string AppealFlowItemID, CCheckData SelCheckData, string strDisContent)
        {
            try
            {
                TaskScoreMainView mScoreForm = new TaskScoreMainView();
                mScoreForm               = new TaskScoreMainView();
                mScoreForm.PageParent    = this;
                mScoreForm.selScoreSheet = selScoreSheet;
                mScoreForm.SelTaskRecord = CurrentFocusReCheckData;
                mScoreForm.TaskScoreType = 1;

                mScoreForm.action           = action;
                mScoreForm.AppealFlowItemID = AppealFlowItemID;
                mScoreForm.strDisContent    = strDisContent;
                mScoreForm.SelCheckData     = SelCheckData;

                //NavigationService.Navigate(mScoreForm);
                mScoreForm.PageName = "TaskScoreMainView";
                var temp1 = CurrentApp as S3105App;
                if (temp1 != null)
                {
                    temp1.InitMainView(mScoreForm);
                }
            }
            catch (Exception)
            {
            }
        }