Ejemplo n.º 1
0
 public ManageEmployeesView(Employee employee, ViewEmployeesViewModel vm, int runmode = 0, int FilterByDepartment = 0)
 {
     this._FilterByDepartment = FilterByDepartment;
     this.runmode             = runmode;
     _employee = employee;
     _vm       = vm;
     InitializeComponent();
 }
Ejemplo n.º 2
0
        public JsonNetResult GetEmployeeFormViewModel()
        {
            var employeeViewModel = new ViewEmployeesViewModel
            {
                Employees            = this.employeeTasks.GetAllEmployees(),
                AvailableTerritories = this.territoryTasks.GetTerritories()
            };

            var serializer = new JsonSerializerSettings
            {
                NullValueHandling     = NullValueHandling.Ignore,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
                ContractResolver      = new NHibernateContractResolver(),
            };

            return(new JsonNetResult
            {
                Data = employeeViewModel,
                SerializerSettings = serializer
            });
        }