• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataAccessLayer.SOAServiceManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



SOAServiceManager类属于DataAccessLayer命名空间,在下文中一共展示了SOAServiceManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: 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", "8");

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

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


示例2: 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);

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


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


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


示例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;

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


示例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;
					
		}
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:38,代码来源:DAL_Session.cs


示例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);

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


示例8: 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


示例9: ValidateLicense

        public bool ValidateLicense(string LicenseKey, 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                         
            SOAServiceManager sm = new SOAServiceManager ( DataAccessLayer.Utilities.ServerIP + "/mobilelicense.json","", DataAccessLayer.HTTPMethod.POST);                 

            // https://92.79.164.245
            // Add the Values                                                               
            sm.AddCriteriaValue ("LicenseKey",LicenseKey);                                              


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

            if (dataStream == null)
            {
                // Then there is a connection failure
                return false;
            }

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

            string jsonText =  reader.ReadToEnd();

            if (jsonText.Trim() =="1")
                return true;
            else
                return false;


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


示例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;

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


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


示例12: 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;


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


示例13: 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));

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


示例14: 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);


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


示例15: InsertAnsprechpartner

		public SOAResult InsertAnsprechpartner ( BusinessLayer.Ansprechpartner ansprechpartner, ref BusinessLayer.User user)
		{

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

			// Add the Values 	
			sm.AddCriteriaValue ("IdParent",ansprechpartner.IDParent);
			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 = sm.CommitPost ();	
            if (dataStream == null)
                return SOAResult.FALSE;
            
			StreamReader reader = new StreamReader(dataStream);
			string jsonText = reader.ReadToEnd ();


			/*	JavaScriptSerializer js = new JavaScriptSerializer();
			Person [] persons =  js.Deserialize<Person[]>(json);
*/
			Success =  Newtonsoft.Json.JsonConvert.DeserializeObject<ReturnValue> (jsonText);
			ansprechpartner.ID = Success.ID;
			ansprechpartner.Nummer = Success.Nummer;


			return Success.Success;

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


示例16: 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


示例17: GetLieferantenAsync

        public	async  Task< System.Collections.Generic.List<BusinessLayer.Lieferant>>    GetLieferantenAsync (string name ,  string deviceLanguage ,  BusinessLayer.User user)
		{
			// First check for the network status

            if (user.NetworkStatus == NetworkState.Disconnected)
                return await GetLieferantenAsync (name,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 + "/Lieferanten.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

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

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


示例18: GetKundeTimeUmsatz

		public  System.Collections.Generic.List<BusinessLayer.PersonUmsatz> GetKundeTimeUmsatz (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);					

            // RELEASE CHANGE: Delete all the lines
			// Add the Values 				

			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);
		}
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:33,代码来源:DAL_Kunde.cs


示例19: ValidateLicenseAsync

        async public Task<bool> ValidateLicenseAsync(string LicenseKey, 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                         
            SOAServiceManager sm = new SOAServiceManager ( DataAccessLayer.Utilities.ServerIP + "/mobilelicense.json","", DataAccessLayer.HTTPMethod.POST);                 

            // Now it's show time   
            // Add the Values                                                               
            sm.AddCriteriaValue ("LicenseKey",LicenseKey);                                              

            dataStream = await System.Threading.Tasks.Task.Run(() => sm.CommitPost());

            if (dataStream == null)
            {
                return false;
            }

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

            string jsonText = await reader.ReadToEndAsync();



            if (jsonText.Trim() =="1")
                return true;
            else
                return false;
           

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


示例20: InsertKundeAsync

		async public Task< DataAccessLayer.SOAResult > InsertKundeAsync ( BusinessLayer.Kunde kunde,  BusinessLayer.User user)
		{

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

			// Add the Values 							
			sm.AddCriteriaValue ("Name", kunde.Name);
			sm.AddCriteriaValue ("Strasse", kunde.Strasse);
			sm.AddCriteriaValue ("PLZ", kunde.PLZ);
			sm.AddCriteriaValue ("Ort", kunde.Ort);
            sm.AddCriteriaValue ("Land", kunde.Land);
            sm.AddCriteriaValue ("LandNummer", kunde.LandNummer);
			sm.AddCriteriaValue ("Telefon", kunde.Telefon);
			sm.AddCriteriaValue ("Email", kunde.Email);
			sm.AddCriteriaValue ("Geburtsdatum", kunde.Geburtsdatum);
			sm.AddCriteriaValue ("Mandant", user.Mandant);
            sm.AddCriteriaValue ("Sperrdatum", kunde.Sperrdatum);
            sm.AddCriteriaValue ("Sperrgrund", kunde.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);
			kunde.ID = Success.ID;
			kunde.Nummer = Success.Nummer;
           

			return Success.Success;

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataAccessLayer.clsParameterCollection类代码示例发布时间:2022-05-24
下一篇:
C# DataAccessLayer.HolonetEntities类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap