public void TestSqlSugar() { string ddd = "{\"ORGID\":\"10ADC4A48AB743A2B532AD8D08C4B927\",\"YBCODE\":\"3176\",\"INFID\":\"F9D46DBF812C4F308670693F6431F498\",\"结算编号\":null,\"病人姓名\":\"宋梅\",\"医生姓名\":\"王伟\",\"身份证\":null,\"科室名称\":\"门诊\",\"发票号\":\"202101170012\",\"门诊号\":\"555780231000M202101170012\",\"收费日期\":\"2021-01-19 23:21:23\",\"明细总额\":4,\"经办人\":\"医保接口\"}"; var dataValue = JsonConvert.DeserializeObject <OutpatientPersonBaseJsonDto>(ddd); //var ddd= CommonHelp.GetValue("WebServiceUrl"); StringBuilder ctrXml = new StringBuilder(); ctrXml.Append("<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\" ?>"); ctrXml.Append(@"<ROW> <PO_AKC600>1013441659</PO_AKC600> <PO_AAE241>216.91</PO_AAE241> <PO_AAE240>219.7</PO_AAE240> <PO_XJZF>0.0</PO_XJZF> <PO_YAZ725>2.31</PO_YAZ725> <PO_YEZF>0.99</PO_YEZF> <PO_FHZ>1</PO_FHZ> <PO_MSG></PO_MSG> <PO_BXJE>3.30</PO_BXJE> <PO_BXBL>0.7</PO_BXBL> </ROW>"); var iniData = XmlSerializeHelper.DESerializer <ResidentOutpatientPreSettlementXmlDto>(ctrXml.ToString()); //var dataList = _hospitalLogMap.GetList(); //var ccc= _hospitalLogMap._db.Ado.GetDataTable("select * from table"); //_hospitalLogMap.CurrentDb.DeleteById(1); //_sqlSugarRepository.QueryHospitalLog(); }
private void BenzScreenWindowForm_Load(object sender, EventArgs e) { var xmlDoc = new XmlDocument(); xmlDoc.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "XMLConfig.xml")); var model = XmlSerializeHelper.DESerializer <XMLConfig>(xmlDoc.InnerXml); //获取屏幕信息 Screen[] sc; sc = Screen.AllScreens; foreach (var i in model.Nodes) { if (i.Window >= sc.Length) { i.Window = 0; } var from = new BenzScreenWindowWebsiteForm(i, sc[i.Window].Bounds.Left, sc[i.Window].Bounds.Top); if (model.Nodes.IndexOf(i) == model.Nodes.Count() - 1) { from.SetIsLast(); } from.Show(); Thread.Sleep(1000); } }
static SqlXml GetSQLXml <T>(SQLXMLEdm sqlXMLEdm) { SqlXml sqlXml = new SqlXml(); if (sqlXMLEdm != null && !sqlXMLEdm.IsNull && !string.IsNullOrEmpty(sqlXMLEdm.Value)) { var pages = XmlSerializeHelper.DESerializer <List <T> >(sqlXMLEdm.Value); sqlXml = XmlSerializeHelper.ToSqlXml(pages); } return(sqlXml); }
static string GetSQLXmlString <T>(SQLXMLEdm sqlXMLEdm) { SqlXml sqlXml = new SqlXml(); if (sqlXMLEdm != null && !sqlXMLEdm.IsNull && !string.IsNullOrEmpty(sqlXMLEdm.Value)) { var pages = XmlSerializeHelper.DESerializer <List <T> >(sqlXMLEdm.Value); sqlXml = XmlSerializeHelper.ToSqlXml(pages); } if (sqlXml == null || sqlXml.IsNull == true) { return(null); } else { return(sqlXml.Value); } }
private void Form1_Load(object sender, EventArgs e) { //helper.GetUUID(clientname, clientcode); //root root = new root(); //root.code = "0000"; //root.msg = "sdsada"; //root.pw = "wdasd"; //root.heartbeattime = "132626"; //root.uuid = "4516"; //meter meter1 = new meter { id = "sd", extid = "5656", time = "20198815" }; //meter meter2 = new meter { id = "vsa", extid = "434", time = "2018956"}; //meter meter3 = new meter { id = "jrthr", extid = "644542", time = "20192659" }; //List<meter> meters = new List<Model.meter>(); //meters.Add(meter1); //meters.Add(meter2); //meters.Add(meter3); ////root.building //XmlSerializer serializer = new XmlSerializer(root.GetType()); //TextWriter writer = new StreamWriter("C:\\Users\\P0127208\\Desktop\\新建文件夹\\root.xml"); //serializer.Serialize(writer, root); //writer.Close(); //XmlSerializer serializer = new XmlSerializer(typeof(root)); //FileStream stream = new FileStream("C:\\Users\\P0127208\\Desktop\\新建文件夹\\root.xml", FileMode.Open); //root dep = (root)serializer.Deserialize(stream); //stream.Close(); StreamReader sr = new StreamReader("C:\\Users\\P0127208\\Desktop\\新建文件夹\\root.xml"); string xml = sr.ReadToEnd(); sr.Close(); var date = XmlSerializeHelper.DESerializer <root>(xml); }
static void Main(string[] args) { // MyClassID=""1"" xmlns=""ABC_123""> var xml2 = @"<MyClassInfo> <MyClassName>高一(5)班</MyClassName> <MyTeacher>李老师</MyTeacher> <members> <Student name=""T:LinkedX.OrderService.AliRobot""> <MyStuName>张三</MyStuName> <MySex>男</MySex> </Student> <Student name=""2""> <MyStuName>李四</MyStuName> <MySex>女</MySex> </Student> </members> </MyClassInfo>"; var test10 = XmlSerializeHelper.DESerializer <ClassInfo>(xml2); var xml = @"<doc> <assembly> <name>LinkedX.OrderService.Core</name> </assembly> <members> <member name=""T:LinkedX.OrderService.AliRobot""> <summary></summary> </member> <member name=""T:LinkedX.OrderService.AliRobot""> <summary></summary> </member> </members> </doc>"; var test22 = XmlSerializeHelper.DESerializer <QueryCoreXml>(xml); Console.WriteLine("Hello World!"); }
public HttpResponseMessage Service(string method, string app_key, string partner_id, string v, string timestamp, string sign) { string strXml = ""; var stream = HttpContext.Current.Request.InputStream; stream.Position = 0; using (var streamReader = new StreamReader(stream, Encoding.UTF8)) { strXml = streamReader.ReadToEndAsync().Result; stream.Position = 0; } var app_secret = System.Configuration.ConfigurationManager.AppSettings["app_secret"]; Dictionary <string, string> txtParams = new Dictionary <string, string>(); txtParams.Add("appKey", app_key); txtParams.Add("method", method); txtParams.Add("partner_id", partner_id); txtParams.Add("timestamp", timestamp); txtParams.Add("v", v); string validSign = SignUtil.SignTopRequest(txtParams, app_secret, strXml); logger.Info("请求参数签名SIGN" + ":" + validSign); //签名不合法 if (validSign != sign) { var errmsg = new FwResponse { IsSuccess = false, ErrCode = "S00005", ErrMsg = "sign验证失败" }; return(MakeReturnMessage(errmsg)); } switch (method) { case "fineex.wms.purchase.outinorder.confirm": //fineex.wms.purchase.outinorder.confirm (出入库单确认接口) FwPurchaseOutinorderConfirmRequest reqComfirm = XmlSerializeHelper.DESerializer <FwPurchaseOutinorderConfirmRequest>(strXml); StringBuilder sbTemp = new StringBuilder(); sbTemp.AppendLine("INSERT INTO t_StockIn "); sbTemp.AppendLine(" (F_BillID "); sbTemp.AppendLine(" ,F_Date "); sbTemp.AppendLine(" ,F_SupplierID "); sbTemp.AppendLine(" ,F_BillType "); sbTemp.AppendLine(" ,F_Money "); sbTemp.AppendLine(" ,F_PayMoney "); sbTemp.AppendLine(" ,F_ShopID "); sbTemp.AppendLine(" ,F_StorageID "); sbTemp.AppendLine(" ,F_Remark "); sbTemp.AppendLine(" ,F_BillMan "); sbTemp.AppendLine(" ,F_Check "); sbTemp.AppendLine(" ,F_Checker "); sbTemp.AppendLine(" ,F_CheckDate "); sbTemp.AppendLine(" ,F_CutOff "); sbTemp.AppendLine(" ,F_IsUp "); sbTemp.AppendLine(" ,F_BuyerID "); sbTemp.AppendLine(" ,F_BuyerName "); sbTemp.AppendLine(" ,F_TallyID "); sbTemp.AppendLine(" ,F_TallyName "); sbTemp.AppendLine(" ,F_Reason "); sbTemp.AppendLine(" ,F_Dist "); sbTemp.AppendLine(" ,F_AutoStockInDate "); sbTemp.AppendLine(" ,F_SpaceStockInDate "); sbTemp.AppendLine(" ,F_LuckyBag "); sbTemp.AppendLine(" ,F_Creater "); sbTemp.AppendLine(" ,F_CreateTime "); sbTemp.AppendLine(" ,F_Updater "); sbTemp.AppendLine(" ,F_UpdateTime) "); sbTemp.AppendLine(" VALUES "); sbTemp.AppendLine(" ('" + reqComfirm.SyncId + "' "); //F_BillID sbTemp.AppendLine(" ,getdate() "); //F_Date sbTemp.AppendLine(" ,F_SupplierID "); //F_SupplierID sbTemp.AppendLine(" ,F_BillType "); //F_BillType sbTemp.AppendLine(" ,F_Money "); //F_Money sbTemp.AppendLine(" ,F_PayMoney "); //F_PayMoney sbTemp.AppendLine(" ('" + reqComfirm.WareHouseCode + "'"); //F_ShopID sbTemp.AppendLine(" ,F_StorageID "); //F_StorageID sbTemp.AppendLine(" ('" + reqComfirm.Remark + "' "); //F_Remark sbTemp.AppendLine(" ,F_BillMan "); //F_BillMan sbTemp.AppendLine(" ,F_Check "); //F_Check sbTemp.AppendLine(" ,F_Checker "); //F_Checker sbTemp.AppendLine(" ('" + reqComfirm.OrderConfirmTime + "'"); //F_CheckDate sbTemp.AppendLine(" ,F_CutOff "); //F_CutOff sbTemp.AppendLine(" ,F_IsUp "); //F_IsUp sbTemp.AppendLine(" ,F_BuyerID "); //F_BuyerID sbTemp.AppendLine(" ,F_BuyerName "); //F_BuyerName sbTemp.AppendLine(" ,F_TallyID "); //F_TallyID sbTemp.AppendLine(" ,F_TallyName "); //F_TallyName sbTemp.AppendLine(" ,F_Reason "); //F_Reason sbTemp.AppendLine(" ,F_Dist "); //F_Dist sbTemp.AppendLine(" ,F_AutoStockInDate "); //F_AutoStockInDate sbTemp.AppendLine(" ,F_SpaceStockInDate "); //F_SpaceStockInDate sbTemp.AppendLine(" ,F_LuckyBag "); //F_LuckyBag sbTemp.AppendLine(" ,F_Creater "); //F_Creater sbTemp.AppendLine(" ,F_CreateTime "); //F_CreateTime sbTemp.AppendLine(" ,F_Updater "); //F_Updater sbTemp.AppendLine(" ,F_UpdateTime) "); //F_UpdateTime foreach (var drItem in reqComfirm.Items) { sbTemp.AppendLine("INSERT INTO t_StockInDetail "); // sbTemp.AppendLine(" (F_BillID "); // sbTemp.AppendLine(" ,F_Order "); // sbTemp.AppendLine(" ,F_ItemID "); // sbTemp.AppendLine(" ,F_ColorID "); // sbTemp.AppendLine(" ,F_SizeID "); // sbTemp.AppendLine(" ,F_Qty "); // sbTemp.AppendLine(" ,F_Price "); // sbTemp.AppendLine(" ,F_Discount "); // sbTemp.AppendLine(" ,F_Rate "); // sbTemp.AppendLine(" ,F_Remark "); // sbTemp.AppendLine(" ,F_LinkBill "); // sbTemp.AppendLine(" ,F_CostPrice "); // sbTemp.AppendLine(" ,F_QualFlg "); // sbTemp.AppendLine(" ,F_PosPrice) "); // sbTemp.AppendLine(" VALUES "); // sbTemp.AppendLine(" (F_BillID "); //F_BillID sbTemp.AppendLine(" ,F_Order "); //F_Order sbTemp.AppendLine(" ,F_ItemID "); //F_ItemID sbTemp.AppendLine(" ,F_ColorID "); //F_ColorID sbTemp.AppendLine(" ,F_SizeID "); //F_SizeID sbTemp.AppendLine(" ,F_Qty "); //F_Qty sbTemp.AppendLine(" ,F_Price "); //F_Price sbTemp.AppendLine(" ,F_Discount "); //F_Discount sbTemp.AppendLine(" ,F_Rate "); //F_Rate sbTemp.AppendLine(" ,F_Remark "); //F_Remark sbTemp.AppendLine(" ,F_LinkBill "); //F_LinkBill sbTemp.AppendLine(" ,F_CostPrice "); //F_CostPrice sbTemp.AppendLine(" ,F_QualFlg "); //F_QualFlg sbTemp.AppendLine(" ,F_PosPrice) "); //F_PosPrice } //返回结果成功 return(MakeReturnMessage(new FwPurchaseOutinorderConfirmResponse { IsSuccess = true, ErrCode = "0", ErrMsg = "" })); break; case "fineex.wms.trade.orderprocess.report": //fineex.wms.trade.orderdetail.confirm (订单确认接口(带明细)) FwPurchaseOutinorderConfirmRequest req2 = XmlSerializeHelper.DESerializer <FwPurchaseOutinorderConfirmRequest>(strXml); //返回结果成功 return(MakeReturnMessage(new FwPurchaseOutinorderConfirmResponse { IsSuccess = true, ErrCode = "0", ErrMsg = "" })); break; case "fineex.wms.trade.returnorder.confirm": //fineex.wms.trade.returnorder.confirm (退货单确认接口) FwPurchaseOutinorderConfirmRequest req3 = XmlSerializeHelper.DESerializer <FwPurchaseOutinorderConfirmRequest>(strXml); //返回结果成功 return(MakeReturnMessage(new FwPurchaseOutinorderConfirmResponse { IsSuccess = true, ErrCode = "0", ErrMsg = "" })); break; } return(MakeReturnMessage(new FwResponse { IsSuccess = false, ErrCode = "S00003", ErrMsg = "不存在的方法名" })); }