예제 #1
0
            public static Employee[] Get(string login)
            {
                var q = new Entities.Employee();

                var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from 
ACL_USER u, HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s
where u.ACLU_LOGIN = @0 and e.ACL_USER_ID = u.ACL_USER_ID and p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID 
", args: login);

                return((from d in u select(Employee) FromEntity(d)).ToArray());
            }
예제 #2
0
            public static IEnumerable <Employee> All()
            {
                var q = new Entities.Employee();

                var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from 
HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s, ACL_USER u
where p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID and u.ACL_USER_ID = e.ACL_USER_ID
");

                return((from d in u select(Employee) FromEntity(d)).AsEnumerable <Employee>());
            }
예제 #3
0
            public static Employee Get(int id)
            {
                var q = new Entities.Employee();

                var u = q.Query(@"select e.HRE_FIRST_NAME, e.HRE_FAMILY_NAME, e.HRE_LAST_NAME, d.HRD_NAME, p.HRP_NAME, s.HRS_SUM, e.HRE_ID, e.ACL_USER_ID, u.ACLU_EMAIL from 
HR_EMPLOYEE e, HR_POSITION p, HR_DEPARTMENT d, HR_SALARY s, ACL_USER u
where e.HRE_ID = @0 and p.HRP_ID = e.HRP_ID and d.HRD_ID = e.HRD_ID and s.HRD_ID = e.HRD_ID and s.HRP_ID = e.HRP_ID and u.ACL_USER_ID = e.ACL_USER_ID
", args: id).FirstOrDefault();

                return(FromEntity(u));
            }