public void CustomerGetById() { DocumentManagement.Customer.Models.Customer.CustomerModel oResult = DocumentManagement.Customer.Controller.Customer.CustomerGetById("1D4F2724"); Assert.IsNotNull(oResult); }
public FieldSearchModel GetFieldOptions (string GetFieldOptionsVal, string FormPublicId) { FieldSearchModel oReturn = new FieldSearchModel() { ProviderInfoType = new List <Customer.Models.Util.CatalogModel>(), }; DocumentManagement.Customer.Models.Customer.CustomerModel oCustomerAux = DocumentManagement.Customer.Controller.Customer.CustomerGetByFormId(FormPublicId); List <DocumentManagement.Customer.Models.Util.CatalogModel> oItemsAux = DocumentManagement.Customer.Controller.Customer.CatalogGetCustomerOptions(); oItemsAux.Where(cat => cat.CatalogId == 3).OrderBy(itm => itm.ItemName).All(itm => { if (!oCustomerAux.RelatedForm.Any(f => f.RelatedStep.Any(s => s.RelatedField.Any(fi => fi.ProviderInfoType.ItemId == itm.ItemId)))) { oReturn.ProviderInfoType.Add(new Customer.Models.Util.CatalogModel() { ItemId = itm.ItemId, ItemName = itm.ItemName, }); } return(true); }); return(oReturn); }