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; }
void BtnApply_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(txtName.Text)) { ShowException(CurrentApp.GetLanguageInfo("5101005", "Class name can not be empty")); return; } Service510011Client client = null; try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; string strColor = colorLevel.SelectedColor.ToString().Substring(3); #region Add if (iAddOrModify == 0) { webRequest.Code = (int)S5100RequestCode.AddBookmarkLevel; webRequest.ListData.Add(txtName.Text); webRequest.ListData.Add(strColor); } #endregion #region Modify else if (iAddOrModify == OperationType.Modify) { webRequest.Code = (int)S5100RequestCode.ModifyBookmarkLevel; webRequest.ListData.Add(LevelInModify.BookmarkLevelID); webRequest.ListData.Add(strColor); } client = new Service510011Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service51001")); WebReturn webReturn = client.DoOperation(webRequest); CurrentApp.MonitorHelper.AddWebReturn(webReturn); client.Close(); if (!webReturn.Result) { if (iAddOrModify == OperationType.Add) { string msg = string.Format("{0}{1}{2}", CurrentApp.Session.UserInfo.UserName, Utils.FormatOptLogString(string.Format("FO5101001")), txtName.Text); CurrentApp.WriteOperationLog("5101001", ConstValue.OPT_RESULT_FAIL, msg); } else if (iAddOrModify == OperationType.Modify) { string msg = string.Format("{0}{1}{2}", CurrentApp.Session.UserInfo.UserName, Utils.FormatOptLogString(string.Format("FO5101002")), txtName.Text); CurrentApp.WriteOperationLog("5101002", ConstValue.OPT_RESULT_FAIL, msg); } if (webReturn.Code != Defines.RET_FAIL) { ShowException(CurrentApp.GetLanguageInfo(((int)webReturn.Code).ToString(), string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message))); return; } else { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } } //添加成功 BookmarkLevelEntityInList level = new BookmarkLevelEntityInList(); if (iAddOrModify == OperationType.Add) { string msg = string.Format("{0}{1}{2}", CurrentApp.Session.UserInfo.UserName, Utils.FormatOptLogString(string.Format("FO5101001")), txtName.Text); CurrentApp.WriteOperationLog("5101001", ConstValue.OPT_RESULT_SUCCESS, msg); string str = webReturn.Data; long levelID = 0; long.TryParse(str, out levelID); if (levelID == 0) { return; } level.BookmarkLevelID = levelID.ToString(); level.BookmarkLevelName = txtName.Text; level.BookmarkLevelStatus = "1"; level.BookmarkLevelStatusIcon = "Images/avaliable.ico"; level.BookmarkLevelColor = strColor; ParentPage.UpdateListView(level, OperationType.Add); } else if (iAddOrModify == OperationType.Modify) { string msg = string.Format("{0}{1}{2}", CurrentApp.Session.UserInfo.UserName, Utils.FormatOptLogString(string.Format("FO5101002")), txtName.Text); CurrentApp.WriteOperationLog("5101002", ConstValue.OPT_RESULT_SUCCESS, msg); level.BookmarkLevelColor = strColor; level.BookmarkLevelID = LevelInModify.BookmarkLevelID; ParentPage.UpdateListView(level, OperationType.Modify); } } catch (Exception ex) { ShowException(ex.Message); } finally { if (client != null) { if (client.State == System.ServiceModel.CommunicationState.Opened) { client.Close(); } } } #endregion }
public WebReturn DoOperation(WebRequest webRequest) { WebReturn webReturn = new WebReturn(); webReturn.Result = true; webReturn.Code = 0; if (webRequest == null) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("WebRequest is null"); return(webReturn); } SessionInfo session = webRequest.Session; if (session == null) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("SessionInfo is null"); return(webReturn); } webReturn.Session = session; try { OperationReturn optReturn; DatabaseInfo dbInfo = session.DatabaseInfo; if (dbInfo != null) { dbInfo.RealPassword = DecryptString04(dbInfo.Password); session.DBConnectionString = dbInfo.GetConnectionString(); } switch (webRequest.Code) { case (int)S1600RequestCode.ChangeUserStatus: optReturn = ChangeUserStatus(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; return(webReturn); } break; case (int)S1600RequestCode.GetCookieStatus: optReturn = GetCookieStatusByID(session, webRequest.ListData); webReturn.Message = optReturn.Message; if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; } } catch (Exception ex) { webReturn.Result = false; webReturn.Code = Defines.RET_FAIL; webReturn.Message = ex.Message; return(webReturn); } return(webReturn); }
private void InitStatisticConfig() { try { WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3108Codes.GetABCDInfo; webRequest.Session = CurrentApp.Session; webRequest.ListData.Add(OrgItem.ItemID.ToString()); //webRequest.ListData.Add(Statistic.StatisticKey.ToString()); Service31081Client client = new Service31081Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31081")); WebHelper.SetServiceClient(client); //Service31081Client client = new Service31081Client(); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("InitStatisticConfig Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } for (int i = 0; i < webReturn.ListData.Count; i++) { OperationReturn optReturn = XMLHelper.DeserializeObject <StatisticParam>(webReturn.ListData[i]); if (!optReturn.Result) { ShowException(string.Format("InitStatisticConfig Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } StatisticParam SP = optReturn.Data as StatisticParam; int index; for (index = 0; index < ListABCD.Count(); index++) { if (ListABCD[index].StatisticalParamID == SP.StatisticalParamID) { ListABCD[index].StatisticKey = SP.StatisticKey; ListABCD[index].OrgID = SP.OrgID; ListABCD[index].StatisticType = SP.StatisticType; ListABCD[index].IsApplyAll = SP.IsApplyAll; ListABCD[index].StartTime = Convert.ToDateTime(SP.StartTime); ListABCD[index].EndTime = Convert.ToDateTime(SP.EndTime); ListABCD[index].RowNum = SP.RowNum; ListABCD[index].CycleTime = SP.CycleTime; ListABCD[index].CycleTimeParam = SP.CycleTimeParam; ListABCD[index].UpdateTime = SP.UpdateTime; ListABCD[index].UpdateUnit = SP.UpdateUnit; break; } } //Statistic.StatisticKey = SP.StatisticKey; //Statistic.OrgID = SP.OrgID; //Statistic.StatisticType = SP.StatisticType; //Statistic.IsApplyAll = SP.IsApplyAll; //Statistic.StartTime = SP.StartTime; //Statistic.EndTime = SP.EndTime; //Statistic.RowNum = SP.RowNum; //Statistic.CycleTime = SP.CycleTime; //Statistic.CycleTimeParam = SP.CycleTimeParam; //Statistic.UpdateTime = SP.UpdateTime; //Statistic.UpdateUnit = SP.UpdateUnit; } } catch (Exception ex) { ShowException(ex.Message); } }
private void PaperSearch_Click(object sender, RoutedEventArgs e) { string strLog; try { if (!CheckText()) { return; } string sql = SetSearchInfo(); _mListPaperInfos.Clear(); var webRequest = new WebRequest(); Service36031Client client = new Service36031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service36031")); //var client = new Service36031Client(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3603Codes.OptSearchPapers; OperationReturn optReturn = XMLHelper.SeriallizeObject(sql); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); WebReturn webReturn = client.UmpTaskOperation(webRequest); client.Close(); CurrentApp.WriteLog(CurrentApp.GetLanguageInfo("3603T00033", "Search")); if (!webReturn.Result) { #region 写操作日志 strLog = string.Format("{0} {1} : {2}", Utils.FormatOptLogString("3603T00033"), Utils.FormatOptLogString("3603T00089"), webReturn.Message); CurrentApp.WriteOperationLog(S3603Consts.OPT_Search.ToString(), ConstValue.OPT_RESULT_FAIL, strLog); #endregion CurrentApp.WriteLog(webReturn.Message); ShowException(CurrentApp.GetLanguageInfo("3603T00065", "Insert data failed")); return; } #region 写操作日志 strLog = string.Format("{0} {1} ", Utils.FormatOptLogString("3603T00033"), Utils.FormatOptLogString("3603T00090")); CurrentApp.WriteOperationLog(S3603Consts.OPT_Search.ToString(), ConstValue.OPT_RESULT_FAIL, strLog); #endregion CurrentApp.WriteLog(CurrentApp.GetLanguageInfo("3603T00090", "Search Success")); if (webReturn.ListData.Count <= 0) { ShowException(CurrentApp.GetLanguageInfo("3603T00077", "Did not find the information!")); return; } foreach (string strDate in webReturn.ListData) { optReturn = XMLHelper.DeserializeObject <CPaperParam>(strDate); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); continue; } var cExamPapers = optReturn.Data as CPaperParam; if (cExamPapers == null) { ShowException("Fail. filesItem is null"); return; } _mListPaperInfos.Add(cExamPapers); } SetObservableCollection(_mListPaperInfos); } catch (Exception ex) { #region 写操作日志 strLog = string.Format("{0} {1} : {2}", Utils.FormatOptLogString("3603T00033"), Utils.FormatOptLogString("3603T00089"), ex.Message); CurrentApp.WriteOperationLog(S3603Consts.OPT_Search.ToString(), ConstValue.OPT_RESULT_FAIL, strLog); #endregion CurrentApp.WriteLog(ex.Message); ShowException(ex.Message); } }
public void LoadKpiMapObjectInfo() { try { WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S4601Codes.LoadKpiMapObjectInfo; webRequest.Session = CurrentApp.Session; webRequest.ListData.Add(mCurrentObjectItem.ObjID.ToString()); //对象ID webRequest.ListData.Add(mCurrentObjectItem.ParantID.ToString()); //对象的ParantID Service46011Client client = new Service46011Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service46011")); //Service46011Client client = new Service46011Client(); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } mlistKpiMapObjectInfo.Clear(); mListKpiMapObjectInfoItem.Clear(); for (int i = 0; i < webReturn.ListData.Count; i++) { OperationReturn optReturn = XMLHelper.DeserializeObject <KpiMapObjectInfo>(webReturn.ListData[i]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } KpiMapObjectInfo kpiInfo = optReturn.Data as KpiMapObjectInfo; if (kpiInfo != null) { mlistKpiMapObjectInfo.Add(kpiInfo); } KpiMapObjectInfoItem item = new KpiMapObjectInfoItem(kpiInfo); //新增的属性 每个绑定的数据源里都有一个对象 然后就将选中的对象赋过去 item.ObjectItem = mCurrentObjectItem; mListKpiMapObjectInfoItem.Add(item); } for (int i = 0; i < mListKpiMapObjectInfoItem.Count; i++) { KpiMapObjectInfoItem item = mListKpiMapObjectInfoItem[i]; item.StrKPIName = CurrentApp.GetLanguageInfo(string.Format("4601KPI{0}", item.KpiMapObjectInfo.KpiID), item.KPIName.ToString()); item.StrApplyCycle = CurrentApp.GetLanguageInfo(string.Format("4601BP{0}", item.ApplyCycle), item.ApplyCycle.ToString()); item.StrIsActive = CurrentApp.GetLanguageInfo(string.Format("4601IsActive{0}", item.IsActive), item.IsActive.ToString()); item.StrDropDown = CurrentApp.GetLanguageInfo(string.Format("4601BPDropDown{0}", item.DropDown), item.DropDown.ToString()); item.StrApplyAll = CurrentApp.GetLanguageInfo(string.Format("4601BPApplyAll{0}", item.ApplyAll), item.ApplyAll.ToString()); if (Regex.Matches(item.ObjectType, @"1").Count > 1)//这个字符串中1的个数大于1 { item.StrObjectType = string.Empty; if (item.ObjectType.Substring(0, 1) == "1") { item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "1000000000"), "1000000000") + " "; } if (item.ObjectType.Substring(1, 1) == "1") { item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0100000000"), "0100000000") + " "; } if (item.ObjectType.Substring(2, 1) == "1") { item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0010000000"), "0010000000") + " "; } if (item.ObjectType.Substring(3, 1) == "1") { item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0001000000"), "0001000000") + " "; } } else { item.StrObjectType = CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", item.ObjectType), item.ObjectType.ToString()); } } } catch (Exception ex) { ShowException(ex.Message); } }
private void InitLibraryFolder(ObjectItem parentItem, string parentID) { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3102Codes.GetLibraryFolder; //webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add(parentID); Service31021Client client = new Service31021Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service31021")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(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 < 3) { continue; } string strFolderID = arrInfo[0]; string strParentFolderID = arrInfo[1]; string strFolderName = arrInfo[2]; string strParentFolderName = arrInfo[3]; ObjectItem item = new ObjectItem(); item.ObjType = ConstValue.RESOURCE_ORG; item.ObjID = Convert.ToInt64(strFolderID); item.Name = strFolderName; item.Data = strInfo; item.Description = string.Format("{0}", strFolderName); //如果为文件夹的话就在这里改其中的资源文件常量 if (strFolderID == ConstValue.ORG_ROOT.ToString()) { item.Icon = "Images/rootorg.ico"; } else { item.Icon = "Images/org.ico"; } InitLibraryFolder(item, strFolderID); //InitLibraryFolderContent(item, strFolderID); AddChildObject(parentItem, item); } } catch (Exception ex) { ShowException(ex.Message); } }
public void SearchCategoryTreeInfo(string strSql) { try { _mlstSearchCategoryNode = new List <CCategoryTree>(); WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3602Codes.OptGetQuestionCategory; Service36021Client client = new Service36021Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service36021")); //var client = new Service36021Client(); OperationReturn optReturn = XMLHelper.SeriallizeObject(strSql); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); WebReturn webReturn = client.UmpTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { return; } for (int i = 0; i < webReturn.ListData.Count; i++) { optReturn = XMLHelper.DeserializeObject <PapersCategoryParam>(webReturn.ListData[i]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); continue; } PapersCategoryParam param = optReturn.Data as PapersCategoryParam; if (param == null) { ShowException(string.Format("Fail. queryItem is null")); return; } CCategoryTree tempTree = new CCategoryTree(); tempTree.LongNum = param.LongNum; tempTree.StrName = param.StrName; tempTree.LongParentNodeId = param.LongParentNodeId; tempTree.StrParentNodeName = param.StrParentNodeName; tempTree.LongFounderId = param.LongFounderId; tempTree.StrFounderName = param.StrFounderName; tempTree.StrDateTime = param.StrDateTime; _mlstSearchCategoryNode.Add(tempTree); } _mlstCategoryNum = new List <long>(); foreach (var categoryTree in _mlstSearchCategoryNode) { GetCategoryNum(categoryTree.LongNum); } var distinctNames = _mlstCategoryNum.Distinct(); _mlstCategoryNum = new List <long>(distinctNames.ToList()); _mCategoryNode.Children.Clear(); CategoryTree.ItemsSource = _mCategoryNode.Children; InitCategoryTree(_mListCategoryTreeParam, 0, _mCategoryNode); } catch (Exception ex) { ShowException(ex.Message); } }
/// <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); } }
private bool GetRecordInfoByRef(string recordreference)//20140212... 2014年2月12号 { bool ret = false; try { string tablename = ConstValue.TABLE_NAME_RECORD + "_" + CurrentApp.Session.RentInfo.Token; var tableInfo = CurrentApp.Session.ListPartitionTables.FirstOrDefault( t => t.TableName == ConstValue.TABLE_NAME_RECORD && t.PartType == TablePartType.DatetimeRange); if (tableInfo != null)//有分表 当前仅按年月分表 ex:T_21_001_00000_1405 { tablename += "_" + recordreference.Substring(0, 4); } string strSql = string.Format("SELECT * FROM {0} WHERE C002={1}", tablename, recordreference); WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = 13; webRequest.ListData.Add(strSql); webRequest.ListData.Add(tablename); webRequest.ListData.Add("mark"); //Service31031Client client = new Service31031Client(); Service31031Client client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031")); WebReturn webReturn = client.UMPTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { if (webReturn.Message != "ERR_TABLE_NOT_EXIT") { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); } return(false); } if (webReturn.ListData == null) { ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null"))); return(false); } if (webReturn.ListData.Count <= 0) { return(false); } OperationReturn optReturn = XMLHelper.DeserializeObject <RecordInfo>(webReturn.ListData[0]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return(false); } RecordInfo recordInfo = optReturn.Data as RecordInfo; if (recordInfo == null) { ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null"))); return(false); } RecordInfoItem = new RecordInfoItem(recordInfo); ret = true; } catch { ret = false; } return(ret); }
private void GetRelativeRecordInfos() { try { if (RecordInfoItem == null) { return; } RecordInfoItem.ListRelativeInfos.Clear(); //bool isAutoRelative = false; //if (ListUserSettingInfos != null) //{ // var setting = // ListUserSettingInfos.FirstOrDefault(s => s.ParamID == S3103Consts.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) { CurrentApp.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = 41;//(int)S3102Codes.GetRelativeRecordList webRequest.ListData.Add(optReturn.Data.ToString()); Service31021Client client = new Service31021Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service31021")); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { CurrentApp.WriteLog("GetRelativeInfos", string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { CurrentApp.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) { CurrentApp.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } RecordInfo relativeRecord = optReturn.Data as RecordInfo; if (relativeRecord == null) { CurrentApp.WriteLog("GetRelativeInfos", string.Format("WSFail.\tRelativeRecordInfo is null")); return; } RecordInfoItem.ListRelativeInfos.Add(relativeRecord); CurrentApp.WriteLog("GetRelativeInfos", string.Format("{0}", relativeRecord.SerialID)); } CurrentApp.WriteLog("GetRelativeInfos", string.Format("End.\t{0}", count)); } catch (Exception ex) { CurrentApp.WriteLog("GetRelativeInfos", string.Format("Fail.\t{0}", ex.Message)); } }
void BtnConfirm_Click(object sender, RoutedEventArgs e) { ColAlias.UserTasksInfoShow currentTask = (ColAlias.UserTasksInfoShow)LvDoubleTaskData.SelectedItem; if (currentTask == null) { ShowInformation(CurrentApp.GetLanguageInfo("3105T000145", "No Task Is Select")); return; } //查询这条录音的录音信息 if (!GetRecordInfoByRef(SelCheckData.RecoredReference)) { return; } List <RecordInfoItem> lstRecordInfoItem = new List <RecordInfoItem>(); lstRecordInfoItem.Add(mListCurrentRecord); currentTask.TaskAllRecordLength = currentTask.TaskAllRecordLength + mListCurrentRecord.Duration; currentTask.AssignNum = currentTask.AssignNum + 1; try { //先更新表T_31_020_TaskList //提交任务 WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)ColAlias.S3103Codes.UpdateTask; OperationReturn optReturn = XMLHelper.SeriallizeObject(currentTask); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.Data = optReturn.Data.ToString(); string strrecords = ""; //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; } else { //再更新表T_31_022_TaskListMappingRecord webReturn = new WebReturn(); webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)ColAlias.S3103Codes.SaveTaskRecord; ColAlias::TaskInfoDetail taskinfodetail; foreach (RecordInfoItem record in lstRecordInfoItem) { strrecords += record.SerialID + ","; taskinfodetail = new ColAlias:: TaskInfoDetail(); taskinfodetail.TaskID = currentTask.TaskID; taskinfodetail.RecoredReference = record.SerialID; taskinfodetail.IsLock = "N"; taskinfodetail.AllotType = 4; //对应T_31_022表的C006 4表示录音是从审批通过分配到任务中的录音 taskinfodetail.FromTaskID = -1; taskinfodetail.TaskType = "3"; //对应T-31_022表的C010 taskinfodetail.StartRecordTime = Convert.ToDateTime(record.StartRecordTime).ToUniversalTime(); taskinfodetail.Duration = record.Duration.ToString(); taskinfodetail.Extension = record.Extension; taskinfodetail.CalledID = record.CalledID; taskinfodetail.CallerID = record.CallerID; taskinfodetail.Direction = int.Parse(record.Direction); List <CtrolAgent> templst = new List <CtrolAgent>(); //if (S3103App.GroupingWay.Contains("A")) //以后这个工程加了分组方式后再启用 //{ // templst = S3103App.ListCtrolAgentInfos.Where(p => p.AgentName == record.ReAgent).ToList(); //} //else if (S3103App.GroupingWay.Contains("R")) //{ // templst = S3103App.ListCtrolRealityExtension.Where(p => p.AgentName == record.ReAgent).ToList(); //} //else if (S3103App.GroupingWay.Contains("E")) //{ // templst = S3103App.ListCtrolExtension.Where(p => p.AgentName == record.ReAgent).ToList(); //} //if (templst.Count() > 0) //{ // taskinfodetail.AgtOrExtID = templst[0].AgentID; // taskinfodetail.AgtOrExtName = templst[0].AgentName; //} //else //{ // taskinfodetail.AgtOrExtID = ""; // taskinfodetail.AgtOrExtName = ""; //} templst = S3105App.ListCtrolAgentInfos.Where(p => p.AgentName == record.Agent).ToList(); optReturn = XMLHelper.SeriallizeObject(taskinfodetail); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); } webRequest.Data = currentTask.TaskID.ToString(); //client = new Service31031Client(); client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031")); //WebHelper.SetServiceClient(client); webReturn = client.UMPTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } //将任务号更新到录音表 var tableInfo = CurrentApp.Session.ListPartitionTables.FirstOrDefault( t => t.TableName == ConstValue.TABLE_NAME_RECORD && t.PartType == VoiceCyber.UMP.Common.TablePartType.DatetimeRange); if (tableInfo == null) { string tableName = ConstValue.TABLE_NAME_RECORD; foreach (RecordInfoItem r in lstRecordInfoItem) { webReturn = new WebReturn(); webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)ColAlias::S3103Codes.UpdateTaskID2Record; webRequest.ListData.Add(currentTask.TaskID.ToString()); webRequest.ListData.Add(tableName); webRequest.ListData.Add("2");//1 初检任务 2复检 webRequest.ListData.Add(r.SerialID.ToString()); //client = new Service31031Client(); client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031")); //WebHelper.SetServiceClient(client); webReturn = client.UMPTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } } } else { string tableName = string.Empty; foreach (RecordInfoItem r in lstRecordInfoItem) { webReturn = new WebReturn(); webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)ColAlias::S3103Codes.UpdateTaskID2Record; webRequest.ListData.Add(currentTask.TaskID.ToString()); tableName = ReturnTableName(Convert.ToDateTime(r.StartRecordTime)); webRequest.ListData.Add(tableName); webRequest.ListData.Add("2");//1 初检任务 2复检 webRequest.ListData.Add(r.SerialID.ToString()); //client = new Service31031Client(); client = new Service31031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31031")); //WebHelper.SetServiceClient(client); webReturn = client.UMPTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } } } } } catch (Exception ex) { CurrentApp.WriteOperationLog(ColAlias.S3103Consts.OPT_DoubleTaskAssign.ToString(), ConstValue.OPT_RESULT_FAIL, ""); ShowException(ex.Message); } //更改申诉表信息 string error = PrePage.UpdateReCheckData("8", AppealFlowItemID, SelCheckData); if (!string.IsNullOrEmpty(error)) { ShowException(error); } else { ShowInformation(CurrentApp.GetLanguageInfo("3105T00022", "Operation Succeed.")); PrePage.UpdateTable19("8"); ParentPage.ApprovalHistory(); ParentPage.BindData(); ParentPage.ShowProcessReCheck(false); #region 写操作日志 string strLog = string.Format("{0} {1}", Utils.FormatOptLogString("3105T00001"), SelCheckData.RecoredReference); CurrentApp.WriteOperationLog(S3105Consts.OPT_Approval.ToString(), ConstValue.OPT_RESULT_SUCCESS, strLog); #endregion } }
private void GetChildFileItems(ObjectItem parentItem) { try { string strAddress = GetService00Address(); if (string.IsNullOrEmpty(strAddress)) { ShowException(string.Format("Server address is empty")); return; } if (parentItem == null) { return; } var parentDir = parentItem.Data as DirInfo; if (parentDir == null) { return; } ServerRequestInfo requestInfo = new ServerRequestInfo(); requestInfo.ServerHost = strAddress; requestInfo.ServerPort = 8009; requestInfo.Command = (int)ServerRequestCommand.GetChildFileList; requestInfo.ListData.Add(parentDir.Path); OperationReturn optReturn = XMLHelper.SeriallizeObject(requestInfo); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S1110Codes.GetServerInfo; webRequest.Data = optReturn.Data.ToString(); Service11102Client client = new Service11102Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service11102")); WebReturn webReturn = null; if (MainPage != null) { MainPage.SetBusy(true, CurrentApp.GetMessageLanguageInfo("013", "Getting server file information")); } mWorker = new BackgroundWorker(); mWorker.DoWork += (s, de) => { try { webReturn = client.DoOperation(webRequest); client.Close(); } catch (Exception ex) { ShowException(ex.Message); } }; mWorker.RunWorkerCompleted += (s, re) => { mWorker.Dispose(); if (MainPage != null) { MainPage.SetBusy(false, string.Empty); } if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(string.Format("ListData is null")); return; } for (int i = 0; i < webReturn.ListData.Count; i++) { string info = webReturn.ListData[i]; string[] arrInfo = info.Split(new[] { ConstValue.SPLITER_CHAR }, StringSplitOptions.None); if (arrInfo.Length < 2) { continue; } FileInfo fileInfo = new FileInfo(); fileInfo.Name = arrInfo[0]; fileInfo.Path = arrInfo[1]; ObjectItem item = new ObjectItem(); item.Type = S1110Consts.OBJECTITEMTYPE_FILEINFO; item.Name = fileInfo.Name; item.Icon = string.Format("../Themes/Default/UMPS1110/Images/{0}", "file.png"); item.Description = fileInfo.Path; item.Data = fileInfo; parentItem.AddChild(item); } parentItem.IsExpanded = true; }; mWorker.RunWorkerAsync(); } catch (Exception ex) { ShowException(ex.Message); } }
private void GetDriverList() { try { string strAddress = GetService00Address(); if (string.IsNullOrEmpty(strAddress)) { ShowException(string.Format("Server address is empty")); return; } if (mUCPathLister == null) { return; } ObjectItem rootItem = mUCPathLister.RootItem; if (rootItem == null) { return; } ServerRequestInfo requestInfo = new ServerRequestInfo(); requestInfo.ServerHost = strAddress; requestInfo.ServerPort = 8009; requestInfo.Command = (int)ServerRequestCommand.GetDiskDriverList; string strGetSystemDisk = "0"; if (mConfigObject != null) { switch (mConfigObject.ObjectType) { case S1110Consts.RESOURCE_VOICESERVER: case S1110Consts.RESOURCE_NTIDRVPATH: strGetSystemDisk = "1"; break; } } requestInfo.ListData.Add(strGetSystemDisk); OperationReturn optReturn = XMLHelper.SeriallizeObject(requestInfo); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S1110Codes.GetServerInfo; webRequest.Data = optReturn.Data.ToString(); Service11102Client client = new Service11102Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service11102")); WebReturn webReturn = null; if (MainPage != null) { MainPage.SetBusy(true, CurrentApp.GetMessageLanguageInfo("003", "Getting server disk information...")); } mWorker = new BackgroundWorker(); mWorker.DoWork += (s, de) => { try { webReturn = client.DoOperation(webRequest); client.Close(); } catch (Exception ex) { ShowException(ex.Message); } }; mWorker.RunWorkerCompleted += (s, re) => { mWorker.Dispose(); if (MainPage != null) { MainPage.SetBusy(false, string.Empty); } if (webReturn == null) { return; } if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(string.Format("ListData is null")); return; } rootItem.Children.Clear(); for (int i = 0; i < webReturn.ListData.Count; i++) { string info = webReturn.ListData[i]; string[] arrInfo = info.Split(new[] { ConstValue.SPLITER_CHAR }, StringSplitOptions.None); if (arrInfo.Length < 2) { continue; } DirInfo dirInfo = new DirInfo(); dirInfo.Name = arrInfo[0]; dirInfo.Path = arrInfo[0] + "\\"; ObjectItem item = new ObjectItem(); item.Type = S1110Consts.OBJECTITEMTYPE_DIRINFO; item.Name = dirInfo.Name; item.Icon = string.Format("../Themes/Default/UMPS1110/Images/{0}", "driver.png"); item.Description = dirInfo.Path; item.Data = dirInfo; rootItem.AddChild(item); } }; mWorker.RunWorkerAsync(); } catch (Exception ex) { ShowException(ex.Message); } }
private void InitControlOrgs(ObjectItem parentItem, string parentID) { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S4601Codes.GetControlOrgInfoList; webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add(parentID); //Service46011Client client = new Service46011Client(); Service46011Client client = new Service46011Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service46011")); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(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; } string strID = arrInfo[0]; string strName = arrInfo[1]; ObjectItem item = new ObjectItem(); item.ObjType = ConstValue.RESOURCE_ORG; item.ObjID = Convert.ToInt64(strID); item.Name = strName; item.Data = strInfo; item.ParantID = strID; if (strID == ConstValue.ORG_ROOT.ToString()) { item.Icon = "Images/rootorg.ico"; } else { item.Icon = "Images/org.ico"; } mListAllObjects.Add(item); InitControlOrgs(item, strID); InitControlUsers(item, strID); if (GroupingWay.IndexOf("R") >= 0) { InitControlRealExtensions(item, strID); } if (GroupingWay.IndexOf("E") >= 0) { InitControlExtensions(item, strID); } if (GroupingWay.IndexOf("A") >= 0) { InitControlAgents(item, strID); } AddChildObject(parentItem, item); } } catch (Exception ex) { ShowException(ex.Message); } }
private void InitConversationInfo() { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3102Codes.GetConversationInfo; webRequest.ListData.Add(PlayingRecord.RecordReference.ToString()); Service31021Client client = new Service31021Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service31021")); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(string.Format("Fail.\tListData is null")); return; } List <ConversationInfoItem> listTemp = new List <ConversationInfoItem>(); for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; OperationReturn optReturn = XMLHelper.DeserializeObject <ConversationInfo>(strInfo); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } ConversationInfo info = optReturn.Data as ConversationInfo; ConversationInfoItem infoItem = new ConversationInfoItem(info); if (infoItem.Direction == "0") { infoItem.Icon = "Images/0.ico"; if (PlayingRecord.Direction == 0) { infoItem.Extension = PlayingRecord.CallerID; } if (PlayingRecord.Direction == 1) { infoItem.Extension = PlayingRecord.CalledID; } } if (infoItem.Direction == "1") { infoItem.Icon = "Images/1.ico"; if (PlayingRecord.Direction == 0) { infoItem.Extension = PlayingRecord.CalledID; } if (PlayingRecord.Direction == 1) { infoItem.Extension = PlayingRecord.CallerID; } } if (infoItem.SerialID == "0") { infoItem.IsVisible = false; } else { infoItem.IsVisible = true; } if (info == null) { ShowException(string.Format("Fail.\tConversationInfo is null")); return; } listTemp.Add(infoItem); } listTemp = listTemp.OrderBy(t => t.Offset).ToList(); for (int i = 0; i < listTemp.Count; i++) { mListConversationInfoItem.Add(listTemp[i]); } //mListConversationInfoItem = listTemp; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void InitControlObjectItemInSkillGroup(ObjectItem parentItem, string parentID) { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S4601Codes.GetControlObjectInfoListInSkillGroup; webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add(parentID); webRequest.ListData.Add(GroupingWay); //Service46011Client client = new Service46011Client(); Service46011Client client = new Service46011Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service46011")); //WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(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); string strID = string.Empty; string strIP = string.Empty; string strName = string.Empty; string strFullName = string.Empty; ObjectItem item = new ObjectItem(); if (arrInfo.Length < 3) { continue; } if (arrInfo.Length == 4) { strID = arrInfo[0]; strIP = arrInfo[1]; strName = arrInfo[2]; strFullName = arrInfo[3]; item.ObjID = Convert.ToInt64(strID); item.FullName = strIP; item.Description = strFullName; item.Name = strName; item.ObjType = ConstValue.RESOURCE_EXTENSION; item.Icon = "Images/extension.ico"; } else { strID = arrInfo[0]; strName = arrInfo[1]; strFullName = arrInfo[2]; if (strID.IndexOf("103") == 0) { item.ObjType = ConstValue.RESOURCE_AGENT; item.ObjID = Convert.ToInt64(strID); item.Name = strName; item.Description = strFullName; item.Data = strInfo; item.Icon = "Images/agent.ico"; } else { item.ObjType = ConstValue.RESOURCE_REALEXT; item.ObjID = Convert.ToInt64(strID); item.Name = strName; item.Description = strFullName; item.Data = strInfo; item.Icon = "Images/RealExtension.ico"; } } item.ParantID = parentID; mListAllObjects.Add(item); AddChildObject(parentItem, item); } } catch (Exception ex) { ShowException(ex.Message); } }
public WebReturn DoOperation(WebRequest RResult) { // bool flag = false; WebReturn result = new WebReturn(); result.Result = true; string SQL = RResult.Data; SessionInfo session = RResult.Session; string Conn = session.DBConnectionString; int num = session.DBType; if (RResult == null) { result.Message = "There is no available parameters"; result.Result = false; return(result); } OperationReturn OpeReturn = new OperationReturn(); //string where = RResult.StringValue; //int number = RResult.IntValue; switch (RResult.Code) { case 701: OpeReturn = GetDataSetFromDB(SQL, Conn, num); if (OpeReturn.Result) { result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C003"); } else { result.Message = OpeReturn.Message; result.Result = false; } //flag = false; break; case 100: OpeReturn = GetDataSetFromDB(SQL, Conn, num); if (OpeReturn.Result) { result.DataSetData = OpeReturn.Data as DataSet; } else { result.Message = OpeReturn.Message; result.Result = false; } //flag = false; break; case 200: OpeReturn = GetDataSetFromDB(SQL, Conn, num); if (OpeReturn.Result) { result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C002"); } else { result.Message = OpeReturn.Message; result.Result = false; } //flag = false; break; case 102: OpeReturn = GetDataSetFromDB(SQL, Conn, num); if (OpeReturn.Result) { result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C017"); result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C018"); } else { result.Message = OpeReturn.Message; result.Result = false; } //flag = false; break; case 103: OpeReturn = GetDataSetFromDB(SQL, Conn, num); if (OpeReturn.Result) { result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C002"); result.DataSetData = CryptProcess(OpeReturn.Data as DataSet, "C003"); } else { result.Message = OpeReturn.Message; result.Result = false; } //flag = false; break; //case 201: // OperationReturn ORTemp = GetDataSetFromDB(string.Format("SELECT C017 FROM T_11_101_{0} WHERE C001 IN (SELECT C004 FROM T_11_201_{0} WHERE C003={1}",session.RentInfo.Token,session.UserID), Conn, num); // DataSet ds_temp = new DataSet(); // if (ORTemp.Result) // ds_temp = CryptProcess(ORTemp.Data as DataSet, "C017"); // break; default: break; } #region 加载相应的报表 //if (flag) //{ // result.DataSetData = GetReportData(RResult, OpeReturn); //} //else //{ // result.StringValue = "敬请期待"; // result.BoolValue = false; //} return(result); #endregion }
//写一个方法 然后将选中的录音 放到文件夹下面(首先我能够获得选中的录音,以及能够写的描述了) private bool AddRecordToLibrary() { try { var tempitem = LibraryTree.SelectedItem as ObjectItem; if (SelectRecordInfoItem.MediaType != 1) { ShowException(CurrentApp.GetLanguageInfo("3102N051", "上传到教材库的不能有录屏")); return(false); } //文件夹路径 if (tempitem == null) { ShowException(CurrentApp.GetLanguageInfo("3102N052", "必须选择一个文件夹")); return(false); } string path = GetPath(tempitem.Name, tempitem); //教材库文件夹主键 ,T_31_058_00000.C001 string dirID = tempitem.ObjID.ToString(); //if (string.IsNullOrWhiteSpace(dirID) || string.IsNullOrEmpty(dirID)) //{ // ShowException("必须选择一个文件夹"); // return false; //} //教材名字 我这里就是录音ID 而不是录音流水号 string learningName = SelectRecordInfoItem.SerialID.ToString(); //录音流水号存放在教材库的路径 string recordPath = path + @"\" + SelectRecordInfoItem.RecordReference + ".wav"; //描述 string tempDiscription = DiscriptionText.Text.ToString(); if (tempDiscription.IndexOf("'") != -1) { string tempa = tempDiscription.Replace("'", "''"); tempDiscription = tempa; } if (string.IsNullOrWhiteSpace(tempDiscription) || string.IsNullOrEmpty(tempDiscription)) { ShowException(CurrentApp.GetLanguageInfo("3102N053", "描述不能为空或者为空格")); return(false); } //该录音是否加密 string isEncrytp = SelectRecordInfoItem.EncryptFlag == "0"?"0":"1"; WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3102Codes.InsertLearningToLibrary; webRequest.ListData.Add(dirID); webRequest.ListData.Add(learningName); webRequest.ListData.Add(recordPath); webRequest.ListData.Add(tempDiscription); webRequest.ListData.Add(isEncrytp); //Service31021Client client = new Service31021Client(); Service31021Client client = new Service31021Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service31021")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return(false); } return(true); } catch (Exception ex) { ShowException(ex.ToString()); return(false); } }
private void SaveRegionMap() { try { if (mRegionInfo == null) { return; } List <RegionSeatInfo> listRegionSeats = new List <RegionSeatInfo>(); for (int i = 0; i < mListSeatItems.Count; i++) { var item = mListSeatItems[i]; var info = item.Info; if (info == null) { continue; } info.Modifier = CurrentApp.Session.UserID; info.ModifyTime = DateTime.Now.ToUniversalTime(); listRegionSeats.Add(info); } int count = listRegionSeats.Count; WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S4410Codes.SaveRegionSeatInfo; webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add("0"); webRequest.ListData.Add(mRegionInfo.ObjID.ToString()); webRequest.ListData.Add(count.ToString()); OperationReturn optReturn; for (int i = 0; i < count; i++) { optReturn = XMLHelper.SeriallizeObject(listRegionSeats[i]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); } Service44101Client client = new Service44101Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service44101")); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(string.Format("Fail.\tListData is null")); return; } for (int i = 0; i < webReturn.ListData.Count; i++) { CurrentApp.WriteLog("SaveRegionMap", string.Format("{0}", webReturn.ListData[i])); } ShowInformation(CurrentApp.GetLanguageInfo("COMN003", string.Format("Save end"))); } catch (Exception ex) { ShowException(ex.Message); } }
private void InitmListABCDItems() { try { if (mListABCDItems == null) { return; } mListABCDItems.Clear(); //string ItemID = Statistic.StatisticalParamID.ToString(); //List<StatisticalParamItem> ItemParamTemplateList = (from item in ListABCDItems // where item.StatisticalParamID.ToString() == ItemID // orderby item.SortID // select item).ToList(); if (ListABCDItems == null || ListABCDItems.Count == 0) { return; } for (int i = 0; i < ListABCDItems.Count; i++) { StatisticalParamItemModel ItemModel = new StatisticalParamItemModel(ListABCDItems[i], CurrentApp); Dispatcher.Invoke(new Action(() => { mListABCDItems.Add(ItemModel); })); } InitStatisticConfig();//获取大项,如果绑定了机构的话。更新现有大项(52+26) if (Statistic == null) { return; } if (Statistic.StatisticKey != 0) { try { //(44) WebRequest webRequest = new WebRequest(); webRequest.Code = (int)S3108Codes.GetOrgItemRelation; webRequest.Session = CurrentApp.Session; webRequest.ListData.Add(Statistic.StatisticKey.ToString()); Service31081Client client = new Service31081Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31081")); WebHelper.SetServiceClient(client); //Service31081Client client = new Service31081Client(); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("InitmListABCDItems Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } for (int i = 0; i < webReturn.ListData.Count; i += 2) { string Code = webReturn.ListData[i]; string Value = webReturn.ListData[i + 1]; for (int j = 0; j < mListABCDItems.Count; j++) { if (Code == mListABCDItems[j].StatisticalParamItemID.ToString()) { string[] StrValue = mListABCDItems[j].Value.Split('?'); mListABCDItems[j].Value = string.Format("{0}?{1}?{2}", Value, StrValue[1], StrValue[2]); mListABCDItems[j].IsUsed = true; break; } } } } catch (Exception ex) { ShowException(ex.Message); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void LoadUserOrgs(ObjectItem parentItem) { string OrgID = string.Empty; try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)RequestCode.WSGetUserObjList; webRequest.ListData.Add(UserItem.ObjID.ToString()); webRequest.ListData.Add("0"); webRequest.ListData.Add(ConstValue.RESOURCE_ORG.ToString()); webRequest.ListData.Add("-1"); Service11012Client client = new Service11012Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service11012")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); } if (webReturn.ListData == null) { ShowException(string.Format("Fail.\tListData is null")); } if (webReturn.ListData.Count > 0) //for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[0]; string[] arrInfo = strInfo.Split(new[] { ConstValue.SPLITER_CHAR }, StringSplitOptions.RemoveEmptyEntries); if (arrInfo.Length < 2) { return; } OrgID = arrInfo[0]; string strName = arrInfo[1]; ObjectItem item = new ObjectItem(); item.ObjType = ConstValue.RESOURCE_ORG; item.ObjID = Convert.ToInt64(OrgID); item.Name = strName; item.Data = strInfo; if (OrgID == ConstValue.ORG_ROOT.ToString()) { item.Icon = "Images/root.ico"; } else { item.Icon = "Images/org.ico"; } LoadAvaliableOrgs(item, OrgID); LoadAvaliableUsers(item, OrgID); if (PageParent.InitParameter.Contains("A")) { LoadAvaliableAgents(item, OrgID); } if (PageParent.InitParameter.Contains("E")) { LoadAvaliableExts(item, OrgID); } if (PageParent.InitParameter.Contains("R")) { LoadAvaliableRealExts(item, OrgID); } Dispatcher.Invoke(new Action(() => parentItem.AddChild(item))); mListObjectItems.Add(item); } } catch (Exception ex) { ShowException(ex.Message); } }
/// <summary> /// 获得当前用户可以管理的用户 /// </summary> /// <returns></returns> public static OperationReturn GetCotrlUser() { OperationReturn optReturn = new OperationReturn(); optReturn.Result = true; optReturn.Code = Defines.RET_SUCCESS; Service11012Client client = null; try { string strUserID = App.Session.UserID.ToString(); WebRequest webRequest = new WebRequest(); webRequest.Code = (int)RequestCode.WSGetUserCtlObjList; webRequest.Session = App.Session; webRequest.ListData.Add(App.Session.UserInfo.UserID.ToString()); webRequest.ListData.Add("1"); webRequest.ListData.Add(ConstValue.RESOURCE_USER.ToString()); webRequest.ListData.Add(string.Empty); webRequest.ListData.Add("3"); App.MonitorHelper.AddWebRequest(webRequest); client = new Service11012Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service11012")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); App.MonitorHelper.AddWebReturn(webReturn); client.Close(); if (!webReturn.Result) { optReturn.Result = false; optReturn.Code = webReturn.Code; optReturn.Message = webReturn.Message; return(optReturn); } if (webReturn.ListData == null) { optReturn.Result = false; optReturn.Code = (int)S6106WcfErrorCode.GetUserPermissionFailed; return(optReturn); } List <string> lstUserIDs = new List <string>(); ResourceObject res = null; for (int i = 0; i < webReturn.ListData.Count; i++) { optReturn = XMLHelper.DeserializeObject <ResourceObject>(webReturn.ListData[i]); if (optReturn.Result) { res = optReturn.Data as ResourceObject; lstUserIDs.Add(res.ObjID.ToString()); } } optReturn.Data = lstUserIDs; return(optReturn); } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); return(optReturn); } finally { if (client != null) { if (client.State == System.ServiceModel.CommunicationState.Opened) { client.Close(); } } } }
private void SetUserControlObject() { if (UserItem == null) { return; } BasicUserInfo userInfo = UserItem.Data as BasicUserInfo; if (userInfo == null) { return; } List <string> listObjectState = new List <string>(); SetUserControlObject(mRootItem, ref listObjectState); if (IsCheckSelfPrimission) { if (listObjectState.Count > 0) { int count = listObjectState.Count; if (PageParent != null) { PageParent.SetBusy(true, string.Empty); } mWorder = new BackgroundWorker(); mWorder.DoWork += (s, de) => { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S1101Codes.SetUserControlObject; webRequest.ListData.Add(userInfo.UserID.ToString()); webRequest.ListData.Add(count.ToString()); for (int i = 0; i < count; i++) { webRequest.ListData.Add(listObjectState[i]); } Service11011Client client = new Service11011Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service11011")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); } #region 记录日志 string strAdded = string.Empty; string strRemoved = string.Empty; List <string> listLogParams = new List <string>(); if (webReturn.ListData != null && webReturn.ListData.Count > 0) { for (int i = 0; i < webReturn.ListData.Count; i++) { string strInfo = webReturn.ListData[i]; string[] arrInfos = strInfo.Split(new[] { ConstValue.SPLITER_CHAR }, StringSplitOptions.RemoveEmptyEntries); if (arrInfos.Length >= 2) { if (arrInfos[0] == "A") { var objItem = mListObjectItems.FirstOrDefault(o => o.ObjID.ToString() == arrInfos[1]); if (objItem != null) { strAdded += objItem.Name + ","; } else { strAdded += arrInfos[1] + ","; } } if (arrInfos[0] == "D") { var objItem = mListObjectItems.FirstOrDefault(o => o.ObjID.ToString() == arrInfos[1]); if (objItem != null) { strRemoved += objItem.Name + ","; } else { strRemoved += arrInfos[1] + ","; } } } } strAdded = strAdded.TrimEnd(new[] { ',' }); strRemoved = strRemoved.TrimEnd(new[] { ',' }); } listLogParams.Add(userInfo.FullName); listLogParams.Add(strAdded); listLogParams.Add(strRemoved); CurrentApp.WriteOperationLog(S1101Consts.OPT_SETUSERMANAGEMENT.ToString(), ConstValue.OPT_RESULT_SUCCESS, "LOG1101001", listLogParams); #endregion } catch (Exception ex) { ShowException(ex.Message); } }; mWorder.RunWorkerCompleted += (s, re) => { mWorder.Dispose(); if (PageParent != null) { PageParent.SetBusy(false, string.Empty); } var parent = Parent as PopupPanel; if (parent != null) { parent.IsOpen = false; } }; mWorder.RunWorkerAsync(); } } }
private WebReturn DealMonitorMessage(WebRequest request) { WebReturn webReturn = new WebReturn(); webReturn.Session = Session; webReturn.Result = true; webReturn.Code = 0; try { //ListData //0 Open/Close ( 0 表示关闭,之后不再向列表中添加监视对象;1 表示开启) //1 Command (指令,0 表示获取监控列表中的对象) if (request.ListData == null || request.ListData.Count < 2) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("ListData is null or count invalid"); return(webReturn); } bool isRemember = request.ListData[0] == "1"; MonitorHelper.IsRememberObject = isRemember; int command; if (!int.TryParse(request.ListData[1], out command)) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("Command invalid"); return(webReturn); } if (command == 0) { return(MonitorHelper.DealMonitorMessage(request)); } //OperationReturn optReturn; switch (command) { case ConstValue.MONITOR_COMMAND_GETSESSIONINFO: webReturn.Data = Session.ToString(); break; default: List <string> listArgs = new List <string>(); for (int i = 2; i < request.ListData.Count; i++) { listArgs.Add(request.ListData[i]); } var app = Current; if (app != null) { webReturn = app.OnMonitorMessage(command, listArgs); } break; } } catch (Exception ex) { webReturn.Result = false; webReturn.Code = 1; webReturn.Message = ex.Message; } return(webReturn); }
private void InitControlOrgs(ObjectItem parentItem, string parentID) { try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)WebCodes.GetControlOrgInfoList; webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add(parentID); Service61012Client client = new Service61012Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress( CurrentApp.Session.AppServerInfo, "Service61012")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.UMPReportOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } if (webReturn.ListData == null) { ShowException(string.Format("Fail.\tListData is null")); return; } List <ObjectItem> TempObjItems = new List <ObjectItem>(); 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; } string strID = arrInfo[0]; string strName = arrInfo[1]; ObjectItem item = new ObjectItem(); item.ObjType = ConstValue.RESOURCE_ORG; item.ObjID = Convert.ToInt64(strID); item.Name = strName; item.Data = strInfo; item.DisplayContent = string.Format("{0}", strName); if (strID == ConstValue.ORG_ROOT.ToString()) { item.Icon = "Images/rootorg.ico"; } else { item.Icon = "Images/org.ico"; } TempObjItems.Add(item); } TempObjItems.OrderBy(p => p.Name); foreach (ObjectItem item in TempObjItems) { InitControlOrgs(item, item.ObjID.ToString()); InitExtension(item, item.ObjID.ToString()); AddChildObject(parentItem, item); } } catch (Exception ex) { ShowException(ex.Message); } }
private void SaveRecordEncryptConfig() { try { if (ListRecordEncryptInfos == null) { return; } List <UserParamInfo> listInfos = new List <UserParamInfo>(); for (int i = 0; i < ListRecordEncryptInfos.Count; i++) { var item = ListRecordEncryptInfos[i]; if (!item.IsRemember) { continue; } UserParamInfo up = new UserParamInfo(); up.UserID = App.Session.UserID; up.ParamID = S3104Consts.USER_PARAM_GROUP_ENCRYPTINFO * 1000 + 1 + i; up.GroupID = S3104Consts.USER_PARAM_GROUP_ENCRYPTINFO; up.SortID = i; up.DataType = DBDataType.NVarchar; string strValue = string.Format("{0}{1}{2}{1}{3}", item.ServerAddress, ConstValue.SPLITER_CHAR_3, item.Password, item.EndTime.ToString("yyyyMMddHHmmss")); up.ParamValue = strValue; listInfos.Add(up); } int cout = listInfos.Count; if (cout <= 0) { return; } OperationReturn optReturn; WebRequest webRequest = new WebRequest(); webRequest.Code = (int)RequestCode.WSSaveUserParamList; webRequest.Session = App.Session; webRequest.ListData.Add(App.Session.UserInfo.UserID.ToString()); webRequest.ListData.Add(cout.ToString()); for (int i = 0; i < cout; i++) { var up = listInfos[i]; optReturn = XMLHelper.SeriallizeObject(up); if (!optReturn.Result) { App.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); } //App.MonitorHelper.AddWebRequest(webRequest); Service11012Client client = new Service11012Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service11012")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.DoOperation(webRequest); //App.MonitorHelper.AddWebReturn(webReturn); client.Close(); if (!webReturn.Result) { App.ShowExceptionMessage(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); } } catch (Exception ex) { App.WriteLog("SaveEncryptConfig", string.Format("Fail.\t{0}", ex.Message)); } }
private void SaveQueryCondition() { if (this.CbSaveConditions.IsChecked == true) { //循环找出是否有重名的,有的话覆盖资料 string conditionName = this.ComboQueryConditions.Text; if (conditionName.Trim() == string.Empty) { CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("6101N0006", "Name cannot be Empty.")); return; } long queryCode = 0; List <string> ListSaveDatas = new List <string>(); QueryCondition SaveCondition = new QueryCondition(); bool Flag = false; for (int i = 0; i < mListQueryConditions.Count; i++) { if (mListQueryConditions[i].Name == conditionName) { SaveCondition.IsUse = mListQueryConditions[i].IsUse; SaveCondition.mName = mListQueryConditions[i].Name; SaveCondition.mDescription = mListQueryConditions[i].Description; SaveCondition.Priority = mListQueryConditions[i].Priority; SaveCondition.QueryCode = mListQueryConditions[i].QueryCode; SaveCondition.UserID = mListQueryConditions[i].UserID; SaveCondition.ReportCode = mListQueryConditions[i].ReportCode; SaveCondition.SetTime = mListQueryConditions[i].SetTime; SaveCondition.LastUseTime = mListQueryConditions[i].LastUseTime; SaveCondition.Source = mListQueryConditions[i].Source; Flag = true; break; } } if (!Flag)//没找到,要新建 { SaveCondition.QueryCode = 0; SaveCondition.UserID = CurrentApp.Session.UserID; SaveCondition.ReportCode = 61010018; SaveCondition.SetTime = DateTime.Now; SaveCondition.Source = 'S'; SaveCondition.LastUseTime = DateTime.Now; SaveCondition.mName = this.ComboQueryConditions.Text; SaveCondition.mDescription = this.ComboQueryConditions.Text; SaveCondition.Priority = mListQueryConditions.Count; SaveCondition.IsUse = true; } OperationReturn optReturn = XMLHelper.SeriallizeObject <QueryCondition>(SaveCondition); if (!optReturn.Result) { ShowException(CurrentApp.GetLanguageInfo("", "Save Fail!")); return; } ListSaveDatas.Add(optReturn.Data as string); queryCode = SaveCondition.QueryCode; //添加detail。 for (int i = 1; i <= 3; i++) { QueryConditionItem queryItem = new QueryConditionItem(); queryItem.QueryConditionCode = queryCode; queryItem.Sort = i; queryItem.Type = 0; switch (i) { case 1: //录音时间 queryItem.QueryItemCode = (long)Const6101.Query_RecordTime; queryItem.Value1 = this.UC_DateTime_Begin.Text; queryItem.Value2 = this.UC_DateTime_End.Text; queryItem.Value3 = this.CBXLoggedTime.SelectedIndex.ToString(); break; case 3: //查询类型 queryItem.QueryItemCode = (long)Const6101.Query_QueryType; queryItem.Value1 = this.CBTypeOfReport.SelectedIndex.ToString(); break; case 2: //分机 queryItem.QueryItemCode = (long)Const6101.Query_Extension; if (!IsAllExt) { List <string> TempData = new List <string>(); for (int j = 0; j < mListSelectedObjects.Count; j++) { TempData.Add(mListSelectedObjects[j].FullName); } TempData = SaveQueryConditionItems(TempData, queryCode, queryItem.QueryItemCode); foreach (string Str in TempData) { ListSaveDatas.Add(Str); } } break; } OperationReturn optReturnItem = XMLHelper.SeriallizeObject <QueryConditionItem>(queryItem); if (!optReturnItem.Result) { ShowException(CurrentApp.GetLanguageInfo("", "Save Fail!")); return; } ListSaveDatas.Add(optReturnItem.Data as string); } //调用函数方法保存 WebRequest webRequest = new WebRequest(); webRequest.Code = (int)WebCodes.SaveQueryCondition; webRequest.ListData = ListSaveDatas; webRequest.Session = CurrentApp.Session; Service61012Client client = new Service61012Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service61012")); WebHelper.SetServiceClient(client); WebReturn webReturn = client.UMPReportOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } S6101App.InitObjects(); InitQueryCondition(); } }
private void SaveUserWidgetInfos() { try { List <WidgetInfo> listInfos = new List <WidgetInfo>(); for (int i = 0; i < mListLeftWidgetItems.Count; i++) { var item = mListLeftWidgetItems[i]; var info = item.WidgetInfo; if (info == null) { continue; } info.IsCenter = false; info.SortID = i; listInfos.Add(info); } for (int i = 0; i < mListCenterWidgetItems.Count; i++) { var item = mListCenterWidgetItems[i]; var info = item.WidgetInfo; if (info == null) { continue; } info.IsCenter = true; info.SortID = i; listInfos.Add(info); } int count = listInfos.Count; WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S1200Codes.SaveUserWidgetInfos; webRequest.ListData.Add(CurrentApp.Session.UserID.ToString()); webRequest.ListData.Add(count.ToString()); OperationReturn optReturn; for (int i = 0; i < count; i++) { var info = listInfos[i]; optReturn = XMLHelper.SeriallizeObject(info); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); } Service12001Client client = new Service12001Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service12001")); WebReturn webReturn = client.DoOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)); return; } ShowInformation(CurrentApp.GetLanguageInfo("1206N001", "Save End")); if (PageParent != null) { PageParent.Reload(); } var popup = Parent as PopupPanel; if (popup != null) { popup.IsOpen = false; } } catch (Exception ex) { ShowException(ex.Message); } }
public WebReturn DoOperation(WebRequest webRequest) { WebReturn webReturn = new WebReturn(); webReturn.Result = true; webReturn.Code = 0; if (webRequest == null) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("WebRequest is null"); return(webReturn); } SessionInfo session = webRequest.Session; if (session == null) { webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("SessionInfo is null"); return(webReturn); } webReturn.Session = session; try { OperationReturn optReturn; DatabaseInfo dbInfo = session.DatabaseInfo; if (dbInfo != null) { dbInfo.RealPassword = DecryptString04(dbInfo.Password); session.DBConnectionString = dbInfo.GetConnectionString(); } switch (webRequest.Code) { case (int)S3102Codes.GetAllCustomConditionItem: optReturn = GetAllCustomCondition(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetUserQueryCondition: optReturn = GetUserQueryCondition(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetUserCustomConditionItem: optReturn = GetUserCustomConditionItem(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetConditionSubItem: optReturn = GetConditionSubItem(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetQueryConditionDetail: optReturn = GetQueryConditionDetail(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.CreateQueryConditionString: optReturn = CreateQueryConditionString(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetRecordData: optReturn = GetRecordData(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveConditions: optReturn = SaveConditions(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.SaveConditionSubItems: optReturn = SaveConditionSubItems(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.GetControlOrgInfoList: optReturn = GetControlOrgInfoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetControlAgentInfoList: optReturn = GetControlAgentInfoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetControlExtensionInfoList: optReturn = GetControlExtensionInfoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetControlRealExtensionInfoList: optReturn = GetControlRealExtensionInfoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetRecordMemoList: optReturn = GetRecordMemoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveRecordMemoInfo: optReturn = SaveRecordMemoInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.GetUserScoreSheetList: optReturn = GetUserScoreSheetList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetScoreSheetInfo: optReturn = GetScoreSheetInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.GetScoreResultList: optReturn = GetScoreResultList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetScoreCommentResultList: optReturn = GetScoreCommentResultList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveScoreSheetResult: optReturn = SaveScoreSheetResult(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.SaveScoreItemResult: optReturn = SaveScoreItemResultInfo(session, webRequest.ListData); //FileLog.WriteInfo("SaveScoreItemResult", "1"); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveScoreDataResult: optReturn = SaveScoreDataResult(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveScoreCommentResultInfos: optReturn = SaveScoreCommentResultInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetUserSettingList: optReturn = GetUserSettingList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveUserSettingInfos: optReturn = SaveUserSettingInfos(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveViewColumnInfos: optReturn = SaveViewColumnInfos(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveUserConditionItemInfos: optReturn = SaveUserConditionItemInfos(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SavePlayInfo: optReturn = SavePlayInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetPlayInfoList: optReturn = GetPlayInfoList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.InsertConditionSubItems: optReturn = InsertConditionSubItems(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.InsertManageObjectQueryInfos: optReturn = InsertManageObjectQueryInfos(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.GetRecordBookmarkList: optReturn = GetRecordBookmarkList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetSftpServerList: optReturn = GetSftpServerList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetDownloadParamList: optReturn = GetDownloadParamList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetRelativeRecordList: optReturn = GetRelativeRecordList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveRecordBookmarkInfo: optReturn = SaveRecordBookmarkInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetBookmarkRankList: optReturn = GetBookmarkRankList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveBookmarkRankInfo: optReturn = SaveBookmarkRankInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveMemoInfoToT_21_001: optReturn = SaveMemoInfoToT_21_001(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.SaveBookMarkTitleToT_21_001: optReturn = SaveBookMarkTitleToT_21_001(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetInspectorList: optReturn = GetInspectorList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetAllScoreSheetList: optReturn = GetAllScoreSheetList(session); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetRecordScoreDetail: optReturn = GetRecordScoreDetail(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.IsComplainedRecord: optReturn = IsComplainedRecord(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data as string; break; case (int)S3102Codes.IsTaskedRecord: optReturn = IsTaskedRecord(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data as string; break; case (int)S3102Codes.GetSkillGroupInfo: optReturn = GetSkillGroupInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetOrgSkillGroupInf: optReturn = GetOrgSkillGroupInf(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetOrgList: optReturn = GetOrgList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetAgentList: optReturn = GetAgentList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetExtensionList: optReturn = GetExtensionList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.ExecuteStrSql: optReturn = ExecuteStrSql(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetLibraryFolder: optReturn = GetLibraryFolder(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetLibraryFolderContent: optReturn = GetLibraryFolderContent(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.GetConversationInfo: optReturn = GetConversationInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.InsertLearningToLibrary: optReturn = InsertLearningToLibrary(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data as string; break; case (int)S3102Codes.GetAutoScore: optReturn = GetAutoScore(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.UpLoadFiles: optReturn = UMPUpOperation(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } //webReturn.ListData = optReturn.Data as List<string>; break; case (int)S3102Codes.DeleteUsersRecordBookMark: optReturn = DeleteUsersRecordBookMark(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data as string; break; case (int)S3102Codes.GetKeyWordsInfo: optReturn = GetKeyWordsInfo(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; case (int)S3102Codes.UMPDeleteOperation: optReturn = UMPDeleteOperation(webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } break; case (int)S3102Codes.GetBookMarkRecordPath: optReturn = GetBookMarkRecordPath(); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data.ToString(); break; case (int)S3102Codes.SaveQueryResult: optReturn = SaveQueryResult(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.Data = optReturn.Data == null ? string.Empty : optReturn.Data.ToString(); break; case (int)S3102Codes.GetKeywordResultList: optReturn = GetKeywordResultList(session, webRequest.ListData); if (!optReturn.Result) { webReturn.Result = false; webReturn.Code = optReturn.Code; webReturn.Message = optReturn.Message; return(webReturn); } webReturn.ListData = optReturn.Data as List <string>; break; default: webReturn.Result = false; webReturn.Code = Defines.RET_PARAM_INVALID; webReturn.Message = string.Format("Request code invalid.\t{0}", webRequest.Code); return(webReturn); } webReturn.Message = optReturn.Message; } catch (Exception ex) { webReturn.Result = false; webReturn.Code = Defines.RET_FAIL; webReturn.Message = ex.Message; return(webReturn); } return(webReturn); }