/// <summary> /// 开始播放 /// </summary> private string GetRecordInfoByRef(string SerialID)//20140212... 2014年2月12号 { string recordreference = string.Empty; try { string tablename = ConstValue.TABLE_NAME_RECORD + "_" + App.Session.RentInfo.Token; if (App.isCutMonth)//有分表 当前仅按年月分表 ex:T_21_001_00000_1405 { tablename += "_" + SerialID.Substring(0, 4); } string strSql = string.Format("SELECT * FROM {0} WHERE C002={1}", tablename, SerialID); WebRequest webRequest = new WebRequest(); webRequest.Session = App.Session; webRequest.Code = (int)S3104Codes.GetRecordData; webRequest.ListData.Add(strSql); webRequest.ListData.Add(tablename); //Service31041Client client = new Service31041Client(); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); //WebHelper.SetServiceClient(client); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { if (webReturn.Message != S3104Consts.Err_TableNotExit) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); } return(string.Empty); } if (webReturn.ListData == null) { App.ShowExceptionMessage(string.Format("Fail. ListData is null")); return(string.Empty); } if (webReturn.ListData.Count <= 0) { return(string.Empty); } OperationReturn optReturn = XMLHelper.DeserializeObject <RecordInfo>(webReturn.ListData[0]); if (!optReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return(string.Empty); } RecordInfo recordInfo = optReturn.Data as RecordInfo; if (recordInfo == null) { App.ShowExceptionMessage(string.Format("Fail. RecordInfo is null")); return(string.Empty); } recordreference = recordInfo.RecordReference; } catch { recordreference = string.Empty; } return(recordreference); }
private void LoadScoreItemResultInfo(RecordScoreInfoItem item) { try { if (item == null) { return; } WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3104Codes.GetScoreResultList; webRequest.Session = App.Session; webRequest.ListData.Add(item.ScoreID.ToString()); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); WriteLog.WriteLogToFile("ScoreInfo \t StrQuery", webReturn.Message); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { App.ShowExceptionMessage(App.GetLanguageInfo("3104T00113", string.Format("Fail.\tListData is null"))); return; } mListScoreItemResults.Clear(); WriteLog.WriteLogToFile("ScoreInfo \t GetScoreResultList 0", webReturn.ListData.Count.ToString()); for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; WriteLog.WriteLogToFile("ScoreInfo \t GetScoreResultList 1", strInfo); OperationReturn optReturn = XMLHelper.DeserializeObject <BasicScoreItemInfo>(strInfo); WriteLog.WriteLogToFile("ScoreInfo \t GetScoreResultList 2", optReturn.StringValue); if (!optReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } BasicScoreItemInfo info = optReturn.Data as BasicScoreItemInfo; if (info == null) { App.ShowExceptionMessage(App.GetLanguageInfo("3104T00113", string.Format("Fail.\tBasicScoreItemInfo is null"))); return; } mListScoreItemResults.Add(info); } } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
private List <ABCD_OrgSkillGroup> InitABCDQuery(long OperationID) { List <ABCD_OrgSkillGroup> tempItems = new List <ABCD_OrgSkillGroup>(); try { WebRequest webRequest = new WebRequest(); webRequest.Session = App.Session; webRequest.Code = (int)S3104Codes.GetABCD; webRequest.ListData.Add(OperationID.ToString()); //Service31041Client client = new Service31041Client(); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); string tempAgent; for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; OperationReturn optReturn = XMLHelper.DeserializeObject <ABCD_OrgSkillGroup>(strInfo); if (!optReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return(tempItems); } ABCD_OrgSkillGroup info = optReturn.Data as ABCD_OrgSkillGroup; tempAgent = string.Empty; List <CtrolAgent> lstCtrolAgentTemp = null; lstCtrolAgentTemp = App.ListCtrolAgentInfos.Where(p => p.AgentOrgID == info.OrgSkillGroupID.ToString()).ToList(); if (lstCtrolAgentTemp.Count() < 1) { return(tempItems); } if (lstCtrolAgentTemp.Where(p => p.AgentID == App.Session.UserID.ToString()).Count() > 0) { tempItems.Add(info); } } } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); return(tempItems); } return(tempItems); }
public static void InitControledOrg(string OrgID) { try { WebRequest webRequest = new WebRequest(); webRequest.Session = App.Session; webRequest.Code = (int)S3104Codes.GetControlOrgInfoList; webRequest.ListData.Add(OrgID); //Service31041Client client = new Service31041Client(); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { App.ShowExceptionMessage(string.Format("Fail.\tListData is null")); return; } for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; string[] arrInfo = strInfo.Split(new[] { ConstValue.SPLITER_CHAR }, StringSplitOptions.RemoveEmptyEntries); if (arrInfo.Length < 2) { continue; } CtrolOrg ctrolOrg = new CtrolOrg(); ctrolOrg.ID = arrInfo[0]; ctrolOrg.OrgName = arrInfo[1]; ListCtrolOrgInfos.Add(ctrolOrg); } } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
private void LoadScoreSheetInfo(RecordScoreInfoItem item) { try { if (item == null) { return; } WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3104Codes.GetScoreSheetInfo; webRequest.Session = App.Session; webRequest.ListData.Add(item.TemplateID.ToString()); webRequest.ListData.Add(item.ScoreID.ToString()); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); //Service31041Client client = new Service31041Client(); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } OperationReturn optReturn = XMLHelper.DeserializeObject <ScoreSheet>(webReturn.Data); if (!optReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } ScoreSheet scoreSheet = optReturn.Data as ScoreSheet; if (scoreSheet == null) { App.ShowExceptionMessage(App.GetLanguageInfo("3104T00127", string.Format("Fail.\tScoreSheet is null"))); return; } scoreSheet.ScoreSheet = scoreSheet; scoreSheet.Init(); mCurrentScoreSheet = scoreSheet; } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
private string SaveMultiValues(List <QueryConditionSubItem> listSubItems) { string selectID = string.Empty; try { WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3104Codes.InsertTempData; webRequest.Session = App.Session; webRequest.ListData.Add(string.Empty); webRequest.ListData.Add(listSubItems.Count.ToString()); for (int i = 0; i < listSubItems.Count; i++) { string strInfo = string.Format("{0}{1}{2}{1}{3}{1}{4}{1}{5}" , listSubItems[i].Value01 , ConstValue.SPLITER_CHAR , listSubItems[i].Value02 , listSubItems[i].Value03 , listSubItems[i].Value04 , listSubItems[i].Value05); webRequest.ListData.Add(strInfo); } //Service31041Client client = new Service31041Client(); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return(string.Empty); } selectID = webReturn.Data; return(selectID); } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } return(string.Empty); }
private void GetRelativeRecordInfos() { try { if (RecordInfoItem == null) { return; } RecordInfoItem.ListRelativeInfos.Clear(); //bool isAutoRelative = false; //if (ListUserSettingInfos != null) //{ // var setting = // ListUserSettingInfos.FirstOrDefault(s => s.ParamID == S3104Consts.USER_PARAM_AUTORELATIVEPLAY); // if (setting != null && setting.StringValue == "1") // { // isAutoRelative = true; // } //} //if (!isAutoRelative) { return; } if (RecordInfoItem.MediaType != 1) { return; } var recordInfo = RecordInfoItem.RecordInfo; if (recordInfo == null) { return; } OperationReturn optReturn; optReturn = XMLHelper.SeriallizeObject(recordInfo); if (!optReturn.Result) { App.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } WebRequest webRequest = new WebRequest(); webRequest.Session = App.Session; webRequest.Code = (int)S3104Codes.GetRelativeRecordList; webRequest.ListData.Add(optReturn.Data.ToString()); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { App.WriteLog("GetRelativeInfos", string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { App.WriteLog("GetRelativeInfos", string.Format("WSFail.\tListData is null")); return; } int count = webReturn.ListData.Count; for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; optReturn = XMLHelper.DeserializeObject <RecordInfo>(strInfo); if (!optReturn.Result) { App.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } RecordInfo relativeRecord = optReturn.Data as RecordInfo; if (relativeRecord == null) { App.WriteLog("GetRelativeInfos", string.Format("WSFail.\tRelativeRecordInfo is null")); return; } RecordInfoItem.ListRelativeInfos.Add(relativeRecord); App.WriteLog("GetRelativeInfos", string.Format("{0}", relativeRecord.SerialID)); } App.WriteLog("GetRelativeInfos", string.Format("End.\t{0}", count)); } catch (Exception ex) { App.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}", ex.Message)); } }
void btnConfirm_Click(object sender, RoutedEventArgs e) { btnConfirm.IsEnabled = false; try { if (!string.IsNullOrWhiteSpace(appealTextBox.Text) && appealTextBox.Text != warningText) { WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3104Codes.GetSerialID; webRequest.Session = App.Session; webRequest.ListData.Add("31"); webRequest.ListData.Add("312"); webRequest.ListData.Add(DateTime.Now.ToString("yyyyMMddHHmmss")); //Service31041Client client = new Service31041Client(); Service31041Client client = new Service31041Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service31041")); WebReturn webReturn = client.UMPClientOperation(webRequest); string serialID = webReturn.ListData[0]; WriteLog.WriteLogToFile("Appeal \t serialID", serialID); switch (aScoreInfoItem.AppealMark)//显示已申诉就不可再次申诉,适用第一版 { case "1": case "2": App.ShowInfoMessage(App.GetLanguageInfo("3104T00116", string.Format("The record has been a complaint"))); var parent = Parent as PopupPanel; if (parent != null) { parent.IsOpen = false; } return; } /*因数据库未更新最新设定,仍使用Y申诉,N否 C表示申诉完成,最新设定:0,未申诉 ,1申诉,2表申诉完成 * int appealMark = Convert.ToInt32(webReturn.DataSetData.Tables[0].Rows[0][1]); * if (appealMark == 1 || appealMark == 2)//显示已申诉就不可再次申诉,适用第一版 * { * App.ShowInfoMessage(string.Format("The record has been a complaint")); * var parent = Parent as PopupPanel; * if (parent != null) * { * parent.IsOpen = false; * } * return; * }*/ webRequest.Code = (int)S3104Codes.WriteAppeal; webRequest.Session = App.Session; webRequest.ListData.Clear(); webRequest.ListData.Add(serialID); //C001 webRequest.ListData.Add(aScoreInfoItem.ScoreID.ToString()); //C002T_31_008.C001评分成绩表的成绩ID webRequest.ListData.Add(recordinfoitem.SerialID.ToString()); //C003 T_21_000.C002 录音记录表的ID webRequest.ListData.Add(App.ListCtrolAgentInfos[0].AgentID); //C004 录音所属座席工号对应的资源编号 webRequest.ListData.Add(App.ListCtrolAgentInfos[0].AgentID); //C005 申诉人ID,如果是座席自己申诉的 webRequest.ListData.Add(S3104Consts.CON_AppealFlowID.ToString()); //C006 申诉流程ID webRequest.ListData.Add(S3104Consts.CON_AppealFlowItemID.ToString()); //C007 申诉流程子项ID(通过ActionID+AppealFlowItemID得到该流程走到那一步了) webRequest.ListData.Add("1"); //C008 1为申诉,2为审批,3为复核 webRequest.ListData.Add("1"); //C009 对于申诉(1座席申诉,2他人替申) webRequest.ListData.Add("N"); //C010 Y为申诉流程完毕,N 在处理流程中 webRequest.ListData.Add("1"); //C011 当能多次申诉时启用,每再申诉一次+1,客户端第一版写1 webRequest.ListData.Add(System.DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss")); //C012 创建时间 webRequest.ListData.Add(appealTextBox.Text); //申诉备注 webReturn = client.UMPClientOperation(webRequest); client.Close(); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } else { App.ShowInfoMessage(App.GetLanguageInfo("3104T00093", "It's OK!")); string strLog = string.Format("{0}{1}", Utils.FormatOptLogString("3104T00002"), recordinfoitem.SerialID);//申诉了XX录音 App.WriteOperationLog(S3104Consts.OPT_AgentAppeal.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog); var parent = Parent as PopupPanel; PageParent.RecordScoreListView(); if (parent != null) { parent.IsOpen = false; } } } else { App.ShowExceptionMessage(warningText); } } catch (Exception ex) { string strLog = string.Format("{0}{1}", Utils.FormatOptLogString("3104T00001"), recordinfoitem.SerialID);//申诉XX录音 App.WriteOperationLog(S3104Consts.OPT_AgentAppeal.ToString(), ConstValue.OPT_RESULT_FAIL, strLog); App.ShowExceptionMessage(ex.Message); } btnConfirm.IsEnabled = true; }