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


C# TimeTrackerEntities.Dispose方法代码示例

本文整理汇总了C#中TimeTrackerEntities.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# TimeTrackerEntities.Dispose方法的具体用法?C# TimeTrackerEntities.Dispose怎么用?C# TimeTrackerEntities.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TimeTrackerEntities的用法示例。


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

示例1: GetAvailableJobTypeForJobFlow

        public List<JobType> GetAvailableJobTypeForJobFlow()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();
            Department dept = new Department();
            var deptlist = dept.GetDepartmentList();
            int deptCount = deptlist.Count;
            var data = (from j in db.T_JobType
                        where j.M_JobTypeFlows.Count < deptCount
                        orderby j.Position
                        select new JobType()
                        {
                            Id = j.Id,
                            Description = j.Description,
                            CreatedBy = j.CreatedBy,
                            LastUpdatedBy = j.LastUpdatedBy,
                            CreateDate = j.CreateDate,
                            LastUpdateDate = j.LastUpdateDate,
                            RequiredJobId = j.RequiredJobId,
                            ComputeTime = j.ComputeTime,
                            Position = j.Position,
                            ShowInJobOverview = j.ShowInJobOverview,
                            Acronym = j.Acronym,
                            IsDefaultBreak = j.IsDefaultBreak
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:29,代码来源:JobType.cs

示例2: GetDefaultBreak

        public JobType GetDefaultBreak()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from j in db.T_JobType
                        where j.IsDefaultBreak == true
                        select new JobType()
                        {
                            Id = j.Id,
                            Description = j.Description,
                            CreatedBy = j.CreatedBy,
                            LastUpdatedBy = j.LastUpdatedBy,
                            CreateDate = j.CreateDate,
                            LastUpdateDate = j.LastUpdateDate,
                            RequiredJobId = j.RequiredJobId,
                            ComputeTime = j.ComputeTime,
                            Position = j.Position,
                            ShowInJobOverview = j.ShowInJobOverview,
                            Acronym = j.Acronym,
                            IsDefaultBreak = j.IsDefaultBreak
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:26,代码来源:JobType.cs

示例3: GetRoleDepartmentList

        public List<RoleDepartmentAccess> GetRoleDepartmentList()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from p in db.T_RoleDepartmentAccess
                        select new RoleDepartmentAccess()
                        {
                            Id = p.Id,
                            RoleId = p.RoleId,
                            DepartmentId = p.DepartmentId
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:16,代码来源:RoleDepartmentAccess.cs

示例4: GetTimeSettingList

        public List<TimeSetting> GetTimeSettingList()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from t in db.T_TimeSetting
                        select new TimeSetting()
                        {
                            Id = t.Id,
                            Interval = t.Interval,
                            LastUpdateDate = t.LastUpdateDate,
                            LastUpdatedBy = t.LastUpdatedBy
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:17,代码来源:TimeSetting.cs

示例5: GetHolidays

        public List<Holiday> GetHolidays(int year)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from d in db.T_Holiday
                        where d.HolidayYear == year
                        select new Holiday()
                        {
                            Id = d.Id,
                            HolidayYear = d.HolidayYear,
                            HolidayDate = d.HolidayDate,
                            Description = d.Description,
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:18,代码来源:Holiday.cs

示例6: GetHoliday

        public Holiday GetHoliday(DateTime date)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from d in db.T_Holiday
                        where d.HolidayDate == date
                        select new Holiday()
                        {
                            Id = d.Id,
                            HolidayYear = d.HolidayYear,
                            HolidayDate = d.HolidayDate,
                            Description = d.Description,
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:18,代码来源:Holiday.cs

示例7: GetTimeSetting

        public TimeSetting GetTimeSetting(int id)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from t in db.T_TimeSetting
                        where t.Id == id
                        select new TimeSetting()
                        {
                            Id = t.Id,
                            Interval = t.Interval,
                            LastUpdateDate = t.LastUpdateDate,
                            LastUpdatedBy = t.LastUpdatedBy
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:18,代码来源:TimeSetting.cs

示例8: GetJobFlowByDescription

        //Get JobFlow By JobFlow Description
        public JobFlow GetJobFlowByDescription(string description)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from f in db.T_JobFlow
                        where f.Description == description
                        select new JobFlow()
                        {
                            Id = f.Id,
                            Description = f.Description,
                            Position = f.Position,
                            Acronym = f.Acronym
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:19,代码来源:JobFlow.cs

示例9: GetModule

        public Module GetModule(string filename)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from m in db.T_Modules
                        where m.Filename == filename
                        select new Module()
                        {
                            Id = m.Id,
                            Filename = m.Filename,
                            Description = m.Description,
                            ModuleType = m.ModuleType,
                            ArrangementOrder = m.ArrangementOrder
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:19,代码来源:Module.cs

示例10: GetRoleModuleList

        public List<RolesModuleAccess> GetRoleModuleList()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from p in db.T_RolesModuleAccess
                        select new RolesModuleAccess()
                        {
                            Id = p.Id,
                            RoleId = p.RoleId,
                            ModuleId = p.ModuleId,
                            CanView = p.CanView,
                            CanAdd = p.CanAdd,
                            CanUpdate = p.CanUpdate,
                            CanDelete = p.CanDelete
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:20,代码来源:RolesModuleAccess.cs

示例11: GetModuleList

        public List<Module> GetModuleList(string moduletype)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from m in db.T_Modules
                        where m.ModuleType == moduletype
                        orderby m.ArrangementOrder
                        select new Module()
                        {
                            Id = m.Id,
                            Filename = m.Filename,
                            Description = m.Description,
                            ModuleType = m.ModuleType,
                            ArrangementOrder = m.ArrangementOrder
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:20,代码来源:Module.cs

示例12: GetActiveSubordinates

        public List<SupervisorMapping> GetActiveSubordinates(int supervisorid)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from s in db.T_SupervisorMapping
                        where s.SupervisorId == supervisorid
                        select new SupervisorMapping()
                        {
                            Id = s.Id,
                            UserId = s.UserId,
                            SupervisorId = s.SupervisorId,
                            userfullname = s.M_User.Firstname + " " + s.M_User.Lastname,
                            supervisorname = s.M_Supervisor.Firstname + " " + s.M_Supervisor.Lastname,
                            subdepartment = s.M_User.M_Department.Description,
                            supdepartment = s.M_Supervisor.M_Department.Description
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:21,代码来源:SupervisorMapping.cs

示例13: GetDepartmentList

        //Get all departments
        public List<Department> GetDepartmentList()
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from d in db.T_Department
                        orderby d.Position ascending
                        select new Department()
                        {
                            Id = d.Id,
                            Description = d.Description,
                            CreateDate = d.CreateDate,
                            LastUpdateDate = d.LastUpdateDate,
                            CreatedBy = d.CreatedBy,
                            LastUpdatedBy = d.LastUpdatedBy,
                            Position = d.Position,
                            Acronym = d.Acronym
                        }).ToList();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:23,代码来源:Department.cs

示例14: GetDepartment

        //Get Department by Department Id
        public Department GetDepartment(int departmentid)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from d in db.T_Department
                        where d.Id == departmentid
                        select new Department()
                        {
                            Id = d.Id,
                            Description = d.Description,
                            CreateDate = d.CreateDate,
                            LastUpdateDate = d.LastUpdateDate,
                            CreatedBy = d.CreatedBy,
                            LastUpdatedBy = d.LastUpdatedBy,
                            Position = d.Position,
                            Acronym = d.Acronym
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:23,代码来源:Department.cs

示例15: GetRole

        public Roles GetRole(int rolesid)
        {
            TimeTrackerEntities db = new TimeTrackerEntities();

            var data = (from d in db.T_Roles
                        where d.Id == rolesid
                        select new Roles()
                        {
                            Id = d.Id,
                            Description = d.Description,
                            Rank = d.Rank,
                            CreateDate = d.CreateDate,
                            LastUpdateDate = d.LastUpdateDate,
                            CreatedBy = d.CreatedBy,
                            LastUpdatedBy = d.LastUpdatedBy,
                            IsSupervisor = d.IsSupervisor
                        }).FirstOrDefault();

            db.Dispose();

            return data;
        }
开发者ID:ECTProgrammer,项目名称:ECTSampleRepository,代码行数:22,代码来源:Roles.cs


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