示例#1
0
        public major_changeModel SelById(int id)
        {
            major_change      m  = hr.Set <major_change>().AsNoTracking().Where(e => e.mch_id == id).FirstOrDefault();
            major_changeModel mm = new major_changeModel()
            {
                mch_id                   = m.mch_id,
                first_kind_id            = m.first_kind_id,
                first_kind_name          = m.first_kind_name,
                second_kind_id           = m.second_kind_id,
                second_kind_name         = m.second_kind_name,
                third_kind_id            = m.third_kind_id,
                third_kind_name          = m.third_kind_name,
                major_id                 = m.major_id,
                major_name               = m.major_name,
                major_kind_id            = m.major_kind_id,
                major_kind_name          = m.major_kind_name,
                new_first_kind_id        = m.new_first_kind_id,
                new_first_kind_name      = m.new_first_kind_name,
                new_second_kind_id       = m.new_second_kind_id,
                new_second_kind_name     = m.new_second_kind_name,
                new_third_kind_id        = m.new_third_kind_id,
                new_third_kind_name      = m.new_third_kind_name,
                new_major_id             = m.new_major_id,
                new_major_name           = m.new_major_name,
                new_major_kind_id        = m.new_major_kind_id,
                new_major_kind_name      = m.new_major_kind_name,
                human_id                 = m.human_id,
                human_name               = m.human_name,
                salary_standard_id       = m.salary_standard_id,
                salary_standard_name     = m.salary_standard_name,
                salary_sum               = m.salary_sum,
                new_salary_standard_id   = m.new_salary_standard_id,
                new_salary_standard_name = m.new_salary_standard_name,
                new_salary_sum           = m.new_salary_sum,
                change_reason            = m.change_reason,
                check_reason             = m.check_reason,
                check_status             = m.check_status,
                register                 = m.register,
                checker                  = m.checker,
                regist_time              = m.regist_time,
                check_time               = m.regist_time
            };

            return(mm);
        }
示例#2
0
 public async Task <int> Add(users t)
 {
     tesc.Set <users>().Add(t);
     return(tesc.SaveChanges());
 }