Пример #1
0
        public ActionResult check_list(int id)
        {
            //(int dqy, string tablename, string where, string keyname, int pagesize)
            DBFenYe <salary_standardModel1> li = issb.Fenye(id, "salary_standard", "check_status=0", "ssd_id", 3);

            return(Content(JsonConvert.SerializeObject(li)));
        }
Пример #2
0
        //分页查询
        public DBFenYe <salary_standardModel1> Fenye(int dqy, string tablename, string where, string keyname, int pagesize)
        {
            SqlParameter[] pt =
            {
                new SqlParameter()
                {
                    ParameterName = "@pageSize", Value = pagesize
                },
                new SqlParameter()
                {
                    ParameterName = "@keyName", Value = keyname
                },
                new SqlParameter()
                {
                    ParameterName = "@tabelName", Value = tablename
                },
                new SqlParameter()
                {
                    ParameterName = "@where", Value = where
                },
                new SqlParameter()
                {
                    ParameterName = "@currentPage", Value = dqy
                },
                new SqlParameter()
                {
                    ParameterName = "@rows", Direction = ParameterDirection.Output, SqlDbType = SqlDbType.Int
                },
                new SqlParameter()
                {
                    ParameterName = "@pages", Direction = ParameterDirection.Output, SqlDbType = SqlDbType.Int
                }
            };
            var list = tescDbContext.ss.FromSqlRaw($@"exec proc_FenYe @pageSize,@keyName,@tabelName,@where,@currentPage,@rows out,@pages out", pt).ToList();
            DBFenYe <salary_standardModel1> page = new DBFenYe <salary_standardModel1>();

            page.li = new List <salary_standardModel1>();
            foreach (var sr in list)
            {
                salary_standardModel1 ss = new salary_standardModel1()
                {
                    ssd_id        = sr.ssd_id,
                    standard_id   = sr.standard_id,
                    standard_name = sr.standard_name,
                    designer      = sr.designer,
                    regist_time   = sr.regist_time,
                    salary_sum    = sr.salary_sum
                };
                page.li.Add(ss);
            }
            page.Pages = (int)pt[5].Value;
            page.Rows  = (int)pt[6].Value;
            return(page);
        }
Пример #3
0
        public IActionResult XinChou(int currentPage)
        {
            string aa = HttpContext.Session.GetString("rq1");
            string bb = HttpContext.Session.GetString("rq2");

            string sid = HttpContext.Session.GetString("xcdh");
            string gjz = HttpContext.Session.GetString("gjz");

            string where = $@" salary_standard_id = '{sid}' or human_name like '%{gjz}%' and check_time >= '{aa}'and check_time<='{bb}' and check_status=3";
            DBFenYe <human_fileModel1> li = ihfb.Fenye(currentPage, "human_file", where, "huf_id", 3);

            return(Content(JsonConvert.SerializeObject(li)));
        }
Пример #4
0
        public ActionResult change_list(int currenPage)
        {
            string standard_id = HttpContext.Session.GetString("standard_id1");
            string name        = HttpContext.Session.GetString("standard_name1");

            string time1 = HttpContext.Session.GetString("regist_time12");
            string time2 = HttpContext.Session.GetString("regist_time22");



            string where = $@" standard_id='{standard_id}' or standard_name like '%{name}%' or regist_time>='{time1}' and regist_time<='{time2}' and change_status=0";
            DBFenYe <salary_standardModel1> li = issb.Fenye(currenPage, "salary_standard", where, "ssd_id", 3);

            return(Content(JsonConvert.SerializeObject(li)));
        }
Пример #5
0
        public IActionResult load(int id)
        {
            DBFenYe <human_fileModel1> li = ihfb.Fenye(id, "human_file", "check_status=2", "huf_id", 3);

            return(Content(JsonConvert.SerializeObject(li)));
        }
