/// <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); }
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); }
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); }
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); }
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); }
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); }