cb
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web.Mvc;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
@@ -97,15 +97,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if (MobileSessionFacade.CheckForUserRight(UserRightType.CustomerView_View))
|
||||
{
|
||||
Model.Customers = CustomerService.GetAllActiveCustomers().OrderBy(k => k.LastName).ToList();
|
||||
Model.Customers = CustomerService.GetAllActiveCompactCustomers().OrderBy(k => k.LastName).ToList();
|
||||
}
|
||||
else if(MobileSessionFacade.CheckForUserRight(UserRightType.Customer_ViewMyCustomers))
|
||||
{
|
||||
Model.Customers = CustomerService.GetActiveCustomersById(myRelatedCustomers.Select(c => c.Customer.CustomerOid).ToList()).OrderBy(k => k.LastName).ToList();
|
||||
Model.Customers = CustomerService.GetCompactCustomersById(myRelatedCustomers.Select(c => c.Customer.CustomerOid).ToList()).OrderBy(k => k.LastName).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Customers = new List<CustomerDC>();
|
||||
Model.Customers = new List<CompactCustomerDC>();
|
||||
}
|
||||
|
||||
if(MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees))
|
||||
@@ -127,7 +127,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.SupportConcepts = CustomerService.GetAllActiveSupportConceptsByCustomers(Model.Customers.Select(c => c.CustomerOid ?? 0));
|
||||
Model.SupportConcepts = CustomerService.GetAllActiveSupportConceptsByCustomers(Model.Customers.Select(c => c.CustomerOid));
|
||||
}
|
||||
|
||||
var test = Model.ServiceRecords.Any(a => a.GroupPersonCount != null && a.IsCreatedInMobileClient);
|
||||
@@ -2303,8 +2303,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return "SessionTimeout";
|
||||
}
|
||||
|
||||
Model.SelectedCustomer = Model.Customers.FirstOrDefault(f => f.CustomerOid.HasValue && f.CustomerOid.Value.Equals(customerOid));
|
||||
Model.SelectedCustomer = CustomerService.LoadCustomer(customerOid);
|
||||
Model.SelectedCustomerOid = customerOid;
|
||||
|
||||
|
||||
return SerializeObject(GetJSONCustomer(Model.SelectedCustomer));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user