Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="EmployeeRoleByType"></param>
        /// <returns></returns>
        public EmployeeRoleByType CreateEmployeeRoleByType(int employeeRoleTypeID, int employeeRoleID)
        {
            EmployeeRoleByType newEmployeeRoleByType = new EmployeeRoleByType();

            newEmployeeRoleByType.EmployeeRoleTypeID = employeeRoleTypeID;
            newEmployeeRoleByType.EmployeeRoleID     = employeeRoleID;
            return(CreateEmployeeRoleByType(newEmployeeRoleByType));
        }
Example #2
0
        public EmployeeRoleByType UpdateEmployeeRoleByType(EmployeeRoleByType EmployeeRoleByType)
        {
            var c = ctx.EmployeeRoleByType.Where(x => x.ID == EmployeeRoleByType.ID).First();

            if (c != null)
            {
                c.EmployeeRoleTypeID = EmployeeRoleByType.EmployeeRoleTypeID;
                c.EmployeeRoleID     = EmployeeRoleByType.EmployeeRoleID;
                ctx.SaveChanges();
            }
            return(c);
        }
Example #3
0
 /// <summary>
 /// Create EmployeeRoleByType and at least one EmployeeRoleByType sign in.
 /// </summary>
 /// <param name="EmployeeRoleByType"></param>
 /// <returns></returns>
 public EmployeeRoleByType CreateEmployeeRoleByType(EmployeeRoleByType EmployeeRoleByType)
 {
     ctx.EmployeeRoleByType.Add(EmployeeRoleByType);
     ctx.SaveChanges();
     return(EmployeeRoleByType);
 }