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 { 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 LoadRunTimeRecipeInfo(Common.ModuleName chamId) { Tuple 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 GetRecipes(Common.ModuleName chamId, bool includeUsedRecipe) { IEnumerable 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; } } }