/// <summary> /// Validates Login a User authorization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// ID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Responser> ValidateAuthorizationAsync(this IEmployees operations, string token = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ValidateAuthorizationWithHttpMessagesAsync(token, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes a new instance of the XamarinMVVMSampleWebAPI class. /// </summary> public XamarinMVVMSampleWebAPI() : base() { this._customers = new Customers(this); this._employees = new Employees(this); this._orders = new Orders(this); }
/// <summary> /// Initializes a new instance of the XamarinMVVMSampleWebAPI class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._customers = new Customers(this); this._employees = new Employees(this); this._orders = new Orders(this); }
static void Main(string[] args) { using (ChannelFactory <IEmployees> channelFactory = new ChannelFactory <IEmployees>("employeeService")) { IEmployees proxy = channelFactory.CreateChannel(); Console.WriteLine("所有员工列表:"); Array.ForEach <Employee>(proxy.GetAll().ToArray(), e => Console.WriteLine(e)); Console.WriteLine("\n添加一个新员工(004):"); proxy.Create(new Employee { Id = "004", Name = "赵六", Grade = "G9", Department = "行政部" }); Array.ForEach <Employee>(proxy.GetAll().ToArray(), e => Console.WriteLine(e)); Console.WriteLine("\n修改员工(004):"); proxy.Update(new Employee { Id = "004", Name = "赵六", Grade = "G11", Department = "行政部" }); Array.ForEach <Employee>(proxy.GetAll().ToArray(), e => Console.WriteLine(e)); Console.WriteLine("\n删除员工(004)信息:"); proxy.Delete("003"); Array.ForEach <Employee>(proxy.GetAll().ToArray(), e => Console.WriteLine(e)); Console.Read(); } }
/// <summary> /// Get Employees from PayRoll /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='employee'> /// Employee model /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Responser> GetAllAsync(this IEmployees operations, AMEmployee employee, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllWithHttpMessagesAsync(employee, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
//Call the Dispose method later public void Dispose(bool disposing) { if (disposing) { Dispose(); } if (empRepo != null) { empRepo = null; } if (BunitsRepo != null) { BunitsRepo = null; } if (ReportRepo != null) { ReportRepo = null; } if (employeeManager != null) { employeeManager = null; } if (RoleManager != null) { RoleManager = null; } this.Dispose(); }
public EmployeeDocVM(IDataAccessDoctor dataAccess, IEmployees employees) : base(employees) { DataAccess = dataAccess; UpdateDataContext(); EntrySource = new ObservableCollection <Entry>(); IsSuccess = 0; }
/// <summary> /// Generate Token Auth /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userId'> /// ID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Responser> DisableTokenAuthAsync(this IEmployees operations, string userId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DisableTokenAuthWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes a new instance of the XamarinMVVMSampleWebAPI class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._customers = new Customers(this); this._employees = new Employees(this); this._orders = new Orders(this); this._baseUri = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net"); }
/// <param name='operations'> /// Reference to the Forms.Http.IEmployees. /// </param> /// <param name='id'> /// Required. /// </param> public static Employee DeleteEmployee(this IEmployees operations, int id) { return(Task.Factory.StartNew((object s) => { return ((IEmployees)s).DeleteEmployeeAsync(id); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public EmployeesController(IEmployees pIEmployees, IBusinessUnits pIBusinessUnits, IDepartments pIDepartments, IPositions pIPositions, IMEmployees pIMEmployees) { lIEmployees = pIEmployees; lIBusinessUnits = pIBusinessUnits; lIDepartments = pIDepartments; lIPositions = pIPositions; lIMEmployees = pIMEmployees; }
public EmployeeController(IEmployees employeesRepository, IConfiguration configuration) { this.employeesRepository = employeesRepository; //setting connection string for Entity DbContext var connectionString = configuration.GetConnectionString("ConnStr"); EFDataContext.SetConnectionString(connectionString); }
/// <param name='operations'> /// Reference to the Forms.Http.IEmployees. /// </param> public static IList <Employee> GetEmployees(this IEmployees operations) { return(Task.Factory.StartNew((object s) => { return ((IEmployees)s).GetEmployeesAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the XamarinMVVMSampleWebAPI class. /// </summary> public XamarinMVVMSampleWebAPI() : base() { this._customers = new Customers(this); this._employees = new Employees(this); this._orders = new Orders(this); this._baseUri = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net"); }
/// <summary> /// Конструктор. /// </summary> /// <param name="employeeSource">Список сотрудников.</param> public AccountingDepartment(IEmployees employeeSource) { if (employeeSource == null) { throw new ArgumentNullException(nameof(employeeSource)); } _employeeSource = employeeSource; }
public RequisitionController(IRequisition RParam, IBusinessUnits BParam, IEmploymentStatus SParam, IJobtitles jParam, IReportManager RMParam, IEmployees EParam) { RequisitionRepo = RParam; BunitsRepo = BParam; statusRepo = SParam; JobRepo = jParam; managerRepo = RMParam; EmployeeRepo = EParam; }
public HRController(IEmployees empParam, IBusinessUnits busParam, IReportManager rParam, Rolemanager RoleParam, EmployeeManager EParam, ApplicationDbContext dbParam, IEmploymentStatus SParam) { db = dbParam; UserManager = new ApplicationUserManager(new UserStore <ApplicationUser>(db)); empRepo = empParam; BunitsRepo = busParam; ReportRepo = rParam; employeeManager = EParam; RoleManager = RoleParam; db = dbParam; statusRepo = SParam; }
/// <summary> /// Конструктор /// </summary> public EmployeeSelectForm(IEmployees employees) : base() { InitializeComponent(); // Инициализировать компоненты формы _employees = employees; // Скопировать список сотрудников в поле ConfigureEntitiesDataGridView(); // Настроить визуальное представление элемента отображения списка сущностей FillEntitiesDataGridView(); // Заполнить элемент отображения списка сущностей SetButtonActivity(); // Задать активность элементов управления }
static void Main(string[] args) { using (ChannelFactory <IEmployees> channelFactory = new ChannelFactory <IEmployees>("employeeService")) { IEmployees proxy = channelFactory.CreateChannel(); proxy.Create(new Employee { Id = "003", Name = "王五", Grade = "G9", Department = "行政部" }); } Console.Read(); }
public PageController(IAssetsTypes pIAssetsTypes, IAssetsGroups pIAssetsGroups, IAssetsItems pIAssetsItems, IBusinessUnits pIBusinessUnits, IDepartments pIDepartments, IEmployees pIEmployees, IPositions pIPositions, IMAssetsItems pIMAssetsItems, IMAuditsTrails pIMAuditsTrails, IMEmployees pIMEmployees, IMMRs pIMMRs) { #region BLO lIAssetsTypes = pIAssetsTypes; lIAssetsGroups = pIAssetsGroups; lIAssetsItems = pIAssetsItems; lIBusinessUnits = pIBusinessUnits; lIDepartments = pIDepartments; lIEmployees = pIEmployees; lIPositions = pIPositions; #endregion #region Models lIMAssetsItems = pIMAssetsItems; lIMAuditsTrails = pIMAuditsTrails; lIMEmployees = pIMEmployees; lIMMRs = pIMMRs; #endregion }
/// <summary> /// Конструктор /// </summary> public ReportForm(IReport report, IClients clients, IEmployees employees, IApartments apartments, IObjects objects, IHomes homes, IMans man, IDocuments document) { InitializeComponent(); // Инициализировать компоненты формы _report = report; // Сохранить отчет в поле _clients = clients; // Сохранить список клиентов в поле _employees = employees; // Сохранить список сотрудников в поле _apartments = apartments; // Сохранить список квартир в поле _objects = objects; _homes = homes; // Сохранить список домов с поле _man = man; // Сохранить чловека _document = document; // Сохранить документ _clientAfterRelinking = report.Client; // Сохранить клиента связанного с отчетов _employeeAfterRelinking = report.Employee; // Сохранить сотрудника связанного с отчетов _apartmentAfterRelinking = report.Apartment; // Сохранить квартиру связанного с отчетов CleanAllData(); // Очистить компоненты всех групп CopyDataFromEntity(); // Скопировать данные человека в компоненты формы }
private void CreateMainWindow(IEmployees employees, Group group) { if (group.Equals(Group.Doctor)) { registration.RegistrationContext(Group.Doctor, new EmployeeDocVM(new DataAccess(ConnectApp), employees), new DoctorUC()); } else if (group.Equals(Group.Registrator)) { registration.RegistrationContext(Group.Registrator, new EmployeeRegVM(new DataAccess(ConnectApp), employees), new RegistratorUC()); } try { registration.SpawnWindow(group); AuthWindow.Close(); } catch (Exception ex) { ErrorMessage(ex.Message, "Assistant"); app.Shutdown(1); } }
/// <summary> /// Конструктор /// </summary> public ReportsForm(IReports reports, IClients clients, IEmployees employees, IApartments apartments, IObjects objects, IHomes homes, IMans man, IDocuments document, string reportTemplatesFolderPath, string reportsFolderPath, CreateReportDocument createReportDocumentFunction) : base() { InitializeComponent(); // Инициализировать компоненты формы _reports = reports; // Сохранить список отчетов в поле _clients = clients; // Сохранить список клиентов в поле _employees = employees; // Сохранить список сотрудников в поле _apartments = apartments; // Сохранить список квартир в поле _objects = objects; _homes = homes; // Сохранить список домов с поле _man = man; // Сохранить человека _document = document; // Сохранить документ _reportTemplatesFolderPath = reportTemplatesFolderPath; // Сохранить путь к папке с шаблонами отчетов _reportsFolderPath = reportsFolderPath; // Сохранить путь к папке с отчетами _createReportDocument = createReportDocumentFunction; // Сохранить делегат метода создания отчета ConfigureEntitiesDataGridView(); // Настроить визуальное представление элемента отображения списка сущностей FillEntitiesDataGridView(); // Заполнить элемент отображения списка сущностей SetButtonActivity(); // Задать активность элементов управления }
public EmployeesController(IEmployee employee, IEmployees employees) { _employee = employee; _employees = employees; }
public EmployeeController(IEmployees _employees) { _employeesI = _employees; }
/// <param name='operations'> /// Reference to the Forms.Http.IEmployees. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <IList <Employee> > GetEmployeesAsync(this IEmployees operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <Forms.Http.Models.Employee> > result = await operations.GetEmployeesWithOperationResponseAsync(cancellationToken).ConfigureAwait(false); return(result.Body); }
public EmployeesControllerTest() { employees = new EmployeesMock(); controller = new EmployeeController(employees, null); }
/// <param name='operations'> /// Reference to the Forms.Http.IEmployees. /// </param> /// <param name='id'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <Employee> GetEmployeeAsync(this IEmployees operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <Forms.Http.Models.Employee> result = await operations.GetEmployeeWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false); return(result.Body); }
public AccountController(IEmployees pIEmployees) { lIEmployees = pIEmployees; lIAuthenticate = new Authenticate(); }
/// <param name='operations'> /// Reference to the Forms.Http.IEmployees. /// </param> /// <param name='id'> /// Required. /// </param> /// <param name='employee'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <object> PutEmployeeAsync(this IEmployees operations, int id, Employee employee, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutEmployeeWithOperationResponseAsync(id, employee, cancellationToken).ConfigureAwait(false); return(result.Body); }