Beispiel #1
0
        public ActionResult register()
        {
            string f = Request["f"];
            string z = Request["z"];
            List <config_major_kind> list = new List <config_major_kind>();

            if (f == null)
            {
                ViewData["zwf"] = cmks.Select();
            }
            else
            {
                config_major_kind cmk = new config_major_kind();
                cmk.major_kind_name = f;
                list.Add(cmk);
                ViewData["zwf"] = list;
            }

            List <config_major> lm = new List <config_major>();

            if (z == null)
            {
                ViewData["zw"] = cms.Select();
            }
            else
            {
                config_major cmk = new config_major();
                cmk.major_name = z;
                lm.Add(cmk);
                ViewData["zw"] = lm;
            }
            ViewData.Model = cpcs.Select();
            return(View());
        }
Beispiel #2
0
        //删除
        public async Task <int> Delete(int id)
        {
            config_major cm = await tescDbContext.cfm.FindAsync(id);

            tescDbContext.cfm.Remove(cm);
            return(await tescDbContext.SaveChangesAsync());
        }
Beispiel #3
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>"));
            }
        }
Beispiel #4
0
        public JsonResult major_delete(short id)
        {
            config_major cm = new config_major()
            {
                mak_id = id
            };

            return(Json(cms.Del(cm)));
        }
Beispiel #5
0
        public Task <int> CMDel(config_major cm)
        {
            Econfig_major fm = new Econfig_major()
            {
                mak_id = cm.mak_id
            };

            return(Del(fm));
        }
Beispiel #6
0
        /// <summary>
        /// 查询职位名称
        /// </summary>
        /// <returns>异步二级机构</returns>
        public ActionResult majorIdVue()
        {
            config_major major = new config_major()
            {
                major_kind_id = Request["fatherId"]
            };
            List <config_major> list = major_bll.GetMajor(major);

            return(Content(JsonConvert.SerializeObject(list)));
        }
Beispiel #7
0
 public ActionResult major_add(config_major t)
 {
     if (Mb.Add(t) > 0)
     {
         return(Content("<script>alert('添加成功');window.location.href='/client/major'</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');window.location.href='/client/major_add'</script>"));
     }
 }
Beispiel #8
0
        public ActionResult major_add(config_major ma)
        {
            int num = mabll.config_majorInsert(ma);

            if (num > 0)
            {
                return(Content("<script>alert('新增成功!!!');location.href='/client/major'</script>"));
            }
            else
            {
                return(View(num));
            }
        }
Beispiel #9
0
        public Task <int> CMAdd(config_major cm)
        {
            Econfig_major fm = new Econfig_major()
            {
                major_id        = cm.major_id,
                major_kind_id   = cm.major_kind_id,
                major_kind_name = cm.major_kind_name,
                major_name      = cm.major_name,
                mak_id          = cm.mak_id,
                test_amount     = cm.test_amount
            };

            return(Add(fm));
        }
Beispiel #10
0
        //添加
        public async Task <int> Add(config_majorModel1 cmm)
        {
            config_major cm = new config_major()
            {
                major_id        = cmm.major_id,
                major_kind_id   = cmm.major_kind_id,
                major_kind_name = cmm.major_kind_name,
                major_name      = cmm.major_name,
                mak_id          = cmm.mak_id,
                test_amount     = cmm.test_amount
            };

            tescDbContext.cfm.Add(cm);
            return(await tescDbContext.SaveChangesAsync());
        }
Beispiel #11
0
        //删除
        public async Task <ActionResult> Delete(int id)
        {
            config_major cc = new config_major()
            {
                mak_id = id
            };
            int result = await ifm.CMDel(cc);

            if (result > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/config_major/Index'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/config_major/Index'</script>"));
            }
        }
Beispiel #12
0
        public async Task <ActionResult> Create(config_major ck)
        {
            try
            {
                int result = await ifm.CMAdd(ck);

                if (result > 0)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View(ck));
                }
            }
            catch (Exception)
            {
                return(View(ck));
            }
        }
Beispiel #13
0
        public async Task <List <config_major> > CMSelect()
        {
            List <Econfig_major> fm = await GetAll();

            List <config_major> fm2 = new List <config_major>();

            foreach (var cm in fm)
            {
                config_major mm = new config_major()
                {
                    major_id        = cm.major_id,
                    major_kind_id   = cm.major_kind_id,
                    major_kind_name = cm.major_kind_name,
                    major_name      = cm.major_name,
                    mak_id          = cm.mak_id,
                    test_amount     = cm.test_amount
                };
                fm2.Add(mm);
            }
            return(fm2);
        }
Beispiel #14
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>"));
            }
        }
Beispiel #15
0
 public int config_majorDel(config_major ma, object keyValue)
 {
     return(dao.config_majorDel(ma, keyValue));
 }
Beispiel #16
0
 public int Add(config_major t)
 {
     return(dao.Add(t));
 }
Beispiel #17
0
 public bool Upd(config_major us)
 {
     return(ist.Upd(us));
 }
Beispiel #18
0
 public bool Del(config_major us)
 {
     return(ist.Del(us));
 }
Beispiel #19
0
 public int config_majorUpdate(config_major ma, object keyValue)
 {
     return(dao.config_majorUpdate(ma, keyValue));
 }
Beispiel #20
0
 public int Del(config_major t)
 {
     return(dao.Del(t));
 }
Beispiel #21
0
 public int Change(config_major t)
 {
     return(dao.Change(t));
 }
Beispiel #22
0
 public int config_majorInsert(config_major ma)
 {
     return(dao.config_majorInsert(ma));
 }
Beispiel #23
0
 /// <summary>
 /// 查询所有职位名称
 /// </summary>
 /// <param name="major"></param>
 /// <returns></returns>
 public List <config_major> GetMajor(config_major major)
 {
     return(dao.GetMajor(major));
 }
Beispiel #24
0
 public bool Add(config_major us)
 {
     return(ist.Add(us));
 }
Beispiel #25
0
 public Task <int> CMDel(config_major cm)
 {
     return(ifm.CMDel(cm));
 }
Beispiel #26
0
 public config_major SelectOne(config_major us)
 {
     return(ist.SelectBy(e => e.major_id == us.major_id)[0]);
 }
Beispiel #27
0
 public ActionResult major(config_major cm)
 {
     cms.Add(cm);
     ViewData.Model = cms.Select();
     return(View());
 }