public List <Category> GetListCategorys(object Ticket, object TypeID, object ProductID, object LanguageID) { _ws = new WS_TTX.WebService1SoapClient(); var listData = new List <Category>(); _listContent = _ws.getListContent(Ticket.ToString()); WS_TTX.Category[] Info = _listContent.listCategory; if (Info != null) { for (int i = 0; i < Info.Length; i++) { if (Info[i].TypeID == int.Parse(TypeID.ToString()) && Info[i].ProductID == int.Parse(ProductID.ToString()) && Info[i].LanguageID == int.Parse(LanguageID.ToString())) { var cate = new Category { CategoryID = Info[i].CategoryID, CategoryName = Info[i].CategoryName, TypeID = Info[i].TypeID, TypeName = Info[i].TypeName, ProductID = Info[i].ProductID, ProductName = Info[i].ProductName, LanguageID = Info[i].LanguageID, LanguageName = Info[i].LanguageName }; listData.Add(cate); } } } return(listData); }
public List <Language> GetListLanguages(object Ticket, object TypeID, object ProductID) { _ws = new WS_TTX.WebService1SoapClient(); var listData = new List <Language>(); _listContent = _ws.getListContent(Ticket.ToString()); WS_TTX.Language[] Info = _listContent.listLanguage; if (Info != null) { for (int i = 0; i < Info.Length; i++) { if (Info[i].TypeID == int.Parse(TypeID.ToString()) && Info[i].ProductID == int.Parse(ProductID.ToString())) { var lang = new Language { LanguageID = Info[i].LanguageID, LanguageName = Info[i].LanguageName, TypeID = Info[i].TypeID, TypeName = Info[i].TypeName, ProductID = Info[i].ProductID, ProductName = Info[i].ProductName }; listData.Add(lang); } } } return(listData); }