本文整理汇总了C#中DataAccessLayer.SOAServiceManager.AddCriteriaValue方法的典型用法代码示例。如果您正苦于以下问题:C# SOAServiceManager.AddCriteriaValue方法的具体用法?C# SOAServiceManager.AddCriteriaValue怎么用?C# SOAServiceManager.AddCriteriaValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccessLayer.SOAServiceManager
的用法示例。
在下文中一共展示了SOAServiceManager.AddCriteriaValue方法的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: 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();
}
示例3: 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 ();
}
示例4: 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;
}
示例5: 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;
}
示例6: 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);
}
示例7: GetLieferAnschriftenAsync
async public Task<List<BusinessLayer.Anschrift>> GetLieferAnschriftenAsync(BusinessLayer.Lieferant lieferant ,string deviceLanguage , 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 = await sm.CommitPostAsync ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = await reader.ReadToEndAsync ();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.Anschrift>> (jsonText);
}
示例8: 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;
}
示例9: 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;
}
示例10: GetInteressentAsync
public async Task< BusinessLayer.Interessent> GetInteressentAsync (string id , string deviceLanguage, BusinessLayer.User user)
{
// First check for the network status
if (user.NetworkStatus == NetworkState.Disconnected)
return await GetInteressentAsync (id,deviceLanguage, 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 + "/Interessent.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("ID", id);
// Now it's show time
dataStream = await sm.CommitPostAsync ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = await reader.ReadToEndAsync ();
/* JavaScriptSerializer js = new JavaScriptSerializer();
Person [] persons = js.Deserialize<Person[]>(json);
*/
return await Task.Run(() => Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.Interessent> (jsonText));
}
示例11: CommitTransaction
public SOAResult CommitTransaction(BusinessLayer.Transaction transaction, BusinessLayer.User user)
{
Stream dataStream;
ReturnValue Success;
// 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 + "/committransaction.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("KpfID", transaction.ID);
// Now it's show time
dataStream = sm.CommitPost ();
if (dataStream == null)
return SOAResult.Disconnected;
StreamReader reader = new StreamReader(dataStream);
string jsonText = reader.ReadToEnd ();
// if the return value is null then we have no connection
if (jsonText == null)
return SOAResult.Disconnected;
Success = Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
return Success.Success;
}
示例12: InsertPosition
public BusinessLayer.Position InsertPosition(BusinessLayer.Transaction transaction, BusinessLayer.Position pos, string deviceLanguage,TransactionTyp type, 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;
switch (type)
{
case TransactionTyp.Anfrage:
sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertAnfrage.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
break;
case TransactionTyp.Angebot:
sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertAngebot.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
break;
case TransactionTyp.Auftrag:
sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertAuftrag.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
break;
case TransactionTyp.Bestellung:
sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertBestellung.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
break;
default:
sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertAnfrage.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
break;
}
// Add the Values
sm.AddCriteriaValue ("Mandant", user.Mandant);
sm.AddCriteriaValue("User", user.Name);
sm.AddCriteriaValue("Datum", transaction.Datum);
sm.AddCriteriaValue("KundeId", transaction.KundeID);
sm.AddCriteriaValue("AdrVersId", transaction.LieferAnschriftID);
sm.AddCriteriaValue("AdrRchgID", transaction.RechnungsAnschriftID);
sm.AddCriteriaValue("LieferDatum", pos.Liefdatum);
sm.AddCriteriaValue("Kundenbestellnummer", pos.KundenBestellNummer);
sm.AddCriteriaValue("ArtikelId", pos.ArtID);
sm.AddCriteriaValue("Menge", pos.Menge);
sm.AddCriteriaValue("MengeEinheit", pos.Einheit);
sm.AddCriteriaValue("Preis", pos.Preis);
sm.AddCriteriaValue("PreisMenge", pos.PreisMenge);
sm.AddCriteriaValue("Rabatt1", pos.Rabatt1);
sm.AddCriteriaValue("Rabatt2", pos.Rabatt2);
sm.AddCriteriaValue("Rabatt3", pos.Rabatt3);
sm.AddCriteriaValue("Rabatt4", pos.Rabatt4);
sm.AddCriteriaValue("Vertreter", pos.Vertreter);
sm.AddCriteriaValue("Provision", pos.Provision);
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<BusinessLayer.Position> (jsonText);
}
示例13: GetAnfragePositionPreis
public BusinessLayer.Position GetAnfragePositionPreis(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 + "/getanfragepreis.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
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);
// 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: GetLieferantTimeUmsatzAsync
public async Task<System.Collections.Generic.List<BusinessLayer.PersonUmsatz>> GetLieferantTimeUmsatzAsync(string ID, string interval, BusinessLayer.User user)
{
// First test if the network status is disconnected
if (user.NetworkStatus == NetworkState.Disconnected)
{
return await this.GetLieferantTimeUmsatzAsync(ID, interval, 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("Interval", interval);
// Now it's show time
dataStream = await sm.CommitPostAsync();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
string jsonText = await reader.ReadToEndAsync();
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.PersonUmsatz>>(jsonText);
}
示例15: GetAnsprechpartnernAsync
public async Task< System.Collections.Generic.List<BusinessLayer.Ansprechpartner>> GetAnsprechpartnernAsync (string kundeId , string deviceLanguage , BusinessLayer.User user)
{
// First check for the network status
if (user.NetworkStatus == NetworkState.Disconnected)
return await GetAnsprechpartnernAsync (kundeId, deviceLanguage, 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
SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/Ansprechpartnern.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);
// Add the Values
sm.AddCriteriaValue ("KundeID", kundeId);
// Now it's show time
dataStream = await sm.CommitPostAsync ();
if (dataStream == null)
return null;
StreamReader reader = new StreamReader(dataStream);
if (reader == null)
return null;
string jsonText = await reader.ReadToEndAsync ();
return await Task.Run(() => Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.Ansprechpartner>> (jsonText));
}