public ActionResult major_kind_add()
        {
            config_major_kindModel c = new config_major_kindModel();

            ViewData.Model = c;
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult Create(FormCollection collection)
        {
            string name = Request["name"];
            string id   = Request["id"];
            config_major_kindModel c = new config_major_kindModel()
            {
                major_kind_id   = id,
                major_kind_name = name
            };
            int add = bll.Add(c);

            if (add > 0)
            {
                return(JavaScript("alert('新增成功');window.location.href='/config_major_kind/Index'"));
            }
            else
            {
                return(JavaScript("alert('新增失败');window.location.href='/config_major_kind/Index'"));
            }
            try
            {
                // TODO: Add insert logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 3
0
        public ActionResult major_kind_Del(int id, string kind_id)
        {
            int a = imb.Selectmajor_kind_id(Convert.ToInt32(kind_id));

            if (a <= 0)
            {
                config_major_kindModel cmm = new config_major_kindModel()
                {
                    Id = Convert.ToInt16(id)
                };
                int b = isb.config_major_kindDelete(cmm);
                if (b > 0)
                {
                    return(Content("<script language='javascript' type='text/javascript'>alert('删除成功');window.location.href= '/config_major_kind/major_kind'</script>"));
                }
                else
                {
                    return(Content("<script language='javascript' type='text/javascript'>alert('删除失败!');window.location.href= '/config_major_kind/major_kind'</script>"));
                }
            }
            else
            {
                return(Content("<script language='javascript' type='text/javascript'>alert('删除失败! 该职位分类下有子类');window.location.href= '/config_major_kind/major_kind'</script>"));
            }
        }
Ejemplo n.º 4
0
        public int Delete(config_major_kindModel c)
        {
            config_major_kind est = new config_major_kind()
            {
                Id = c.Id
            };

            return(Delete(est));
        }
Ejemplo n.º 5
0
        public int majorkindDel(config_major_kindModel ck)
        {
            //把DTO转为EO
            config_major_kind cmk = new config_major_kind()
            {
                Id = ck.Id
            };

            return(Delete(cmk));
        }
Ejemplo n.º 6
0
        public int Update(config_major_kindModel st)
        {
            config_major_kind est = new config_major_kind()
            {
                Id              = st.Id,
                major_kind_id   = st.major_kind_id,
                major_kind_name = st.major_kind_name
            };

            return(Update(est));
        }
Ejemplo n.º 7
0
        public int majorkindAdd(config_major_kindModel ck)
        {
            config_major_kind est = new config_major_kind()
            {
                Id              = ck.Id,
                major_kind_id   = ck.major_kind_id,
                major_kind_name = ck.major_kind_name
            };

            return(Add(est));
        }
Ejemplo n.º 8
0
        public int config_major_kindUpdate(config_major_kindModel t)
        {
            config_major_kind st = new config_major_kind()
            {
                Id              = t.Id,
                major_kind_id   = t.major_kind_id,
                major_kind_name = t.major_kind_name
            };

            return(Update(st));
        }
Ejemplo n.º 9
0
        public int Add(config_major_kindModel st)
        {
            //把DTO转为EO
            config_major_kind est = new config_major_kind()
            {
                Id              = st.Id,
                major_kind_id   = st.major_kind_id,
                major_kind_name = st.major_kind_name
            };

            return(Add(est));
        }
Ejemplo n.º 10
0
        // GET: config_major_kind/Delete/5
        public ActionResult Delete(int id)
        {
            config_major_kindModel ckm = new config_major_kindModel()
            {
                Id = short.Parse(id.ToString())
            };

            if (ind.Del(ckm) > 0)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
 public ActionResult Create(engage_major_releaseModel em)
 {
     try
     {
         config_file_second_kindModel csm = new config_file_second_kindModel
         {
             second_kind_id = em.second_kind_id
         };
         config_file_first_kindModel cfm = new config_file_first_kindModel
         {
             first_kind_id = em.first_kind_id
         };
         config_file_third_kindModel css = new config_file_third_kindModel
         {
             third_kind_id = em.third_kind_id
         };
         config_major_kindModel cff = new config_major_kindModel
         {
             major_kind_id = em.major_kind_id
         };
         config_majorModel cmm = new config_majorModel
         {
             major_id      = em.major_id,
             major_kind_id = em.major_kind_id
         };
         List <config_file_second_kindModel> lists = sb.SelectByName(csm);
         List <config_file_first_kindModel>  listf = ib.SelectByName(cfm);
         List <config_file_third_kindModel>  lis   = isb.SelectByName(css);
         List <config_major_kindModel>       liss  = ia.SelectByName(cff);
         List <config_majorModel>            litt  = iii.SelectByName(cmm);
         em.second_kind_name = lists[0].second_kind_name;
         em.first_kind_name  = listf[0].first_kind_name;
         em.third_kind_name  = lis[0].third_kind_name;
         em.major_kind_name  = liss[0].major_kind_name;
         em.major_name       = litt[0].major_name;
         em.change_time      = DateTime.Now;
         if (re.Add(em) > 0)
         {
             return(Content("<script>alert('新增成功');window.location='Create'</script>"));
         }
         else
         {
             return(View(em));
         }
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 12
0
        public ActionResult major_kind_add(config_major_kindModel cmm)
        {
            cmm.major_kind_id = isb.idjia1().ToString();
            int a = isb.config_major_kindAdd(cmm);

            if (a > 0)
            {
                return(Content("<script language='javascript' type='text/javascript'>alert('添加成功!');window.location.href= 'major_kind'</script>"));
            }
            else
            {
                return(Content("<script language='javascript' type='text/javascript'>alert('添加成功!');window.location.href= 'major_kind'</script>"));
            }
        }
Ejemplo n.º 13
0
        public List <config_major_kindModel> SelectBy(config_major_kindModel st)
        {
            List <config_major_kind>      list  = SelectBy(e => e.Id.Equals(st.Id));
            List <config_major_kindModel> list2 = new List <config_major_kindModel>();

            foreach (var item in list)
            {
                config_major_kindModel sd = new config_major_kindModel()
                {
                    Id = item.Id
                };
                list2.Add(sd);
            }
            return(list2);
        }
Ejemplo n.º 14
0
        public ActionResult Add(config_major_kindModel c)
        {
            // TODO: Add insert logic here
            if (ind.Add(c) > 0)
            {
                return(Content("<script>alert('新增成功');window.location='Index'</script>"));
            }
            else
            {
                //     return Content("<script>alert('新增失败');window.location='Index'</script>");
                ViewBag.dt = c;
            }

            return(View());
        }
Ejemplo n.º 15
0
        public List <config_major_kindModel> majorKindSelect()
        {
            List <config_major_kind>      list  = SelectAll();
            List <config_major_kindModel> list2 = new List <config_major_kindModel>();

            foreach (config_major_kind item in list)
            {
                config_major_kindModel cm = new config_major_kindModel()
                {
                    Id              = item.Id,
                    major_kind_id   = item.major_kind_id,
                    major_kind_name = item.major_kind_name
                };
                list2.Add(cm);
            }
            return(list2);
        }
Ejemplo n.º 16
0
        public ActionResult Del(int id)
        {
            config_major_kindModel c = new config_major_kindModel()
            {
                Id = id
            };
            int delete = bll.Delete(c);

            if (delete > 0)
            {
                return(Content("1"));
            }
            else
            {
                return(Content("0"));
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 显示全部
        /// </summary>
        /// <returns></returns>
        List <config_major_kindModel> Iconfig_major_kindDAO.QueryAll()
        {
            List <config_major_kind>      list  = QueryAll();
            List <config_major_kindModel> list2 = new List <config_major_kindModel>();

            foreach (config_major_kind item in list)
            {
                config_major_kindModel ck = new config_major_kindModel()
                {
                    Id              = item.Id,
                    major_kind_id   = item.major_kind_id,
                    major_kind_name = item.major_kind_name
                };
                list2.Add(ck);
            }
            return(list2);
        }
Ejemplo n.º 18
0
        // GET: config_major_kind/Delete/5   删除
        public ActionResult Delete(int id)
        {
            config_major_kindModel c = new config_major_kindModel()
            {
                Id = id
            };
            int delete = bll.Delete(c);

            ViewBag.d = delete;
            if (delete > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(Content("alert('删除失败');window.location.href='/config_major_kind/Index'"));
            }
        }
        public ActionResult Delete(int id)
        {
            config_major_kindModel cm = new config_major_kindModel()
            {
                Id = id
            };

            //根据ID删除
            if (icb.majorKindDel(cm) > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/config_major_kind/profession_design'</script>"));
                // return RedirectToAction("Index");
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/config_major_kind/profession_design'</script>"));
            }
        }
 public ActionResult major_kind_add(config_major_kindModel cm)
 {
     if (ModelState.IsValid)//后台验证
     {
         if (icb.majorKindAdd(cm) > 0)
         {
             return(Content("<script>alert('添加成功');window.location.href='/config_major_kind/profession_design'</script>"));
         }
         else
         {
             return(Content("<script>alert('添加失败');window.location.href='/config_major_kind/profession_design'</script>"));
         }
     }
     else
     {
         return(View());
     }
 }
Ejemplo n.º 21
0
        public ActionResult register(major_changeModel mcm)
        {
            config_file_second_kindModel csm = new config_file_second_kindModel
            {
                second_kind_id = mcm.new_second_kind_id
            };
            config_file_first_kindModel cfm = new config_file_first_kindModel
            {
                first_kind_id = mcm.new_first_kind_id
            };
            config_file_third_kindModel css = new config_file_third_kindModel
            {
                third_kind_id = mcm.new_third_kind_id
            };
            config_major_kindModel cff = new config_major_kindModel
            {
                major_kind_id = mcm.new_major_kind_id
            };
            config_majorModel cmm = new config_majorModel
            {
                major_id      = mcm.new_major_id,
                major_kind_id = mcm.new_major_kind_id
            };
            List <config_file_second_kindModel> lists = sb.SelectByName(csm);
            List <config_file_first_kindModel>  listf = ib.SelectByName(cfm);
            List <config_file_third_kindModel>  lis   = isb.SelectByName(css);
            List <config_major_kindModel>       liss  = ia.SelectByName(cff);
            List <config_majorModel>            litt  = iii.SelectByName(cmm);

            mcm.new_second_kind_name = lists[0].second_kind_name;
            mcm.new_first_kind_name  = listf[0].first_kind_name;
            mcm.new_third_kind_name  = lis[0].third_kind_name;
            mcm.new_major_kind_name  = liss[0].major_kind_name;
            mcm.new_major_name       = litt[0].major_name;
            //修改操作
            if (imb.Update(mcm) > 0)
            {
                return(Content("<script>alert('修改成功');window.location.href='/major_change/register_list'</script>"));
            }
            else
            {
                return(Content("<script>alert('修改失败');window.location.href='/major_change/register_list'</script>"));
            }
        }
Ejemplo n.º 22
0
 public int Update(config_major_kindModel st)
 {
     return(ist.Update(st));
 }
Ejemplo n.º 23
0
 public int config_major_kindUpdate(config_major_kindModel t)
 {
     return(cmk.config_major_kindUpdate(t));
 }
Ejemplo n.º 24
0
 public int config_major_kindAdd(config_major_kindModel t)
 {
     return(cmk.config_major_kindAdd(t));
 }
Ejemplo n.º 25
0
 public int majorKindDel(config_major_kindModel fk)
 {
     return(icd.majorkindDel(fk));
 }
Ejemplo n.º 26
0
 public List <config_major_kindModel> SelectByName(config_major_kindModel st)
 {
     return(icd.SelectByName(st));
 }
Ejemplo n.º 27
0
 public int Delete(config_major_kindModel c)
 {
     return(ioc.Delete(c));
 }
Ejemplo n.º 28
0
 public int Del(config_major_kindModel st)
 {
     return(ist.Del(st));
 }
Ejemplo n.º 29
0
 public int Add(config_major_kindModel c)
 {
     return(ioc.Add(c));
 }
Ejemplo n.º 30
0
 public int Add(config_major_kindModel st)
 {
     return(ist.Add(st));
 }