当前位置: 首页>>代码示例>>C#>>正文


C# SOAServiceManager.CommitPostAsync方法代码示例

本文整理汇总了C#中DataAccessLayer.SOAServiceManager.CommitPostAsync方法的典型用法代码示例。如果您正苦于以下问题:C# SOAServiceManager.CommitPostAsync方法的具体用法?C# SOAServiceManager.CommitPostAsync怎么用?C# SOAServiceManager.CommitPostAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataAccessLayer.SOAServiceManager的用法示例。


在下文中一共展示了SOAServiceManager.CommitPostAsync方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTownViaPLZAsync

        public async static Task<String> GetTownViaPLZAsync (string PLZ, 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 = await sm.CommitPostAsync();
            if (dataStream == null)
                return "";

            StreamReader reader = new StreamReader(dataStream);
            string jsonText = await reader.ReadToEndAsync();

            /*  JavaScriptSerializer js = new JavaScriptSerializer();
            Person [] persons =  js.Deserialize<Person[]>(json);
*/

            return   jsonText.Trim ();
        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:28,代码来源:DAL_Kunde.cs

示例2: GetAnfragePreisBeforeCommitAsync

        async public Task<BusinessLayer.Position> GetAnfragePreisBeforeCommitAsync(BusinessLayer.Transaction transaction, BusinessLayer.Position position, string kundeId, BusinessLayer.Artikel artikel, string datum, string menge, string deviceLanguage, 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 + "/GetAngebotPreisBeforeCommit.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 = 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<BusinessLayer.Position>(jsonText);


        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:40,代码来源:DAL_Anfrage.cs

示例3: GetAnfragenAsync

        public async  Task< System.Collections.Generic.List<BusinessLayer.Anfrage>>   GetAnfragenAsync (string lieferantenId, string deviceLanguage ,  BusinessLayer.User user)
        {
            // First check for the network status
            if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetAnfragenAsync (lieferantenId, 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 + "/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 = 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.Anfrage>> (jsonText));

        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:37,代码来源:DAL_Anfrage.cs

示例4: InsertLieferantAsync

		async public  Task<DataAccessLayer.SOAResult> InsertLieferantAsync ( BusinessLayer.Lieferant Lieferant,  BusinessLayer.User user)
		{

			// First test if the network status is disconnected
			if (user.NetworkStatus == NetworkState.Disconnected) 
			{
				return await this.InsertLieferantAsync (Lieferant,  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 + "/InsertLieferant.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values 							
			sm.AddCriteriaValue ("Name", Lieferant.Name);
			sm.AddCriteriaValue ("Strasse", Lieferant.Strasse);
			sm.AddCriteriaValue ("PLZ", Lieferant.PLZ);
			sm.AddCriteriaValue ("Ort", Lieferant.Ort);
			sm.AddCriteriaValue ("Land", Lieferant.Land);
            sm.AddCriteriaValue ("LandNummer", Lieferant.LandNummer);
			sm.AddCriteriaValue ("Telefon", Lieferant.Telefon);
			sm.AddCriteriaValue ("Email", Lieferant.Email);
			sm.AddCriteriaValue ("Geburtsdatum", Lieferant.Geburtsdatum);
			sm.AddCriteriaValue ("Mandant", user.Mandant);
            sm.AddCriteriaValue ("Sperrdatum", Lieferant.Sperrdatum);
            sm.AddCriteriaValue ("Sperrgrund", Lieferant.Sperrgrund);

			// Now it's show time	
            dataStream = await sm.CommitPostAsync ();													

            if (dataStream == null)
                return SOAResult.Disconnected;

            StreamReader reader = new StreamReader(dataStream);
			string jsonText = await reader.ReadToEndAsync ();


			Success =  Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
			Lieferant.ID = Success.ID;
			Lieferant.Nummer = Success.Nummer;


			return Success.Success;

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:51,代码来源:DAL_Lieferant.cs

示例5: 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);
        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:31,代码来源:DAL_Lieferant.cs

示例6: GetLieferantAsync

        public	async  Task< BusinessLayer.Lieferant>    GetLieferantAsync (string id ,string deviceLanguage,  BusinessLayer.User user)
		{
			// First check for the network status
			if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetLieferantAsync (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 + "/Lieferant.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values 							
			sm.AddCriteriaValue ("ID", 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 ();


			/*	JavaScriptSerializer js = new JavaScriptSerializer();
			Person [] persons =  js.Deserialize<Person[]>(json);
*/

			return await Task.Run(() => Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.Lieferant> (jsonText));

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:39,代码来源:DAL_Lieferant.cs

示例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);
        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:34,代码来源:DAL_Lieferant.cs

示例8: GetArtikelCrossSellingAsync

        public async System.Threading.Tasks.Task< List<BusinessLayer.Artikel>> GetArtikelCrossSellingAsync(string artikelId, BusinessLayer.User user)
        {
            // First we test if the networkstatus is disconnected or not
            if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetArtikelCrossSellingAsync(artikelId, 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 + "/artikelcrossselling.json", user.IdSession, DataAccessLayer.HTTPMethod.POST);                    

            // Add the Values                           
            sm.AddCriteriaValue("ArtikelId", artikelId);
            sm.AddCriteriaValue("Mandant", user.Mandant);

            // 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.Artikel>>(jsonText);

        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:35,代码来源:DAL_Artikel.cs

示例9: SetUserPermissionsAsync

        public  async Task<BusinessLayer.User> SetUserPermissionsAsync (  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 =await sm.CommitPostAsync ();                                                    

            if (dataStream == null)
                return null;

            StreamReader reader = new StreamReader(dataStream);
            if (reader == null)
                return null;

            string jsonText = await reader.ReadToEndAsync ();

            user = Newtonsoft.Json.JsonConvert.DeserializeObject<BusinessLayer.User> (jsonText);
            return user;
        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:28,代码来源:DAL_User.cs

示例10: UpdateAnsprechpartnerAsync

		async public Task< DataAccessLayer.SOAResult> UpdateAnsprechpartnerAsync ( BusinessLayer.Ansprechpartner ansprechpartner,  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 + "/UpdateAnsprechpartner.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values
			sm.AddCriteriaValue ("ID", ansprechpartner.ID);
			sm.AddCriteriaValue ("Name", ansprechpartner.Name);
			sm.AddCriteriaValue ("Vorname", ansprechpartner.Vorname);
			sm.AddCriteriaValue ("Nummer", ansprechpartner.Nummer);
			sm.AddCriteriaValue ("Strasse", ansprechpartner.Strasse);
			sm.AddCriteriaValue ("PLZ", ansprechpartner.PLZ);
			sm.AddCriteriaValue ("Ort", ansprechpartner.Ort);
			sm.AddCriteriaValue ("Land", ansprechpartner.Land);
            sm.AddCriteriaValue ("LandNummer", ansprechpartner.LandNummer);
            sm.AddCriteriaValue ("Telefon", ansprechpartner.Telefon);
			sm.AddCriteriaValue ("Email", ansprechpartner.Email);
			sm.AddCriteriaValue ("Geburtsdatum", ansprechpartner.Geburtsdatum);
			sm.AddCriteriaValue ("Mandant", user.Mandant);
            sm.AddCriteriaValue ("Sperrdatum", ansprechpartner.Sperrdatum);
            sm.AddCriteriaValue ("Sperrgrund", ansprechpartner.Sperrgrund);

			// Now it's show time	
			dataStream =await sm.CommitPostAsync ();													

            if (dataStream == null)
                return SOAResult.Disconnected;

			StreamReader reader = new StreamReader(dataStream);
			string jsonText = await reader.ReadToEndAsync ();

			Success =  Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
			return Success.Success;

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:42,代码来源:DAL_Ansprechpartner.cs

示例11: InsertTaskAsync

        public async Task<ReturnValue> InsertTaskAsync ( BusinessLayer.Task task,  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 + "/InsertTask.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values 	
			sm.AddCriteriaValue ("Typ",task.Typ);
			sm.AddCriteriaValue ("Art",task.Art);
			sm.AddCriteriaValue ("Status",task.Status);
			sm.AddCriteriaValue ("Adr_id", task.Adr_Id);
			sm.AddCriteriaValue ("Datum",task.Datum);
			sm.AddCriteriaValue ("Zeit", task.Zeit);
			sm.AddCriteriaValue ("Mitarbeiter",task.Mitarbeiter);
			sm.AddCriteriaValue ("Abteilung", task.Abteilung);
			sm.AddCriteriaValue ("Ansprechpartner", task.Ansprechpartner);
			sm.AddCriteriaValue ("Memo", task.Memo);
			sm.AddCriteriaValue ("AnsprechpartnerId", task.AnsprechpartnerID);
			sm.AddCriteriaValue ("Datum_Save",task.Datum_Save);
			sm.AddCriteriaValue ("User_Save",task.User_Save);
			sm.AddCriteriaValue ("Datum_Edit",task.Datum_Edit);
			sm.AddCriteriaValue ("Datum_Close",task.Datum_Close);
			sm.AddCriteriaValue ("Time_Close",task.Time_Close);
			sm.AddCriteriaValue ("Time_TelStart",task.Time_TelStart);
			sm.AddCriteriaValue ("Time_TelDauer",task.Time_TelDauer);
			sm.AddCriteriaValue ("Mandant", user.Mandant);

			// Now it's show time	
            dataStream = await sm.CommitPostAsync ();													

            if (dataStream == null)
                return null;

			StreamReader reader = new StreamReader(dataStream);
			string jsonText = await reader.ReadToEndAsync ();


			Success =  Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);

			return Success;

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:49,代码来源:DAL_Task.cs

示例12: GetTaskArtsAsync

        public static async Task<System.Collections.Generic.List<BusinessLayer.TaskArt>> GetTaskArtsAsync(  BusinessLayer.User user)
		{
			// First check for the network status
			if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetTaskArtsAsync (  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 + "/taskart.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					


			// 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.TaskArt>> (jsonText));
		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:30,代码来源:DAL_Task.cs

示例13: DeleteTaskAsync

		async public  Task<DataAccessLayer.SOAResult> DeleteTaskAsync (BusinessLayer.Task task, 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 + "/DeleteTask.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values
			sm.AddCriteriaValue ("ID", task.ID);

			// Now it's show time	
            dataStream = await sm.CommitPostAsync ();													

            if (dataStream == null)
                return SOAResult.Disconnected;

			StreamReader reader = new StreamReader(dataStream);
			string jsonText =await  reader.ReadToEndAsync ();
			Success =  Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
            return Success.Success;
		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:26,代码来源:DAL_Task.cs

示例14: UpdatePositionAsync

        async public Task< BusinessLayer.Position> UpdatePositionAsync(BusinessLayer.Transaction transaction,  BusinessLayer.Position pos, string deviceLanguage, 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;
            sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/insertAnfrage.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);                  

            // Add the Values  
            if (String.IsNullOrEmpty(pos.ID))
                sm.AddCriteriaValue("PosID", "0");
            else
                sm.AddCriteriaValue("PosID", pos.ID);
            sm.AddCriteriaValue("KpfID",transaction.ID);
            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", transaction.Projekt);
            sm.AddCriteriaValue("ArtikelId", pos.ArtID);
            sm.AddCriteriaValue("Menge", pos.Menge);
            sm.AddCriteriaValue("MengeEinheit", pos.EinheitID);
            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 = 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<BusinessLayer.Position> (jsonText);

        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:52,代码来源:DAL_Anfrage.cs

示例15: GetUmsatzAsync

        public async System.Threading.Tasks.Task< string> GetUmsatzAsync(string id, BusinessLayer.User user)
        {
            // First we test if the networkstatus is disconnected or not
            if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetUmsatzAsync(id,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", "8");

            // 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  jsonText.Trim();

        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:33,代码来源:DAL_Lieferant.cs


注:本文中的DataAccessLayer.SOAServiceManager.CommitPostAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。