当前位置: 首页>>代码示例>>C#>>正文


C# IEmployee类代码示例

本文整理汇总了C#中IEmployee的典型用法代码示例。如果您正苦于以下问题:C# IEmployee类的具体用法?C# IEmployee怎么用?C# IEmployee使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IEmployee类属于命名空间,在下文中一共展示了IEmployee类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddEmployee

 public void AddEmployee(IEmployee employee)
 {
     if (employee == null)
         throw new ArgumentNullException(nameof(employee));
     database.StaffRepository.Create(new Employee(employee));
     database.Save();
 }
开发者ID:MisterHoker,项目名称:ASP.NET_TestTask,代码行数:7,代码来源:StaffService.cs

示例2: TeacherViewModel

 public TeacherViewModel (IEmployee model, IEduProgramProfile eduProgramProfile, EmployeeDirectoryTeachersViewModel rootViewModel, ViewModelIndexer indexer)
     : base (model)
 {
     RootViewModel = rootViewModel;
     EduProgramProfile = eduProgramProfile;
     Indexer = indexer;
 }
开发者ID:roman-yagodin,项目名称:R7.University,代码行数:7,代码来源:TeacherViewModel.cs

示例3: PhoneWrapItem

 public PhoneWrapItem(IPhone phone, IEmployee employee = null)
 {
     if (phone == null)
         throw new ArgumentException("Phone is null!");
     this.PhoneItem = phone;
     this.EmployeeItem = employee;
 }
开发者ID:AliaksandrNovik,项目名称:PhoneBook,代码行数:7,代码来源:PhoneWrapItem.cs

示例4: GetPackageCost

 public IBenefitsPackage GetPackageCost(IEmployee employee)
 {
     return new BenefitsPackage()
     {
         EmployeeCost = _configuration.AnnualEmployeeBenefitsCost
     };
 }
开发者ID:barbosatek,项目名称:Paylocity,代码行数:7,代码来源:SingleEmployeeStrategy.cs

示例5: UsersDetails

 public UsersDetails(IEmployee employee, ILoadDataSender lastScreen) : this(employee as IUser, lastScreen)
 {
     InitializeComponent();
     Title.Text = "Employee properties";
     _employeeDetailsVM = new EmployeeDetailsUserControlVM(employee, lastScreen);
     _employeeDetailsUserControl = new EmployeeDetailsUserControl(employee, lastScreen, _userDetailsVM);
     EmployeesGrid.Children.Add(_employeeDetailsUserControl);
 }
开发者ID:Vsailor,项目名称:ProjectManager,代码行数:8,代码来源:UsersDetails.xaml.cs

示例6: Employee

 public Employee(IEmployee employee)
 {
     Id = employee.Id;
     Name = employee.Name;
     Position = employee.Position;
     Status = employee.Status;
     Salary = employee.Salary;
 }
开发者ID:MisterHoker,项目名称:ASP.NET_TestTask,代码行数:8,代码来源:Employee.cs

示例7: GetPackageCost

 public IBenefitsPackage GetPackageCost(IEmployee employee)
 {
     return new BenefitsPackage()
     {
         EmployeeCost = _configuration.AnnualEmployeeBenefitsCost,
         DependentCost = GetEmployeeDependentBenefitsCost(employee)
     };
 }
开发者ID:barbosatek,项目名称:Paylocity,代码行数:8,代码来源:EmployeeWithDependentsStrategy.cs

