Exemplo n.º 1
0
        public ActionResult index(human_file hf)
        {
            config_file_first_kind  s   = ifkb.selectWhere(e => e.first_kind_id == hf.first_kind_id).FirstOrDefault();
            config_file_second_kind s1  = iskb.SelectWhere(e => e.second_kind_id == hf.second_kind_id).FirstOrDefault();
            config_file_third_kind  s2  = itkb.SelectWhere(e => e.third_kind_id == hf.third_kind_id).FirstOrDefault();
            config_major            s3  = imb.SelectWhere(e => e.major_id == hf.human_major_id).FirstOrDefault();
            config_major_kind       s4  = imkb.SelectWhere(e => e.major_kind_id == hf.human_major_kind_id).FirstOrDefault();
            salary_standard         ssd = issdb.SelectWhere(e => e.standard_id == hf.salary_standard_id).FirstOrDefault();

            hf.salary_standard_name  = ssd.standard_name;
            hf.first_kind_name       = s.first_kind_name;
            hf.second_kind_name      = s1.second_kind_name;
            hf.third_kind_name       = s2.third_kind_name;
            hf.hunma_major_name      = s3.major_name;
            hf.human_major_kind_name = s4.major_kind_name;
            hf.check_status          = 0;
            hf.salary_sum            = ssd.salary_sum;
            hf.demand_salaray_sum    = ssd.salary_sum;
            hf.paid_salary_sum       = ssd.salary_sum;
            hf.file_chang_amount     = 0;
            hf.lastly_change_time    = DateTime.Now;
            if (ihdb.Update(hf) > 0)
            {
                return(Content("<script>location.href='/Human_file/Top_file/" + hf.huf_id + "'</script>"));
            }
            else
            {
                return(Content("<script>alert('登记失败');location.href='/Human_file/index'</script>"));
            }
        }
Exemplo n.º 2
0
        public ActionResult first_kind_change(short id)
        {
            config_file_first_kind cffk = new config_file_first_kind()
            {
                ffk_id = id
            };
            config_file_first_kind cff = cffks.SelectOne(cffk);

            ViewData.Model = cff;
            return(View());
        }
Exemplo n.º 3
0
 public ActionResult first_kind_register(config_file_first_kind t)//I级机构设置添加
 {
     if (Cb.Add(t) > 0)
     {
         return(Content("<script>window.location.href='/client/first_kind_register_success'</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');window.location.href='/client/first_kind_register'</script>"));
     }
 }
Exemplo n.º 4
0
        //删除
        public Task <int> Delete(int id)
        {
            config_file_first_kind cffk = new config_file_first_kind()
            {
                ffk_id = id
            };

            tescDbContext.configs.Attach(cffk);
            tescDbContext.configs.Remove(cffk);
            return(tescDbContext.SaveChangesAsync());
        }
Exemplo n.º 5
0
        public ActionResult first_kind_changeUpdate(config_file_first_kind first)
        {
            int num = firstbll.config_file_first_kindUpdate(first, first.ffk_id);

            if (num > 0)
            {
                return(RedirectToAction("first_kind_change_success"));
            }
            else
            {
                return(View(num));
            }
        }
Exemplo n.º 6
0
        public ActionResult first_kind_register(config_file_first_kind first)
        {
            int num = firstbll.config_file_first_kindInsert(first);

            if (num > 0)
            {
                return(RedirectToAction("first_kind_register_success"));
            }
            else
            {
                return(View("first_kind_register", num));
            }
        }
Exemplo n.º 7
0
        //添加
        public Task <int> Add(config_file_first_kindModel1 cffk)
        {
            config_file_first_kind ffk = new config_file_first_kind()
            {
                first_kind_id        = cffk.first_kind_id,
                first_kind_name      = cffk.first_kind_name,
                first_kind_salary_id = cffk.first_kind_salary_id,
                first_kind_sale_id   = cffk.first_kind_sale_id
            };

            tescDbContext.configs.Add(ffk);
            return(tescDbContext.SaveChangesAsync());
        }
