Example #1
0
        /// <summary>
        /// Get all data to fill combo box
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public List <ModelNotifiedForEmployees> GetAll_Employees(out string error)
        {
            EmployeesGenericREST             EmployeesGenericREST      = new EmployeesGenericREST(wpfConfig);
            List <ModelNotifiedForEmployees> modelNotifiedForEmployees = EmployeesGenericREST.GetAll <ModelNotifiedForEmployees>(100, 0, out error);

            return(modelNotifiedForEmployees);
        }
Example #2
0
        public void DeleteData(ModelNotifiedForEmployees modelNotifiedForEmployees, out string error)
        {
            EmployeesGenericREST EmployeesGenericREST = new EmployeesGenericREST(wpfConfig);
            DeleteEmployeesView  deleteEmployeesView  = new DeleteEmployeesView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForEmployees), modelNotifiedForEmployees, typeof(DeleteEmployeesView), deleteEmployeesView);
            EmployeesGenericREST.Delete(deleteEmployeesView, out error);
        }
Example #3
0
        public void AddData(ModelNotifiedForEmployees modelNotifiedForEmployees, out string error)
        {
            EmployeesGenericREST EmployeesGenericREST = new EmployeesGenericREST(wpfConfig);
            CreateEmployeesView  createEmployeesView  = new CreateEmployeesView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForEmployees), modelNotifiedForEmployees, typeof(CreateEmployeesView), createEmployeesView);
            EmployeesGenericREST.Insert(createEmployeesView, out error);
        }
Example #4
0
        public ModelNotifiedForEmployees GetEmployeesByID(int EmployeeID, out string error)
        {
            error = null;
            EmployeesGenericREST      EmployeesGenericREST      = new EmployeesGenericREST(wpfConfig);
            GetEmployeesView          getEmployeesView          = EmployeesGenericREST.GetByPK <GetEmployeesView>(EmployeeID, out error)[0];
            ModelNotifiedForEmployees modelNotifiedForEmployees = new ModelNotifiedForEmployees();

            Cloner.CopyAllTo(typeof(GetEmployeesView), getEmployeesView, typeof(ModelNotifiedForEmployees), modelNotifiedForEmployees);
            return(modelNotifiedForEmployees);
        }
Example #5
0
        public void SaveData(ModelNotifiedForEmployees modelNotifiedForEmployees, out string error)
        {
            EmployeesGenericREST EmployeesGenericREST = new EmployeesGenericREST(wpfConfig);
            UpdateEmployeesView  updateEmployeesView  = new UpdateEmployeesView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForEmployees), modelNotifiedForEmployees, typeof(UpdateEmployeesView), updateEmployeesView);
            EmployeesGenericREST.Update(updateEmployeesView, out error);

            //Saving NxN data for: EmployeeTerritories
            SaveNxNComboFor_EmployeeTerritories(modelNotifiedForEmployees, out error);
        }
Example #6
0
        public List <ModelNotifiedForEmployees> GetAllEmployees(out string error)
        {
            EmployeesGenericREST             EmployeesGenericREST      = new EmployeesGenericREST(wpfConfig);
            List <ModelNotifiedForEmployees> modelNotifiedForEmployees = EmployeesGenericREST.GetAll <ModelNotifiedForEmployees>(100, 0, out error);

            if (!string.IsNullOrEmpty(error))
            {
                return(null);
            }

            //Initializing row status
            foreach (var item in modelNotifiedForEmployees)
            {
                item.ItemChanged = false;
                item.NewItem     = false;
            }

            return(modelNotifiedForEmployees);
        }