예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="EmployeeRoleType"></param>
        /// <returns></returns>
        public EmployeeRoleType CreateEmployeeRoleType(string EmployeeRoleType)
        {
            EmployeeRoleType newEmployeeRoleType = new EmployeeRoleType();

            newEmployeeRoleType.Name = EmployeeRoleType;
            return(CreateEmployeeRoleType(newEmployeeRoleType));
        }
예제 #2
0
        public EmployeeRoleType UpdateEmployeeRoleType(EmployeeRoleType EmployeeRoleType)
        {
            var c = ctx.EmployeeRoleType.Where(x => x.ID == EmployeeRoleType.ID).First();

            if (c != null)
            {
                c.Name = EmployeeRoleType.Name;
                ctx.SaveChanges();
            }
            return(c);
        }
예제 #3
0
 /// <summary>
 /// Create EmployeeRoleType and at least one EmployeeRoleType sign in.
 /// </summary>
 /// <param name="EmployeeRoleType"></param>
 /// <returns></returns>
 public EmployeeRoleType CreateEmployeeRoleType(EmployeeRoleType EmployeeRoleType)
 {
     ctx.EmployeeRoleType.Add(EmployeeRoleType);
     ctx.SaveChanges();
     return(EmployeeRoleType);
 }