当前位置: 首页 > news >正文

外贸app网站开发形象标识设计

外贸app网站开发,形象标识设计,南宁广告公司网站建设,湖南省建设银行网站1、数据库配置xml#xff0c;首先连接成功后会自动创建xml并保存到对应xml#xff0c;如下 static string ConnPath AppDomain.CurrentDomain.BaseDirectory ConnOrcle.xml; 声明xml名称#xff0c;便于后续写入对应数据库参数 2、创建xml /// summar…1、数据库配置xml首先连接成功后会自动创建xml并保存到对应xml如下 static string ConnPath AppDomain.CurrentDomain.BaseDirectory ConnOrcle.xml; 声明xml名称便于后续写入对应数据库参数 2、创建xml /// summary         /// 创建XML节点         /// /summary         /// param nameip/param         /// param nameport/param         /// param namesid/param         /// param nameuser/param         /// param namepwd/param         public static void CreateXMLInform(string ip, string port, string sid, string user, string pwd)         {             XmlDocument xmlDoc new XmlDocument();             XmlDeclaration xmlDecl xmlDoc.CreateXmlDeclaration(1.0, utf-8, null);             xmlDoc.AppendChild(xmlDecl); XmlElement xe xmlDoc.CreateElement(Conn);//创建一个Conn节点 XmlElement xc1 xmlDoc.CreateElement(ConnIP);//IP             xc1.InnerText ip;             xe.AppendChild(xc1); XmlElement xc2 xmlDoc.CreateElement(ConnPort);//端口             xc2.InnerText port;             xe.AppendChild(xc2); XmlElement xc3 xmlDoc.CreateElement(ConnSid);//服务器名称             xc3.InnerText sid;             xe.AppendChild(xc3); XmlElement xc4 xmlDoc.CreateElement(ConnUser);//用户名             xc4.InnerText user;             xe.AppendChild(xc4); XmlElement xc5 xmlDoc.CreateElement(ConnPwd);//密码             xc5.InnerText pwd;             xe.AppendChild(xc5); xmlDoc.AppendChild(xe);             xmlDoc.Save(ConnPath);         } 3、声明连接类实体 ConnEntity private string connIP;//ip地址         private string connPort;//端口         private string connSid;//服务器名称         private string connUser;//用户名         private string connPwd;//密码 4、读取xml内容并赋值给ConnEntity /// summary         /// 读取XML内容赋值给连接         /// /summary         /// returns/returns         public static ConnEntityReadXML()         {             ConnEntity connentiy new ConnEntity();             if (File.Exists(ConnPath))             {                 XmlDocument xmlDoc new XmlDocument();                 xmlDoc.Load(ConnPath);                 XmlNodeList list xmlDoc.SelectSingleNode(Conn).ChildNodes;                 connentiy.ConnIP list[0].InnerText;                 connentiy.ConnPort list[1].InnerText;                 connentiy.ConnSid list[2].InnerText;                 connentiy.ConnUser list[3].InnerText;                 connentiy.ConnPwd list[4].InnerText;             }             return connentiy;         } 5、连接数据库测试 /// summary         /// 连接数据库         /// /summary         /// param nameip地址/param         /// param nameport端口/param         /// param namesid服务名称/param         /// param nameuser用户/param         /// param namepwd密码/param         public static bool ConnectionTestDB(string ip, string port, string sid, string user, string pwd)         {             ConnOracle(ip, port, sid, user, pwd);             try             {                 //不为空 并且 是关闭或者断了的情况下才连接                 if (Connection ! null (Connection.State System.Data.ConnectionState.Closed || Connection.State System.Data.ConnectionState.Broken))                 {                     Connection.Open();                     ReturnOwner Select(SELECT OWNER, TABLE_NAME FROM ALL_TAB_COMMENTS ORDER BY OWNER, TABLE_NAME);                 }                 MessageBox.Show(连接成功);                 return true;             }             catch (Exception ex)             {                 MessageBox.Show(“连接失败请检查数据库配置参数”ex.Message.ToString());                 return false;             }         } 6、其中调用的函数 /// /summary         /// param nameip地址/param         /// param nameport端口/param         /// param namesid服务名称/param         /// param nameuser用户/param         /// param namepwd密码/param         /// returnsOleDbConnection/returns         private static OracleConnection ConnOracle(string ip, string port, string sid, string user, string pwd)         {             string connStr;             connStr Data Source(DESCRIPTION (ADDRESS_LIST (ADDRESS (PROTOCOL TCP)(HOST ip )(PORT port ))) (CONNECT_DATA (SERVICE_NAME sid )));User ID user ;Password pwd ;;             Connection new OracleConnection(connStr);             return Connection;         } 详细看源码网址及下载 c#oracle创建实体类操作资源-CSDN文库
http://www.dnsts.com.cn/news/51033.html

相关文章:

  • 企业网站后台内容如何修改网站集约化建设的意义
  • 银川网站建设是什么电子商务网站建设最好的公司
  • 云南域名注册网站建设网站开发用什么工具
  • php网站源码免费下载平面设计和网页设计哪个工资高
  • 论文网站建设临县网站建设
  • 网站优化文章网络营销的推广策略
  • 做团购的的网站有哪些中国建筑公司网站大全
  • 付费阅读网站建设做付费推广是网站好还是单页面好
  • 网站群 seo宁夏建设投资集团公司网站
  • 杭州高端网站设计免费企业网站建设要求
  • 关于网站平台建设调研的函北京代建网站
  • 找个不能粘贴文字的网站做实验下面什么不是用于制作网页的软件
  • 接收新网站如何做诊断购物网站开发环境
  • 微信小程序与网站连接潮阳网站制作
  • 一个空间多个网站安卓app开发教程视频免费
  • 亚马逊网站建设案例分析wordpress插件批量修改正文内链
  • 贵阳网站开发公司推荐营销策略手段有哪些
  • 免费建站系统有哪些艾迪网络专业的网站建设公司
  • 什么软件做网站自己如何建设校园网站
  • 网站建设的体会网上做任务的网站有哪些内容
  • 广州网站公司建设京东商城网上购物商城
  • 医院网站开发公司游戏工作室
  • 公司网站需求分析建设银行信用卡卡网站首页
  • 建设网站要服务器吗做网站建设销售工资
  • 购买了网站空间如何进入网站备案 中国
  • 自适应网站建设专家wordpress 修改数据库表
  • 查询网站收录情况的方法对个人做swot分析的网站
  • 网站建设与程序编辑wordpress格行代码6
  • wordpress内存溢出错误网站seo优化合同
  • 企业网站框架图松江团购做网站