示例8: GenerateReport

        public static void GenerateReport(IEmployee employee)
        {
            string reportType = employee is IDeveloper ? "Project" : "Sales";
            string fileName = String.Format("{0}-{1}-{2}-Report.docx",
                employee.FirstName, employee.LastName, employee.ID);
            var document = DocX.Create(fileName);

            // Heading
            var heading = document.InsertParagraph(
                String.Format("{0} {1} : {2} Report",
                employee.FirstName, employee.LastName, reportType));
            heading.Alignment = Alignment.left;
            heading.FontSize(20d).Bold();
            document.InsertParagraph();

            // Personal Info
            Dictionary<string, object> dict = new Dictionary<string, object>()
            {
                {"Name: ", employee.FirstName + " " + employee.LastName},
                {"Id: ", employee.ID},
                {"Department: ", employee.Department},
                {"Salary: ", employee.Salary}
            };
            foreach (var prop in dict)
            {
                var text = document.InsertParagraph(prop.Key).Bold();
                text.InsertText(" " + prop.Value, true);
                text.FontSize(12);
                text.Alignment = Alignment.right;
            }
            document.InsertParagraph();

            // Project / Sales Report Details
            var detailsList = document.AddList(null, 0, ListItemType.Bulleted);
            if (employee is IDeveloper)
            {
                var projectsHeading = document.InsertParagraph("Projects:")
                    .UnderlineStyle(UnderlineStyle.singleLine)
                    .FontSize(15);
                foreach (var project in (employee as IDeveloper).Projects)
                {
                    document.AddListItem(detailsList, project.ToString());
                }
            }
            else if (employee is ISalesEmployee)
            {
                var salesHeading = document.InsertParagraph("Sales:");
                foreach (var sale in (employee as ISalesEmployee).Sales)
                {
                    document.AddListItem(detailsList, sale.ToString());
                    var innerList = document.AddList(null, 2, ListItemType.Numbered);
                }
            }
            document.InsertList(detailsList);

            // Save changes to file
            document.Save();
        }
开发者ID:EBojilova,项目名称:SoftUni-3,代码行数:58,代码来源:WordReportGenerator.cs

示例9: EmployeeWrapperItem

 public EmployeeWrapperItem(IEmployee item, IUserInfo userInfo = null)
 {
     if (item == null)
     {
         throw new ArgumentException("Item is null");
     }
     this.Item = item;
     this.UserInfo = userInfo;
 }
开发者ID:AliaksandrNovik,项目名称:PhoneBook,代码行数:9,代码来源:EmployeeWrapperItem.cs

示例10: DeleteEmployee

        /// <summary>
        /// Deletes the employee.
        /// </summary>
        /// <param name="employee">The employee.</param>
        public void DeleteEmployee(IEmployee employee)
        {
            Argument.IsNotNull("employee", employee);

            lock (_employees)
            {
                _employees.Remove(employee);
            }
        }
开发者ID:ruisebastiao,项目名称:Catel.Examples,代码行数:13,代码来源:EmployeeRepository.cs

示例11: AddEmployee

        /// <summary>
        /// Adds the employee.
        /// </summary>
        /// <param name="employee">The employee.</param>
        public void AddEmployee(IEmployee employee)
        {
            Argument.IsNotNull("employee", employee);

            lock (_employees)
            {
                _employees.Add(employee);
            }
        }
开发者ID:ruisebastiao,项目名称:Catel.Examples,代码行数:13,代码来源:EmployeeRepository.cs

示例12: AddEmployee

        public void AddEmployee(IEmployee employee)
        {
            if (employee.Department != this.Department)
            {
                throw new InvalidOperationException("Wrong employee");
            }

            this.employees.Add(employee);
        }
开发者ID:rextor92,项目名称:OOP-November2015,代码行数:9,代码来源:Manager.cs

示例13: AddEmployee

        public void AddEmployee(IEmployee employee)
        {
            if (employee.Depratment != this.Depratment)
            {
                throw new InvalidOperationException(CompanyConstants.WrongEmployee);
            }

            this.employees.Add(employee);
        }
开发者ID:vdonchev,项目名称:InheritanceAndAbstraction-Homework,代码行数:9,代码来源:Manager.cs

示例14: getEmployee

        /// <summary>
        /// Checks the type of employee to get information on and queries from specific table.
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        public IEmployee getEmployee(IEmployee employee)
        {
            if (employee.GetType() == typeof(Director))
                return getDirector(employee);
            if (employee.GetType() == typeof(GroupManager))
                return getManager(employee);

            return getUser(employee);
        }
开发者ID:tah182,项目名称:Comet,代码行数:14,代码来源:EmployeeSvcImplDB.cs

示例15: AddEmployee

        public void AddEmployee(IEmployee employee)
        {
            if (employee.DepartmentName != this.DepartmentName)
            {
                throw new InvalidOperationException(EmployeeError);
            }

            this.employees.Add(employee);
        }
开发者ID:naskoni,项目名称:SoftUni-OOP-November-2015,代码行数:9,代码来源:Manager.cs


注:本文中的IEmployee类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。