public static OperationDataArgs UserLogOff() { OperationDataArgs result = new OperationDataArgs(); BasicHttpBinding binding = Common.CreateBasicHttpBinding(60); EndpointAddress adress = Common.CreateEndPoint("HTTP", App.GCurrentUmpServer.Host, App.GCurrentUmpServer.Port, "WcfServices", "Service00000"); Service00000Client client = new Service00000Client(binding, adress); try { List <string> lstParams = new List <string>(); string LStrVerificationCode004 = Common.CreateVerificationCode(PFShareClassesC.EncryptionAndDecryption.UMPKeyAndIVType.M004); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(App.GCurrentUser.TenantID, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(App.GCurrentUser.UserID, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(App.GCurrentUser.SessionID, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); result = client.OperationMethodA(12, lstParams); } catch (Exception ex) { result.BoolReturn = false; result.StringReturn = ex.Message; } finally { if (client.State == CommunicationState.Opened) { client.Close(); } } return(result); }
/// <summary> /// 用户登录(检查密码是否正确 是否已经在另一台机器登录等) /// </summary> /// <param name="strHost"></param> /// <param name="strPort"></param> /// <param name="strUser"></param> /// <param name="strPwd"></param> /// <param name="strLoginMethod"></param> /// <param name="strClientMachineName"></param> /// <returns></returns> public static OperationDataArgs UserLogin(string strHost, string strPort, string strUser, string strPwd, string strLoginMethod, string strClientMachineName) { OperationDataArgs result = new OperationDataArgs(); BasicHttpBinding binding = Common.CreateBasicHttpBinding(60); EndpointAddress adress = Common.CreateEndPoint("HTTP", strHost, strPort, "WcfServices", "Service00000"); Service00000Client client = new Service00000Client(binding, adress); try { List <string> lstParams = new List <string>(); string LStrVerificationCode004 = Common.CreateVerificationCode(PFShareClassesC.EncryptionAndDecryption.UMPKeyAndIVType.M004); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(strUser, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(strPwd, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(strLoginMethod, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); lstParams.Add(EncryptionAndDecryption.EncryptDecryptString(strClientMachineName, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004)); result = client.OperationMethodA(11, lstParams); } catch (Exception ex) { result.BoolReturn = false; result.StringReturn = ex.Message; } finally { if (client.State == CommunicationState.Opened) { client.Close(); } } return(result); }
private void IBWSaveData_DoWork(object sender, DoWorkEventArgs e) { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { LListStrWcfArgs = e.Argument as List <string>; LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(22, LListStrWcfArgs); IStrCallReturn = LWCFOperationReturn.StringReturn; IBoolCallReturn = LWCFOperationReturn.BoolReturn; IListStrAfterSave.Clear(); if (IBoolCallReturn) { foreach (string LStrSingleArgs in LListStrWcfArgs) { IListStrAfterSave.Add(LStrSingleArgs); } IListStrAfterSave[4] = IStrCallReturn; } } catch (Exception ex) { IBoolCallReturn = false; IStrCallReturn = ex.ToString(); } }
private void IBackgroundWorkerObtainNeededData_DoWork(object sender, DoWorkEventArgs e) { List <string> LListStrWcfArgs = new List <string>(); Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; IDataTableMAMTSupportL = new DataTable(); LListStrWcfArgs.Add(App.GClassSessionInfo.LangTypeInfo.LangID.ToString()); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(31, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTableMAMTSupportL = LWCFOperationReturn.DataSetReturn.Tables[0]; } else { IDataTableMAMTSupportL = null; } LService00000Client.Close(); LService00000Client = null; }
/// <summary> /// 加载语言包 /// </summary> public static void LoadApplicationLanguages() { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); IDataTableLanguage = new DataTable(); LListStrWcfArgs.Add(GClassSessionInfo.LangTypeInfo.LangID.ToString()); LWCFOperationReturn = LService00000Client.OperationMethodA(33, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTableLanguage = LWCFOperationReturn.DataSetReturn.Tables[0]; } } catch { } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }
/// <summary> /// 根据ObjectID和Page获得对应的语言 /// </summary> /// <param name="strUmpServerPort"></param> /// <param name="strUmpServerHost"></param> /// <param name="strDBHost"></param> /// <param name="strDBPort"></param> /// <param name="strMessageID"></param> /// <returns></returns> public static string GetLanguageItemInDBByObjectIDAndPage(ServerInfomation UmpServer, DBInfo dbInfo, string strObjectID, string strLanCode, string strPage) { string strConnString = string.Empty; switch (dbInfo.DbType) { case (int)Enums.DBType.MSSQL: strConnString = App.CreateMSSqlConnString(dbInfo); break; case (int)Enums.DBType.Oracle: strConnString = App.CreateOracleConnString(dbInfo); break; } string strMessageContent = string.Empty; OperationDataArgs result = new OperationDataArgs(); BasicHttpBinding binding = Common.CreateBasicHttpBinding(60); EndpointAddress adress = Common.CreateEndPoint("HTTP", UmpServer.Host, UmpServer.Port, "WcfServices", "Service00000"); Service00000Client client = new Service00000Client(binding, adress); try { List <string> lstParams = new List <string>(); lstParams.Add(dbInfo.DbType.ToString()); lstParams.Add(strConnString); lstParams.Add(strLanCode); lstParams.Add("M21"); lstParams.Add("0"); lstParams.Add(strPage); result = client.OperationMethodA(8, lstParams); } catch (Exception ex) { result.BoolReturn = false; result.StringReturn = ex.Message; } finally { if (client.State == CommunicationState.Opened) { client.Close(); } } if (result.BoolReturn) { if (result.DataSetReturn.Tables.Count > 0) { List <DataRow> lstRows = result.DataSetReturn.Tables[0].Select("C012 = '" + strObjectID + "'").ToList(); if (lstRows.Count > 0) { strMessageContent = lstRows[0]["C005"].ToString(); } } } return(strMessageContent); }
public static bool UserSignOutSystem(string AStrExitType, ref string AStrMessage) { bool LBoolReturn = true; Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrSignOutArgs = new List <string>(); string LStrVerificationCode004 = string.Empty; string LStrRentCode5 = string.Empty; string LStrUserID = string.Empty; string LStrSessionID = string.Empty; try { if (!string.IsNullOrEmpty(GClassSessionInfo.UserInfo.Account)) { LStrVerificationCode004 = App.CreateVerificationCode(PFShareClassesC.EncryptionAndDecryption.UMPKeyAndIVType.M004); LStrRentCode5 = GClassSessionInfo.RentInfo.Token; LStrRentCode5 = EncryptionAndDecryption.EncryptDecryptString(LStrRentCode5, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); LListStrSignOutArgs.Add(LStrRentCode5); LStrUserID = GClassSessionInfo.UserInfo.UserID.ToString(); LStrUserID = EncryptionAndDecryption.EncryptDecryptString(LStrUserID, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); LListStrSignOutArgs.Add(LStrUserID); LStrSessionID = GClassSessionInfo.SessionID; LStrSessionID = EncryptionAndDecryption.EncryptDecryptString(LStrSessionID, LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); LListStrSignOutArgs.Add(GClassSessionInfo.SessionID); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(12, LListStrSignOutArgs); } } catch (Exception ex) { LBoolReturn = false; AStrMessage = ex.ToString(); } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } return(LBoolReturn); }
public static List <DBInfo> GetAllDBs(string strHost, string strPort) { List <DBInfo> lstResult = new List <DBInfo>(); BasicHttpBinding binding = Common.CreateBasicHttpBinding(60); EndpointAddress adress = Common.CreateEndPoint("HTTP", strHost, strPort, "WcfServices", "Service00000"); Service00000Client client = new Service00000Client(binding, adress); try { OperationDataArgs resultArgs = client.OperationMethodA(5, null); if (resultArgs.BoolReturn) { DBInfo dbInfo; DataRow row; int iDBtype = 0; string LStrVerificationCode = Common.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104); for (int i = 0; i < resultArgs.DataSetReturn.Tables[0].Rows.Count; i++) { row = resultArgs.DataSetReturn.Tables[0].Rows[i]; dbInfo = new DBInfo(); int.TryParse(row["DBType"].ToString(), out iDBtype); dbInfo.DbType = iDBtype; dbInfo.Host = EncryptionAndDecryption.EncryptDecryptString(row["ServerHost"].ToString(), LStrVerificationCode, EncryptionAndDecryption.UMPKeyAndIVType.M104); dbInfo.Port = EncryptionAndDecryption.EncryptDecryptString(row["ServerPort"].ToString(), LStrVerificationCode, EncryptionAndDecryption.UMPKeyAndIVType.M104); dbInfo.ServiceName = EncryptionAndDecryption.EncryptDecryptString(row["NameService"].ToString(), LStrVerificationCode, EncryptionAndDecryption.UMPKeyAndIVType.M104); dbInfo.LoginName = EncryptionAndDecryption.EncryptDecryptString(row["LoginID"].ToString(), LStrVerificationCode, EncryptionAndDecryption.UMPKeyAndIVType.M104); dbInfo.Password = EncryptionAndDecryption.EncryptDecryptString(row["LoginPwd"].ToString(), LStrVerificationCode, EncryptionAndDecryption.UMPKeyAndIVType.M104); lstResult.Add(dbInfo); } } } catch { } finally { if (client.State == CommunicationState.Opened) { client.Close(); } } return(lstResult); }
public void Load11009Data() { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { IDataTable11009 = new DataTable(); LListStrWcfArgs.Add(Session.DatabaseInfo.TypeID.ToString()); LListStrWcfArgs.Add(Session.DatabaseInfo.GetConnectionString()); LListStrWcfArgs.Add(Session.RentInfo.Token); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(Session); LEndpointAddress = WebHelper.CreateEndpointAddress(Session.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(18, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTable11009 = LWCFOperationReturn.DataSetReturn.Tables[0]; //全部翻译 foreach (DataRow dr in IDataTable11009.Rows) { dr["C006"] = DecryptString(dr["C006"].ToString()); } } } catch (Exception ex) { ShowExceptionMessage(ex.Message); } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }
protected override void InitLanguageInfos() { base.InitLanguageInfos(); Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { IDataTableLanguage = new DataTable(); LListStrWcfArgs.Add(Session.DatabaseInfo.TypeID.ToString()); LListStrWcfArgs.Add(Session.DatabaseInfo.GetConnectionString()); LListStrWcfArgs.Add(Session.LangTypeInfo.LangID.ToString()); LListStrWcfArgs.Add("M22"); LListStrWcfArgs.Add("11"); LListStrWcfArgs.Add("1106"); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(Session); LEndpointAddress = WebHelper.CreateEndpointAddress(Session.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(8, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTableLanguage = LWCFOperationReturn.DataSetReturn.Tables[0]; } } catch { } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }
/// <summary> /// 加载本应用程序的权限列表 /// </summary> public static void LoadThidModuleOperation() { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { IDataTableOperation = new DataTable(); LBasicHttpBinding = WebHelper.CreateBasicHttpBingding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.TypeID.ToString()); LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.GetConnectionString()); LListStrWcfArgs.Add(GClassSessionInfo.RentInfo.Token); LListStrWcfArgs.Add(GClassSessionInfo.UserInfo.UserID.ToString()); LListStrWcfArgs.Add(GClassSessionInfo.RoleInfo.ID.ToString()); LListStrWcfArgs.Add("11"); LWCFOperationReturn = LService00000Client.OperationMethodA(16, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTableOperation = LWCFOperationReturn.DataSetReturn.Tables[0]; } } catch { } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }
//加载所有的参数的内容(从T_11_001里面获取) public void LoadSecurityPlicy() { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); try { GDataTable11001 = new DataTable(); LListStrWcfArgs.Add(Session.DatabaseInfo.TypeID.ToString()); LListStrWcfArgs.Add(Session.DatabaseInfo.GetConnectionString()); LListStrWcfArgs.Add(Session.RentInfo.Token); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(Session); LEndpointAddress = WebHelper.CreateEndpointAddress(Session.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(17, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { GDataTable11001 = LWCFOperationReturn.DataSetReturn.Tables[0]; GDataTable00003 = LWCFOperationReturn.ListDataSetReturn[0].Tables[0]; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }
void BtnConfirm_Click(object sender, RoutedEventArgs e) { if (!CheckInput()) { return; } try { string strOldPass = TxtOldPassword.Password.Trim(); string strNewPass = TxtNewPassword.Password.Trim(); List <string> listArgs = new List <string>(); listArgs.Add(CurrentApp.Session.RentInfo.Token); listArgs.Add(CurrentApp.Session.UserID.ToString()); listArgs.Add(strOldPass); listArgs.Add(strNewPass); listArgs.Add(S1202App.LoginSessionID); for (int i = 0; i < listArgs.Count; i++) { listArgs[i] = S1202App.EncryptString(listArgs[i]); } Service00000Client client = new Service00000Client( WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service00000")); OperationDataArgs retArgs = client.OperationMethodA(14, listArgs); client.Close(); string strReturn = retArgs.StringReturn; CurrentApp.WriteLog("ChangePassword", string.Format("Change password return: {0}", strReturn)); if (!retArgs.BoolReturn) { ShowException(CurrentApp.GetLanguageInfo("S0000039", "Change password fail.")); return; } strReturn = S1202App.DecryptString(strReturn); if (strReturn != "S01A01") { #region 错误消息 //ShowException(CurrentApp.GetLanguageInfo("S0000039", "Change password fail.")); switch (strReturn) { case "W000E02": ShowException(CurrentApp.GetLanguageInfo("S0000060", "")); break; case "W000E03": ShowException(CurrentApp.GetLanguageInfo("S0000061", "")); break; case "W000E04": ShowException(CurrentApp.GetLanguageInfo("S0000062", "")); break; case "W000E05": ShowException(CurrentApp.GetLanguageInfo("S0000063", "")); break; case "W000E06": ShowException(CurrentApp.GetLanguageInfo("S0000064", "")); break; case "W000E08": ShowException(CurrentApp.GetLanguageInfo("S0000078", "Get password history fail.")); break; case "W000E09": ShowException(CurrentApp.GetLanguageInfo("S0000079", "Get security settings fail.")); break; case "W000E10": ShowException(CurrentApp.GetLanguageInfo("S0000080", "Save password to database fail.")); break; case "W000E11": ShowException(CurrentApp.GetLanguageInfo("S0000081", "")); break; case "W000E12": ShowException(CurrentApp.GetLanguageInfo("S0000082", "")); break; } #endregion return; } MessageBox.Show(CurrentApp.GetLanguageInfo("S0000040", "Change password successful"), CurrentApp.AppTitle, MessageBoxButton.OK, MessageBoxImage.Information); CurrentApp.Session.UserInfo.Password = S1202App.EncryptString(strNewPass); #region 通知密码修改 try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)RequestCode.SCGlobalSettingChanged; webRequest.ListData.Add(ConstValue.GS_KEY_PARAM_PASSWORD); webRequest.ListData.Add(CurrentApp.Session.UserInfo.Password); webRequest.ListData.Add(string.Empty); CurrentApp.PublishEvent(webRequest); } catch (Exception ex) { CurrentApp.WriteLog("ChangePassword", string.Format("Send change password notification fail.\t{0}", ex.Message)); } #endregion mOptResult = RESULT_SUCC; if (PageParent != null) { PageParent.OnChangePasswordResult(mOptResult); } } catch (Exception ex) { ShowException(ex.Message); } }
void BtnConfirm_Click(object sender, RoutedEventArgs e) { labMessage.Content = ""; if (string.IsNullOrWhiteSpace(pbOldPwd.Password)) { labMessage.Content = App.GetLanguageInfo("3104T00104", "OldPassWord Is Null"); return; } if (string.IsNullOrWhiteSpace(pbNewPwd1.Password) || string.IsNullOrWhiteSpace(pbNewPwd2.Password))//空密码 { labMessage.Content = App.GetLanguageInfo("3104T00121", "Old Password Or New PassWord Is Null"); return; } if (pbOldPwd.Password != App.Session.UserInfo.Password) { labMessage.Content = App.GetLanguageInfo("3104T00104", "Old PassWord is False,Please Write Correct PassWord"); return; } if (pbNewPwd1.Password != pbNewPwd2.Password)//两次输入的新密码不一致 { labMessage.Content = App.GetLanguageInfo("3104T00122", "Two PassWord Is Not Consistent,Please Write Again"); return; } if (App.renterID.Length != 5) { labMessage.Content = "RenterID Is Flase,Can't Change Password"; return; } try { List <string> pwdString = new List <string>(); pwdString.Add(App.Session.DBType.ToString()); //数据库类型 pwdString.Add(App.Session.DBConnectionString); //数据库连接串 pwdString.Add(App.renterID); //租户编码 pwdString.Add(App.Session.UserID.ToString()); //用户编码 pwdString.Add(pbOldPwd.Password); //原密码 pwdString.Add(pbNewPwd1.Password); //新密码 Service00000Client loginClient = new Service00000Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service00000")); OperationDataArgs args = loginClient.OperationMethodA(44, pwdString); labMessage.Content = args.StringReturn; if (args.StringReturn == "") { App.ShowInfoMessage(App.GetLanguageInfo("3104T00093", string.Format("--Modify Sucessed"))); App.Session.UserInfo.Password = pbNewPwd1.Password; App.PwdState = 999.00; var parent = Parent as PopupPanel; if (parent != null) { parent.IsOpen = false; } } else if (args.StringReturn.Substring(0, 1) == "W") { int temp = Convert.ToInt32(args.StringReturn.Substring(6, 1)) + 3; App.ShowExceptionMessage(App.GetLanguageInfo(string.Format("3104T0010{0}", temp), args.StringReturn)); return; } } catch (Exception ex) { App.WriteOperationLog("3104", ConstValue.OPT_RESULT_FAIL, Utils.FormatOptLogString("3104T00096")); } #region 写操作日志 App.WriteOperationLog("3104", ConstValue.OPT_RESULT_SUCCESS, Utils.FormatOptLogString("3104T00096")); #endregion }
public static void LoadAboutAgentData() { Service00000Client LService00000Client = null; BasicHttpBinding LBasicHttpBinding = null; EndpointAddress LEndpointAddress = null; List <string> LListStrWcfArgs = new List <string>(); string LStrVerificationCode104 = string.Empty; try { LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104); IDataTable11005 = new DataTable(); IDataTable11006 = new DataTable(); IDataTable11101 = new DataTable(); IDataTable11009 = new DataTable(); IDataTable11201SA = new DataTable(); IDataTable11201UA = new DataTable(); IDataTable11201UO = new DataTable(); IDataTable11201UU = new DataTable(); LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.TypeID.ToString()); LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.GetConnectionString()); LListStrWcfArgs.Add(GClassSessionInfo.RentInfo.Token); LListStrWcfArgs.Add(GClassSessionInfo.UserInfo.UserID.ToString()); LBasicHttpBinding = WebHelper.CreateBasicHttpBinding(); LEndpointAddress = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service00000"); OperationDataArgs LWCFOperationReturn = new OperationDataArgs(); LService00000Client = new Service00000Client(LBasicHttpBinding, LEndpointAddress); LWCFOperationReturn = LService00000Client.OperationMethodA(26, LListStrWcfArgs); if (LWCFOperationReturn.BoolReturn) { IDataTable11005 = LWCFOperationReturn.ListDataSetReturn[0].Tables[0]; IDataTable11006 = LWCFOperationReturn.ListDataSetReturn[1].Tables[0]; IDataTable11101 = LWCFOperationReturn.ListDataSetReturn[2].Tables[0]; IDataTable11009 = LWCFOperationReturn.ListDataSetReturn[3].Tables[0]; IDataTable11201SA = LWCFOperationReturn.ListDataSetReturn[4].Tables[0]; IDataTable11201UA = LWCFOperationReturn.ListDataSetReturn[5].Tables[0]; IDataTable11201UO = LWCFOperationReturn.ListDataSetReturn[6].Tables[0]; IDataTable11201UU = LWCFOperationReturn.ListDataSetReturn[7].Tables[0]; foreach (DataRow LDataRowSingleAgent in IDataTable11101.Rows) { if (LDataRowSingleAgent["C002"].ToString() != "1") { continue; } LDataRowSingleAgent["C017"] = EncryptionAndDecryption.EncryptDecryptString(LDataRowSingleAgent["C017"].ToString(), LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { if (LService00000Client != null) { if (LService00000Client.State == CommunicationState.Opened) { LService00000Client.Close(); } } } }