123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Aitex.Core.WCF;
- using Aitex.Triton160.Common.Interface;
- namespace Aitex.Triton160.UI.WCF
- {
- public class RecipeServiceClient : ServiceClientWrapper<IRecipeService>, IRecipeService
- {
- public RecipeServiceClient()
- : base("Client_IRecipeService", "RecipeService")
- {
- }
- public string LoadRecipe(Common.ModuleName chamId, string recipeName)
- {
- string result = null;
- Invoke(svc => { result = svc.LoadRecipe(chamId, recipeName); });
- return result;
- }
- public Tuple<string, string> LoadRunTimeRecipeInfo(Common.ModuleName chamId)
- {
- Tuple<string, string> result = null;
- Invoke(svc => { result = svc.LoadRunTimeRecipeInfo(chamId); });
- return result;
- }
- public bool MoveRecipeFile(Common.ModuleName chamId, string folderName, string tragetFolderName)
- {
- bool result = false;
- Invoke(svc => { result = svc.MoveRecipeFile(chamId, folderName, tragetFolderName); });
- return result;
- }
- public IEnumerable<string> GetRecipes(Common.ModuleName chamId, bool includeUsedRecipe)
- {
- IEnumerable<string> result = null;
- Invoke(svc => { result = svc.GetRecipes(chamId, includeUsedRecipe); });
- return result;
- }
- public string GetXmlRecipeList(Common.ModuleName chamId, bool includeUsedRecipe)
- {
- string result = null;
- Invoke(svc => { result = svc.GetXmlRecipeList(chamId, includeUsedRecipe); });
- return result;
- }
- public bool DeleteRecipe(Common.ModuleName chamId, string recipeName)
- {
- bool result = false;
- Invoke(svc => { result = svc.DeleteRecipe(chamId, recipeName); });
- return result;
- }
- public bool DeleteFolder(Common.ModuleName chamId, string folderName)
- {
- bool result = false;
- Invoke(svc => { result = svc.DeleteFolder(chamId, folderName); });
- return result;
- }
- public bool SaveAsRecipe(Common.ModuleName chamId, string recipeName, string recipeContent)
- {
- bool result = false;
- Invoke(svc => { result = svc.SaveAsRecipe(chamId, recipeName, recipeContent); });
- return result;
- }
- public bool SaveRecipe(Common.ModuleName chamId, string recipeName, string recipeContent)
- {
- bool result = false;
- Invoke(svc => { result = svc.SaveRecipe(chamId, recipeName, recipeContent); });
- return result;
- }
- public bool CreateFolder(Common.ModuleName chamId, string folderName)
- {
- bool result = false;
- Invoke(svc => { result = svc.CreateFolder(chamId, folderName); });
- return result;
- }
- public bool RenameRecipe(Common.ModuleName chamId, string oldName, string newName)
- {
- bool result = false;
- Invoke(svc => { result = svc.RenameRecipe(chamId, oldName, newName); });
- return result;
- }
- public bool RenameFolder(Common.ModuleName chamId, string oldName, string newName)
- {
- bool result = false;
- Invoke(svc => { result = svc.RenameFolder(chamId, oldName, newName); });
- return result;
- }
- public string GetRecipeFormatXml(Common.ModuleName chamId)
- {
- string result = null;
- Invoke(svc => { result = svc.GetRecipeFormatXml(chamId); });
- return result;
- }
- public string GetRecipeTemplate(Common.ModuleName chamId)
- {
- string result = string.Empty;
- Invoke(svc => { result = svc.GetRecipeTemplate(chamId); });
- return result;
- }
- public string GetRecipeByBarcode(Common.ModuleName chamId, string barcode)
- {
- string result = string.Empty;
- Invoke(svc => { result = svc.GetRecipeByBarcode(chamId, barcode); });
- return result;
- }
- }
- }
|