http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 4556|回复: 1

[C#语言基础] 发的

[复制链接]
发表于 2013-12-16 02:49:38 | 显示全部楼层 |阅读模式
[C#] 纯文本查看 复制代码
public string AngelwinInput(XmlDocument InputData)
{

	System.IO.Directory.CreateDirectory("C:\\Inetpub\\" + "AWlog\\" + System.DateTime.Now.ToString("yyyy-MM-dd"));

	InputData.Save("C:\\Inetpub\\" + "AWlog\\" + System.DateTime.Now.ToString("yyyy-MM-dd") + "\\" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ".xml");

	DataSet ds = new DataSet();

	ds.ReadXml(new XmlTextReader(new StringReader(InputData.OuterXml)));


	/////插入基本信息表HisData///

	string strOrdRowID;
	//医嘱ID
	string Cnn_String;
	SqlConnection Sql_Cnn = new SqlConnection();
	DataRow Row;

	strOrdRowID = "";
	Cnn_String = System.Configuration.ConfigurationManager.ConnectionStrings("Cnn").ConnectionString;

	//Cnn_String = "Server=localhost;uid =sa;pwd=itpschina;database=CMRSIndex"
	Sql_Cnn.ConnectionString = Cnn_String;


	try {
		Sql_Cnn.Open();

		SqlDataAdapter sql_Adp = new SqlDataAdapter("select * from SendAppBill", Sql_Cnn);
		SqlCommandBuilder sql_Cmd = new SqlCommandBuilder(sql_Adp);
		DataSet sql_Ds = new DataSet();

		sql_Adp.MissingSchemaAction = MissingSchemaAction.AddWithKey;
		sql_Adp.Fill(sql_Ds, "SendAppBill");



		foreach (DataRow dr in ds.Tables("SendAppBill").Rows) {

			Row = sql_Ds.Tables("SendAppBill").NewRow();

			strOrdRowID = Convert.ToString(dr("OrdRowID"));

			Row("RegNo") = Convert.ToString(dr("RegNo"));
			Row("CardNo") = Convert.ToString(dr("CardNo"));
			Row("Name") = Convert.ToString(dr("Name"));
			Row("SexCode") = Convert.ToString(dr("SexCode"));
			Row("Sex") = Convert.ToString(dr("Sex"));
			Row("Age") = Convert.ToString(dr("Age"));
			Row("BirthDay") = Convert.ToString(dr("BirthDay"));
			Row("Marry") = Convert.ToString(dr("Marry"));
			Row("Address") = Convert.ToString(dr("Address"));
			Row("Telephone") = Convert.ToString(dr("Telephone"));
			Row("CredentialNo") = Convert.ToString(dr("CredentialNo"));
			Row("CredentialType") = Convert.ToString(dr("CredentialType"));
			Row("NationCode") = Convert.ToString(dr("NationCode"));
			Row("Nation") = Convert.ToString(dr("Nation"));
			Row("OccupationCode") = Convert.ToString(dr("OccupationCode"));
			Row("Occupation") = Convert.ToString(dr("Occupation"));
			Row("DocumentID") = Convert.ToString(dr("DocumentID"));
			Row("InsuranceNo") = Convert.ToString(dr("InsuranceNo"));
			Row("AdmType") = Convert.ToString(dr("AdmType"));
			Row("AdmNo") = Convert.ToString(dr("AdmNo"));
			Row("AdmSerialNum") = Convert.ToString(dr("AdmSerialNum"));
			Row("FeeType") = Convert.ToString(dr("FeeType"));
			Row("WardCode") = Convert.ToString(dr("WardCode"));
			Row("Ward") = Convert.ToString(dr("Ward"));
			Row("RoomCode") = Convert.ToString(dr("RoomCode"));
			Row("Room") = Convert.ToString(dr("Room"));
			Row("BedNo") = Convert.ToString(dr("BedNo"));
			Row("ClinicDiagnose") = Convert.ToString(dr("ClinicDiagnose"));
			Row("ClinicDisease") = Convert.ToString(dr("ClinicDisease"));
			Row("OperationInfo") = Convert.ToString(dr("OperationInfo"));
			Row("OtherInfo") = Convert.ToString(dr("OtherInfo"));
			Row("AdmDocRowID") = Convert.ToString(dr("AdmDocRowID"));
			Row("AdmDocCode") = Convert.ToString(dr("AdmDocCode"));
			Row("AdmDoc") = Convert.ToString(dr("AdmDoc"));

			Row("OrdRowID") = Convert.ToString(dr("OrdRowID"));
			Row("ArcimCode") = Convert.ToString(dr("ArcimCode"));

			Row("OrdName") = Convert.ToString(dr("OrdName"));
			Row("OrdPrice") = Convert.ToString(dr("OrdPrice"));

			Row("OrdBillStatus") = Convert.ToString(dr("OrdBillStatus"));
			Row("OrdPriorityCode") = Convert.ToString(dr("OrdPriorityCode"));
			Row("OrdPriority") = Convert.ToString(dr("OrdPriority"));

			Row("OrdHospital") = Convert.ToString(dr("OrdHospital"));
			Row("OrdHospitalCode") = Convert.ToString(dr("OrdHospitalCode"));
			Row("OrdExeHospital") = Convert.ToString(dr("OrdExeHospital"));
			Row("OrdExeHospitalCode") = Convert.ToString(dr("OrdExeHospitalCode"));
			Row("ARCItemCat") = Convert.ToString(dr("ARCItemCat"));
			Row("ARCItemCatCode") = Convert.ToString(dr("ARCItemCatCode"));
			Row("OECOrderCategory") = Convert.ToString(dr("OECOrderCategory"));
			Row("OECOrderCategory") = Convert.ToString(dr("OECOrderCategory"));
			Row("OrdLocCode") = Convert.ToString(dr("OrdLocCode"));
			Row("OrdLoc") = Convert.ToString(dr("OrdLoc"));
			Row("OrdDoctorCode") = Convert.ToString(dr("OrdDoctorCode"));
			Row("OrdDoctor") = Convert.ToString(dr("OrdDoctor"));
			Row("OrdDate") = Convert.ToString(dr("OrdDate"));
			Row("OrdTime") = Convert.ToString(dr("OrdTime"));
			Row("OrdExeLocCode") = Convert.ToString(dr("OrdExeLocCode"));
			Row("OrdExeLoc") = Convert.ToString(dr("OrdExeLoc"));
			Row("SampleCode") = Convert.ToString(dr("SampleCode"));
			Row("SampleName") = Convert.ToString(dr("SampleName"));
			Row("SendFlag") = Convert.ToString(dr("SendFlag"));
			Row("NoteInfo") = Convert.ToString(dr("NoteInfo"));
			Row("Position") = Convert.ToString(dr("Position"));
			Row("Purpose") = Convert.ToString(dr("Purpose"));
			Row("CurCase") = Convert.ToString(dr("CurCase"));
			Row("Destination") = Convert.ToString(dr("Destination"));
			Row("AutoFlag") = Convert.ToString(dr("AutoFlag"));
			Row("BookDate") = Convert.ToString(dr("BookDate"));
			Row("BookTime") = Convert.ToString(dr("BookTime"));
			Row("PhyAddress") = Convert.ToString(dr("PhyAddress"));
			Row("SpecialMarket") = Convert.ToString(dr("SpecialMarket"));
			Row("SpecialPerson") = Convert.ToString(dr("SpecialPerson"));
			Row("SpecialDate") = Convert.ToString(dr("SpecialDate"));
			Row("StopDocCode") = Convert.ToString(dr("StopDocCode"));
			Row("StopDocDesc") = Convert.ToString(dr("StopDocDesc"));

			sql_Ds.Tables("SendAppBill").Rows.Add(Row);

			sql_Adp.Update(sql_Ds, "SendAppBill");

		}


		SqlDataAdapter sql_Adp2 = new SqlDataAdapter("select * from BillDetail", Sql_Cnn);
		SqlCommandBuilder sql_Cmd2 = new SqlCommandBuilder(sql_Adp2);
		DataSet sql_Ds2 = new DataSet();

		sql_Adp2.MissingSchemaAction = MissingSchemaAction.AddWithKey;
		sql_Adp2.Fill(sql_Ds2, "BillDetail");


		foreach (DataRow dr2 in ds.Tables("BillDetail").Rows) {
			Row = sql_Ds2.Tables("BillDetail").NewRow();

			Row("OrdRowID") = strOrdRowID;
			Row("TARIRowid") = Convert.ToString(dr2("TARIRowid"));
			Row("TARICode") = Convert.ToString(dr2("TARICode"));
			Row("TARIDesc") = Convert.ToString(dr2("TARIDesc"));
			Row("UnitPrice") = Convert.ToString(dr2("UnitPrice"));
			Row("BillQty") = Convert.ToString(dr2("BillQty"));
			Row("Total") = Convert.ToString(dr2("Total"));
			Row("BillDate") = Convert.ToString(dr2("BillDate"));
			Row("BillTime") = Convert.ToString(dr2("BillTime"));

			sql_Ds2.Tables("BillDetail").Rows.Add(Row);

			sql_Adp2.Update(sql_Ds2, "BillDetail");

		}

		Sql_Cnn.Close();

		AngelwinInput = "<Response>" + Chr(13);
		AngelwinInput = AngelwinInput + "<ResultCode>0</ResultCode>" + Chr(13);
		AngelwinInput = AngelwinInput + "<ResultContent>成功</ResultContent>" + Chr(13);
		AngelwinInput = AngelwinInput + "</Response>";

		return AngelwinInput;


	} catch (Exception ex) {
		WriteLog("请检查所输入的xml文档完整性!" + ex.Message + ex.StackTrace);
		InputData.Save("C:\\Inetpub\\" + "AWlog\\" + System.DateTime.Now.ToString("yyyy-MM-dd") + "\\" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ".xml");

		return "请检查所输入的xml文档完整性!" + ex.Message;

	}

}



1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2013-12-16 08:23:30 | 显示全部楼层
这是什么?楼主多加几个字说明一下啊,连标题都看不明白
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-12-19 12:56

© 2014-2021

快速回复 返回顶部 返回列表