本文整理汇总了C#中DataAccessLayer.SOAServiceManager.CommitPost方法的典型用法代码示例。如果您正苦于以下问题:C# SOAServiceManager.CommitPost方法的具体用法?C# SOAServiceManager.CommitPost怎么用?C# SOAServiceManager.CommitPost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccessLayer.SOAServiceManager
的用法示例。
在下文中一共展示了SOAServiceManager.CommitPost方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAnfragen
public System.Collections.Generic.List<BusinessLayer.Anfrage> GetAnfragen (string lieferantenId, string deviceLanguage , ref BusinessLayer.User user)
{
// First check for the network status
if (user.NetworkStatus == NetworkState.Disconnected)
return GetAnfragen (lieferantenId, deviceLanguage, ref user, true);
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/anfragen.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("KundeID", lieferantenId);
sm.AddCriteriaValue ("Mandant", user.Mandant);
sm.AddCriteriaValue ("Sprache", deviceLanguage);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = reader.ReadToEnd ();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.Anfrage>> (jsonText);
}
示例2: GetTaskTyps
public static System.Collections.Generic.List<BusinessLayer.TaskTyp> GetTaskTyps( ref BusinessLayer.User user)
{
// First check for the network status
if (user.NetworkStatus == NetworkState.Disconnected)
return GetTaskTyps ( ref user, true);
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/tasktyp.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = reader.ReadToEnd ();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.TaskTyp>> (jsonText);
}
示例3: GetUmsatz
public string GetUmsatz(string id, ref BusinessLayer.User user)
{
// First we test if the networkstatus is disconnected or not
if (user.NetworkStatus == NetworkState.Disconnected)
return GetUmsatz (id, ref user, true);
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/getpersonumsatz.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue("ID", id);
sm.AddCriteriaValue("Mandant", user.Mandant);
sm.AddCriteriaValue("Bereich", "6");
// Now it's show time
dataStream = sm.CommitPost();
if (dataStream == null)
return "0";
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd();
return jsonText.Trim();
}
示例4: GetTownViaPLZ
public static string GetTownViaPLZ (string PLZ, ref BusinessLayer.User user)
{
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/GetTownViaPLZ.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("PLZ", PLZ);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return "";
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd ();
/* JavaScriptSerializer js = new JavaScriptSerializer();
Person [] persons = js.Deserialize<Person[]>(json);
*/
return jsonText.Trim ();
}
示例5: GetSessionAsync
public async Task<BusinessLayer.Session> GetSessionAsync (string name ,string password, string mandant, NetworkState networkstate)
{
if (networkstate == NetworkState.Disconnected)
{
return await GetSessionAsync (name, password,mandant, true);
}
Stream dataStream;
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(BusinessLayer.Session));
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
//SOAServiceManager sm = new SOAServiceManager ("https://92.79.164.245:443/authenticationsession.json","", DataAccessLayer.HTTPMethod.POST);
SOAServiceManager sm = new SOAServiceManager ( DataAccessLayer.Utilities.ServerIP + "/authenticationsession.json","", DataAccessLayer.HTTPMethod.POST);
// https://92.79.164.245
// Add the Values
sm.AddCriteriaValue ("name",name);
sm.AddCriteriaValue ("password",password);
sm.AddCriteriaValue ("mandant", mandant);
// Now it's show time
// dataStream =await sm.CommitPostAsync ();
dataStream = await System.Threading.Tasks.Task.Run(() => sm.CommitPost());
if (dataStream == null)
{
// Then there is a connection failure
BusinessLayer.Session temp = BusinessLayer.Session.Create ();
temp.Success = SOAResult.Disconnected;
return temp;
}
Console.WriteLine("Disposed 5");
var mySession = (BusinessLayer.Session)ser.ReadObject(dataStream);
return mySession;
}
示例6: GetSession
public SOAResult GetSession (ref BusinessLayer.Session mySession, string name ,string password, string mandant, NetworkState networkstate)
{
if (networkstate == NetworkState.Disconnected)
{
return GetSession (ref mySession, name, password,mandant, true);
}
Stream dataStream;
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(BusinessLayer.Session));
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
//SOAServiceManager sm = new SOAServiceManager ("https://92.79.164.245:443/authenticationsession.json","", DataAccessLayer.HTTPMethod.POST);
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/authenticationsession.json","", DataAccessLayer.HTTPMethod.POST);
// https://92.79.164.245
// Add the Values
sm.AddCriteriaValue ("name",name);
sm.AddCriteriaValue ("password",password);
sm.AddCriteriaValue ("mandant", mandant);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
{
// Then there is a connection failure
return SOAResult.Disconnected;
}
mySession = (BusinessLayer.Session)ser.ReadObject(dataStream);
return mySession.Success;
}
示例7: GetArtikel
public BusinessLayer.Artikel GetArtikel(string artikelID, string version, string deviceLanguage, ref BusinessLayer.User user)
{
// First check for the network status
if (user.NetworkStatus == NetworkState.Disconnected)
return null;
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager(DataAccessLayer.Utilities.ServerIP + "/artikel.json", user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue("ID", artikelID);
sm.AddCriteriaValue("Mandant", user.Mandant);
sm.AddCriteriaValue("Sprache", deviceLanguage);
sm.AddCriteriaValue("Version", version);
// Now it's show time
dataStream = sm.CommitPost();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = reader.ReadToEnd();
return Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.Artikel>(jsonText);
}
示例8: GetLieferAnschriften
public List<BusinessLayer.Anschrift> GetLieferAnschriften(BusinessLayer.Lieferant lieferant ,string deviceLanguage ,ref BusinessLayer.User user)
{
if (user.NetworkStatus == NetworkState.Disconnected)
return null;
Stream dataStream;
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/Lieferanschriften.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("Mandant", user.Mandant);
sm.AddCriteriaValue ("ID", lieferant.ID);
sm.AddCriteriaValue ("Sprache", deviceLanguage);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null ;
string jsonText = reader.ReadToEnd ();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.Anschrift>> (jsonText);
}
示例9: DeleteLieferant
public DataAccessLayer.SOAResult DeleteLieferant (BusinessLayer.Lieferant lieferant , ref BusinessLayer.User user)
{
Stream dataStream;
ReturnValue Success;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/DeleteLieferant.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("ID", lieferant.ID);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return SOAResult.FALSE;
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd ();
Success = Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
return Success.Success;
}
示例10: UpdateKpf
public DataAccessLayer.SOAResult UpdateKpf ( BusinessLayer.Transaction transaction, ref BusinessLayer.User user)
{
// First test if the network status is disconnected
if (user.NetworkStatus == NetworkState.Disconnected)
{
return 0;
// return this.UpdateKunde (kunde, ref user, true);
}
Stream dataStream;
ReturnValue Success;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/UpdateKpf.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("ID", transaction.ID);
sm.AddCriteriaValue("Datum", transaction.Datum);
sm.AddCriteriaValue("KundeId", transaction.KundeID);
sm.AddCriteriaValue("AdrVersId", transaction.LieferAnschriftID);
sm.AddCriteriaValue("AdrRchgID", transaction.RechnungsAnschriftID);
sm.AddCriteriaValue("Kundenbestellnummer", transaction.Projekt);
// Now it's show time
dataStream = sm.CommitPost ();
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd ();
Success = Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
return Success.Success;
}
示例11: SetUserPermissions
public void SetUserPermissions ( ref BusinessLayer.User user)
{
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/execuserpermission.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("ID", user.ID);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return ;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return ;
string jsonText = reader.ReadToEnd ();
user = Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.User> (jsonText);
}
示例12: SetUserData
public void SetUserData (ref BusinessLayer.User user,string session)
{
if (user.NetworkStatus == NetworkState.Disconnected)
{
SetUserData (ref user, session, false);
return;
}
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/user.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("ID", user.ID);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return ;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return ;
string jsonText = reader.ReadToEnd ();
/* JavaScriptSerializer js = new JavaScriptSerializer();
Person [] persons = js.Deserialize<Person[]>(json);
*/
user = Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.User> (jsonText);
}
示例13: GetAnfragePreisBeforeCommit
public BusinessLayer.Position GetAnfragePreisBeforeCommit(BusinessLayer.Transaction transaction, BusinessLayer.Position position, string kundeId, BusinessLayer.Artikel artikel, string datum, string menge, string deviceLanguage, ref BusinessLayer.User user)
{
Stream dataStream;
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager(DataAccessLayer.Utilities.ServerIP + "/GetAnfragePreisBeforeCommit.json", user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue("PosID", position.ID);
sm.AddCriteriaValue("KpfID", transaction.ID);
sm.AddCriteriaValue("ArtikelID", artikel.ID);
sm.AddCriteriaValue("KundeID", kundeId);
sm.AddCriteriaValue("VersionId", artikel.VersionID);
sm.AddCriteriaValue("Datum", datum);
sm.AddCriteriaValue("Mandant", user.Mandant);
sm.AddCriteriaValue("User", user.Name);
sm.AddCriteriaValue("Menge", menge);
sm.AddCriteriaValue("Preis", position.Preis);
sm.AddCriteriaValue("Rabatt", position.Rabatt1);
sm.AddCriteriaValue("PreisMenge", position.PreisMenge);
sm.AddCriteriaValue("EinheitID", position.EinheitID);
// Now it's show time
dataStream = sm.CommitPost();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = reader.ReadToEnd();
return Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.Position>(jsonText);
}
示例14: GetArtikelLetzterVK_Kunde
public string GetArtikelLetzterVK_Kunde(string artikelId, string kundeId, string sprache, BusinessLayer.User user)
{
// First we test if the networkstatus is disconnected or not
if (user.NetworkStatus == NetworkState.Disconnected)
return GetArtikelLetzterVK_Kunde(artikelId, kundeId, sprache, user, true);
Stream dataStream;
// Use the ServiceManager to build send the data to the SOA services
// The ServiceManager is responsible to send the data to the SOA services
// Run the service and return the value as a Datastream
// EXECUSERPERMISSION.JSON
SOAServiceManager sm = new SOAServiceManager(DataAccessLayer.Utilities.ServerIP + "/artikelletztervkkunde.json", user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue("ArtikelId", artikelId);
sm.AddCriteriaValue("KundeId", kundeId);
sm.AddCriteriaValue("Mandant", user.Mandant);
sm.AddCriteriaValue("Sprache", sprache);
// Now it's show time
dataStream = sm.CommitPost();
if (dataStream == null)
return "";
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = reader.ReadToEnd();
return jsonText.Trim();
}
示例15: GetLieferantTimeUmsatz
public System.Collections.Generic.List<BusinessLayer.PersonUmsatz> GetLieferantTimeUmsatz(string ID, string interval, ref BusinessLayer.User user)
{
// First test if the network status is disconnected
if (user.NetworkStatus == NetworkState.Disconnected)
{
return this.GetKundeTimeUmsatz(ID, interval, ref user, true);
}
Stream dataStream;
SOAServiceManager sm = new SOAServiceManager(DataAccessLayer.Utilities.ServerIP + "/Getpersontimeumsatz.json", user.IdSession, DataAccessLayer.HTTPMethod.POST);
Console.WriteLine("Searching ID : " + ID);
sm.AddCriteriaValue("ID", ID);
sm.AddCriteriaValue("Mandant", "1");
/*
sm.AddCriteriaValue ("ID", ID);
sm.AddCriteriaValue ("Mandant", user.Mandant);*/
sm.AddCriteriaValue("Interval", interval);
// Now it's show time
dataStream = sm.CommitPost();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.PersonUmsatz>>(jsonText);
}