Пример #6
0
        //分页查询
        public DBFenYe <human_fileModel1> Fenye(int dqy, string tablename, string where, string keyname, int pagesize)
        {
            SqlParameter[] pt =
            {
                new SqlParameter()
                {
                    ParameterName = "@pageSize", Value = pagesize
                },
                new SqlParameter()
                {
                    ParameterName = "@keyName", Value = keyname
                },
                new SqlParameter()
                {
                    ParameterName = "@tabelName", Value = tablename
                },
                new SqlParameter()
                {
                    ParameterName = "@where", Value = where
                },
                new SqlParameter()
                {
                    ParameterName = "@currentPage", Value = dqy
                },
                new SqlParameter()
                {
                    ParameterName = "@rows", Direction = ParameterDirection.Output, SqlDbType = SqlDbType.Int
                },
                new SqlParameter()
                {
                    ParameterName = "@pages", Direction = ParameterDirection.Output, SqlDbType = SqlDbType.Int
                }
            };
            var list = tescDbContext.hf.FromSqlRaw($@"exec proc_FenYe @pageSize,@keyName,@tabelName,@where,@currentPage,@rows out,@pages out", pt).ToList();
            DBFenYe <human_fileModel1> page = new DBFenYe <human_fileModel1>();

            page.li = new List <human_fileModel1>();
            foreach (var item in list)
            {
                human_fileModel1 sgm = new human_fileModel1()
                {
                    second_kind_id       = item.second_kind_id,
                    second_kind_name     = item.second_kind_name,
                    checker              = item.checker,
                    check_status         = item.check_status,
                    check_time           = item.check_time,
                    first_kind_id        = item.first_kind_id,
                    first_kind_name      = item.first_kind_name,
                    third_kind_id        = item.third_kind_id,
                    third_kind_name      = item.third_kind_name,
                    register             = item.register,
                    regist_time          = item.regist_time,
                    salary_standard_id   = item.salary_standard_id,
                    salary_standard_name = item.salary_standard_name,
                    salary_sum           = item.salary_sum,
                    delete_time          = item.delete_time,
                    demand_salaray_sum   = item.demand_salaray_sum,
                    changer              = item.changer,
                    change_time          = item.change_time,
                    file_chang_amount    = item.file_chang_amount,
                    attachment_name      = item.attachment_name,
                    bonus_amount         = item.bonus_amount,
                    human_account        = item.human_account,
                    human_address        = item.human_address,
                    major_change_amount  = item.major_change_amount,
                    huf_id                    = item.huf_id,
                    training_amount           = item.training_amount,
                    vhuman_age                = item.vhuman_age,
                    human_bank                = item.human_bank,
                    human_birthday            = item.human_birthday,
                    human_birthplace          = item.human_birthplace,
                    human_educated_degree     = item.human_educated_degree,
                    human_educated_major      = item.human_educated_major,
                    human_educated_years      = item.human_educated_years,
                    human_email               = item.human_email,
                    human_family_membership   = item.human_family_membership,
                    human_file_status         = item.human_file_status,
                    human_histroy_records     = item.human_histroy_records,
                    human_hobby               = item.human_hobby,
                    human_id                  = item.human_id,
                    human_id_card             = item.human_id_card,
                    human_major_id            = item.human_major_id,
                    human_major_kind_id       = item.human_major_kind_id,
                    human_major_kind_name     = item.human_major_kind_name,
                    human_mobilephone         = item.human_mobilephone,
                    human_name                = item.human_name,
                    human_nationality         = item.human_nationality,
                    human_party               = item.human_party,
                    human_picture             = item.human_picture,
                    human_postcode            = item.human_postcode,
                    human_pro_designation     = item.human_pro_designation,
                    human_qq                  = item.human_qq,
                    human_race                = item.human_race,
                    human_religion            = item.human_religion,
                    human_sex                 = item.human_sex,
                    human_society_security_id = item.human_society_security_id,
                    human_speciality          = item.human_speciality,
                    human_telephone           = item.human_telephone,
                    hunma_major_name          = item.hunma_major_name,
                    lastly_change_time        = item.lastly_change_time,
                    paid_salary_sum           = item.paid_salary_sum,
                    recovery_time             = item.recovery_time,
                    remark                    = item.remark
                };
                page.li.Add(sgm);
            }
            page.Pages = (int)pt[5].Value;
            page.Rows  = (int)pt[6].Value;
            return(page);
        }