Пример #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();
 }
Пример #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
            });
        }