//public struct OrderShort { // public String UserOrgCode; // public String Code; // public String SubjectCode; // public Boolean IsClosed; // public DateTime DateOpen; // public DateTime DateClose; //} //public static IList<OrderShort> Catalog(IObjectSpace os) { // IIBSSyncService syncservice = new HTTPSyncService(ConfigurationManager.AppSettings["IBS.SyncService"]); // XWZKXCIA lprm = new XWZKXCIA(); // lprm.CMD = "CATALOG"; // lprm.OGCODE = 1000; // XWZKXCOA lres = syncservice.XWZKXC0N(lprm); // List<OrderShort> result = new List<OrderShort>(lres.ZKLIST.Count); // foreach (XWZKXCOAZKLIST item in lres.ZKLIST) { // OrderShort ritem = new OrderShort(); // ritem.UserOrgCode = "1000"; // ritem.Code = item.ZKCODE; // ritem.IsClosed = item.ZKISCLOSED; // ritem.SubjectCode = item.ZKSUBJECTCODE; // DateTime.TryParseExact(item.ZKDTOPEN, "yy-MM-dd", null, default(System.Globalization.DateTimeStyles), out ritem.DateOpen); // DateTime.TryParseExact(item.ZKDTCLOSE, "yy-MM-dd", null, default(System.Globalization.DateTimeStyles), out ritem.DateClose); // result.Add(ritem); // } // return result; //} public static XWZKXCOA Catalog(IObjectSpace os) { IIBSSyncService syncservice = new HTTPSyncService(ConfigurationManager.AppSettings["IBS.SyncService"]); XWZKXCIA lprm = new XWZKXCIA(); lprm.CMD = "CATALOG"; lprm.OGCODE = 1000; XWZKXCOA lres = syncservice.XWZKXC0N(lprm); //List<OrderShort> result = new List<OrderShort>(lres.ZKLIST.Count); //foreach (XWZKXCOAZKLIST item in lres.ZKLIST) { // OrderShort ritem = new OrderShort(); // ritem.UserOrgCode = "1000"; // ritem.Code = item.ZKCODE; // ritem.IsClosed = item.ZKISCLOSED; // ritem.SubjectCode = item.ZKSUBJECTCODE; // DateTime.TryParseExact(item.ZKDTOPEN, "yy-MM-dd", null, default(System.Globalization.DateTimeStyles), out ritem.DateOpen); // DateTime.TryParseExact(item.ZKDTCLOSE, "yy-MM-dd", null, default(System.Globalization.DateTimeStyles), out ritem.DateClose); // result.Add(ritem); //} return(lres); }
protected void ClearTestData() { XWZKXCIA lprm = new XWZKXCIA(); lprm.CMD = "CLEAR-TEST-DATA"; lprm.OGCODE = ogcode; XWZKXCOA lres = SyncService.XWZKXC0N(lprm); }
public void ListAllTest([Range(1, 1, 1)] int counter) { // XWZKXCIA lprm = new XWZKXCIA(); lprm.CMD = "CATALOG"; lprm.OGCODE = 1000; XWZKXCOA lres = SyncService.XWZKXC0N(lprm); // Assert.AreEqual(lres.VOLIST.Count, 20); int count = 0; foreach (XWZKXCOAZKLIST item in lres.ZKLIST) { count++; Debug.WriteLine(count.ToString() + " - " + item.ZKSUBJECTCODE + " - " + item.ZKCODE + " - " + item.ZKACCOUNTTYPE + " - " + item.ZKACCOUNTCODE); } // Assert.AreEqual(count, 10); }
public void ListTest([Range(1, 1, 1)] int counter) { XWZKXMIA lset = new XWZKXMIA(); XWZKXMOA rset; for (int i = 0; i < 10; i++) { lset.CMD = "SET"; lset.OGCODE = ogcode; lset.ZKCODE = "TEST-" + i.ToString(); lset.ZKSUBJECTCODE = "SUBJ-" + i.ToString(); rset = SyncService.XWZKXM0N(lset); } // XWZKXCIA lprm = new XWZKXCIA(); lprm.CMD = "CATALOG"; lprm.OGCODE = ogcode; XWZKXCOA lres = SyncService.XWZKXC0N(lprm); // Assert.AreEqual(lres.VOLIST.Count, 20); int count = 0; foreach (XWZKXCOAZKLIST item in lres.ZKLIST) { count++; Debug.WriteLine(count.ToString() + " - " + item.ZKSUBJECTCODE + " - " + item.ZKCODE); } Assert.AreEqual(count, 10); }