Exemplo n.º 8
0
        public ActionResult first_kind_register_success(config_file_first_kind cffk)
        {
            bool pd = cffks.Add(cffk);

            if (pd)
            {
                return(View());
            }
            else
            {
                return(RedirectToAction("first_kind"));
            }
        }
Exemplo n.º 9
0
        //修改
        public ActionResult Edit(int id)
        {
            Econfig_file_first_kind st  = hr.Econfig_file_first_kind.AsNoTracking().Where(e => e.ffk_id.Equals(id)).FirstOrDefault();
            config_file_first_kind  st2 = new config_file_first_kind()
            {
                ffk_id               = st.ffk_id,
                first_kind_id        = st.first_kind_id,
                first_kind_name      = st.first_kind_name,
                first_kind_salary_id = st.first_kind_salary_id,
                first_kind_sale_id   = st.first_kind_sale_id
            };

            return(View(st2));
        }
Exemplo n.º 10
0
        //修改查询
        public async Task <config_file_first_kindModel1> UpSelect(int id)
        {
            config_file_first_kind cffk = await tescDbContext.configs.FindAsync(id);

            config_file_first_kindModel1 cffkm = new config_file_first_kindModel1()
            {
                ffk_id               = cffk.ffk_id,
                first_kind_id        = cffk.first_kind_id,
                first_kind_name      = cffk.first_kind_name,
                first_kind_salary_id = cffk.first_kind_salary_id,
                first_kind_sale_id   = cffk.first_kind_sale_id
            };

            return(cffkm);
        }
Exemplo n.º 11
0
        public ActionResult first_delete_success(int id)
        {
            config_file_first_kind cffk = new config_file_first_kind()
            {
                ffk_id = id
            };

            if (cffks.Del(cffk))
            {
                return(View());
            }
            else
            {
                return(RedirectToAction("first_kind"));
            }
        }
Exemplo n.º 12
0
        public ActionResult first_kind_change(config_file_first_kind t)
        {
            config_file_first_kind list = Cb.SelectWhere(t.ffk_id).FirstOrDefault();

            list.first_kind_id        = t.first_kind_id;
            list.first_kind_name      = t.first_kind_name;
            list.first_kind_salary_id = t.first_kind_salary_id;
            list.first_kind_sale_id   = t.first_kind_sale_id;
            if (Cb.Change(list) > 0)
            {
                return(Content("<script>window.location.href='/client/first_kind_change_success'</script>"));
            }
            else
            {
                return(Content("<script>alert('修改失败');window.location.href='/client/first_kind_change'</script>"));
            }
        }
Exemplo n.º 13
0
        //删除
        public async Task <ActionResult> Delete(int id)
        {
            config_file_first_kind cc = new config_file_first_kind()
            {
                ffk_id = id
            };
            int result = await Iconfig_file_first_kindBLL.CFKDel(cc);

            if (result > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/First_Kind/Index'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/First_Kind/Index'</script>"));
            }
        }
Exemplo n.º 14
0
        //修改
        public async Task <int> Update(config_file_first_kindModel1 cffkm)
        {
            config_file_first_kind cffk = new config_file_first_kind()
            {
                ffk_id               = cffkm.ffk_id,
                first_kind_id        = cffkm.first_kind_id,
                first_kind_name      = cffkm.first_kind_name,
                first_kind_salary_id = cffkm.first_kind_salary_id,
                first_kind_sale_id   = cffkm.first_kind_sale_id
            };

            //tescDbContext.Attach(cffk);
            //tescDbContext.Entry(cffk).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            //return await tescDbContext.SaveChangesAsync();

            tescDbContext.Attach(cffk);
            tescDbContext.Entry(cffk).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            return(await tescDbContext.SaveChangesAsync());
        }
Exemplo n.º 15
0
        public async Task <ActionResult> Create(config_file_first_kind ck)
        {
            try
            {
                int result = await Iconfig_file_first_kindBLL.CFKAdd(ck);

                if (result > 0)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View(ck));
                }
            }
            catch (Exception)
            {
                return(View(ck));
            }
        }
