public JsonResult GetEmployeeDataTable(System.String id)
        {
            DataTableViewModel data;

            GetTerritoryRequest request = new GetTerritoryRequest();

            request.TerritoryID = id;
            TerritoryView territory = _territoryService.GetTerritory(request).Territory;

            data                 = new DataTableViewModel();
            data.draw            = "1";
            data.recordsTotal    = territory.Employees.ToList().Count.ToString();
            data.recordsFiltered = territory.Employees.ToList().Count.ToString();

            data.data = territory.Employees.ConvertToDetailTerritoryEmployeeDetailViews().ToList <object>();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
 public static DetailTerritory_TerritoryDetailView ConvertToDetailTerritory_TerritoryDetailView(
     this TerritoryView territories)
 {
     return(Mapper.Map <TerritoryView,
                        DetailTerritory_TerritoryDetailView>(territories));
 }
Ejemplo n.º 3
0
 public static ModifyTerritoryRequest ConvertToModifyTerritoryRequest(
     this TerritoryView territories)
 {
     return(Mapper.Map <TerritoryView,
                        ModifyTerritoryRequest>(territories));
 }
Ejemplo n.º 4
0
 public static TerritoryDetailView ConvertToTerritoryDetailView(
     this TerritoryView territory)
 {
     return(Mapper.Map <TerritoryView,
                        TerritoryDetailView>(territory));
 }
Ejemplo n.º 5
0
 public static TerritoryFlatViewModel ConvertToTerritoryFlatViewModel(
     this TerritoryView territory)
 {
     return(Mapper.Map <TerritoryView,
                        TerritoryFlatViewModel>(territory));
 }
Ejemplo n.º 6
0
 public static Territory ConvertToTerritory(
     this TerritoryView territoryView)
 {
     return(Mapper.Map <TerritoryView,
                        Territory>(territoryView));
 }