Exemplo n.º 16
0
        public ActionResult first_kind_change_success(FormCollection frm)
        {
            config_file_first_kind cffk = new config_file_first_kind()
            {
                ffk_id               = int.Parse(frm["ffk_id"]),
                first_kind_id        = frm["first_kind_id"],
                first_kind_name      = frm["first_kind_name"],
                first_kind_salary_id = frm["first_kind_salary_id"],
                first_kind_sale_id   = frm["first_kind_sale_id"],
            };
            bool pd = cffks.Upd(cffk);

            if (pd)
            {
                return(View());
            }
            else
            {
                return(RedirectToAction("first_kind"));
            }
        }
Exemplo n.º 17
0
        public async Task <ActionResult> Edit(int id, config_file_first_kind st)
        {
            try
            {
                string[] ps     = new string[] { "ffk_id", "first_kind_id", "first_kind_name", "first_kind_salary_id", "first_kind_sale_id" };
                int      result = await Iconfig_file_first_kindBLL.CFKUpdate(st, ps);

                if (result > 0)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View(st));
                }
            }
            catch (Exception ex)
            {
                return(View(st));
            }
        }
Exemplo n.º 18
0
        public ActionResult Carate(engage_major_release en)
        {
            config_file_first_kind  s  = ifkb.selectWhere(e => e.first_kind_id == en.first_kind_id).FirstOrDefault();
            config_file_second_kind s1 = iskb.SelectWhere(e => e.second_kind_id == en.second_kind_id).FirstOrDefault();
            config_file_third_kind  s2 = itkb.SelectWhere(e => e.third_kind_id == en.third_kind_id).FirstOrDefault();
            config_major            s3 = imb.SelectWhere(e => e.major_id == en.major_id).FirstOrDefault();
            config_major_kind       s4 = imkb.SelectWhere(e => e.major_kind_id == en.major_kind_id).FirstOrDefault();

            //string sa= ;
            en.first_kind_name  = s.first_kind_name;
            en.second_kind_name = s1.second_kind_name;
            en.third_kind_name  = s2.third_kind_name;
            en.major_name       = s3.major_name;
            en.major_kind_name  = s4.major_kind_name;

            if (imrb.Add(en) > 0)
            {
                return(Content("<script>alert('发布成功');location.href='/Major_release/Index2'</script>"));
            }
            else
            {
                return(Content("<script>alert('发布失败');location.href='/Major_release/Index'</script>"));
            }
        }
Exemplo n.º 19
0
 public Task <int> CFKUpdate(config_file_first_kind ck, params string[] ps)
 {
     return(Iconfig_file_first_kindDAO.CFKUpdate(ck, ps));
 }
Exemplo n.º 20
0
 public bool Upd(config_file_first_kind us)
 {
     return(ist.Upd(us));
 }
Exemplo n.º 21
0
 public config_file_first_kind SelectOne(config_file_first_kind us)
 {
     return(ist.SelectBy(e => e.ffk_id == us.ffk_id)[0]);
 }
Exemplo n.º 22
0
 //一级机构修改
 public int config_file_first_kindUpdate(config_file_first_kind first, object keyValue)
 {
     return(dao.config_file_first_kindUpdate(first, keyValue));
 }
Exemplo n.º 23
0
 //一级机构新增
 public int config_file_first_kindInsert(config_file_first_kind first)
 {
     return(dao.config_file_first_kindInsert(first));
 }
Exemplo n.º 24
0
 public int Add(config_file_first_kind t)
 {
     return(dao.Add(t));
 }
Exemplo n.º 25
0
 public int Change(config_file_first_kind t)
 {
     return(dao.Change(t));
 }
Exemplo n.º 26
0
 public int Del(config_file_first_kind t)
 {
     return(dao.Del(t));
 }
Exemplo n.º 27
0
 public Task <int> CFKDel(config_file_first_kind ck)
 {
     return(Iconfig_file_first_kindDAO.CFKDel(ck));
 }
Exemplo n.º 28
0
 public bool Del(config_file_first_kind us)
 {
     return(ist.Del(us));
 }