示例#1
0
        //删除
        public async Task <int> Delete(int id)
        {
            config_public_char cpc = await tescDbContext.publics.FindAsync(id);

            tescDbContext.publics.Remove(cpc);
            return(await tescDbContext.SaveChangesAsync());
        }
示例#2
0
 private static Econfig_public_char GetCph(config_public_char pc)
 {
     return(new Econfig_public_char()
     {
         pbc_id = pc.pbc_id,
         attribute_name = pc.attribute_name,
         attribute_kind = pc.attribute_kind
     });
 }
示例#3
0
        //删除
        public Task <int> Del(config_public_char pc)
        {
            Econfig_public_char cc = new Econfig_public_char()
            {
                pbc_id = pc.pbc_id
            };

            return(Del(cc));
        }
示例#4
0
        public JsonResult public_char_delete(short id)
        {
            config_public_char cpc = new config_public_char()
            {
                pbc_id = id
            };
            bool res = cps.Del(cpc);

            return(Json(res));
        }
示例#5
0
 public ActionResult salary_item_register(config_public_char t)
 {
     if (cc.Add(t) > 0)
     {
         return(Content("<script>alert('添加成功');window.location.href='/client/salary_item'</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');window.location.href='/client/salary_item_register'</script>"));
     }
 }
示例#6
0
 public ActionResult public_char_add(config_public_char t)
 {
     if (cc.Add(t) > 0)
     {
         return(Content("<script>alert('添加成功');window.location.href='/client/public_char'</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');window.location.href='/client/public_char_add'</script>"));
     }
 }
示例#7
0
        //添加
        public async Task <int> Add(config_public_charModel1 cpcm)
        {
            config_public_char cpc = new config_public_char()
            {
                pbc_id         = cpcm.pbc_id,
                attribute_kind = cpcm.attribute_kind,
                attribute_name = cpcm.attribute_name
            };

            tescDbContext.publics.Add(cpc);
            return(await tescDbContext.SaveChangesAsync());
        }
示例#8
0
        public ActionResult public_char_add(config_public_char pc)
        {
            int num = pcbll.config_public_charInsert(pc);

            if (num > 0)
            {
                return(Content("<script>alert('新增成功!!!');location.href='/client/public_char'</script>"));
            }
            else
            {
                return(View(num));
            }
        }
示例#9
0
        //条件查询
        public async Task <config_public_charModel1> WhereSelect(int id)
        {
            config_public_char item = await tescDbContext.publics.FindAsync(id);

            config_public_charModel1 cffkm = new config_public_charModel1()
            {
                pbc_id         = item.pbc_id,
                attribute_kind = item.attribute_kind,
                attribute_name = item.attribute_name
            };

            return(cffkm);
        }
示例#10
0
        //公共属性设置删除
        public async Task <ActionResult> DeleteSX(int id)
        {
            config_public_char cc = new config_public_char()
            {
                pbc_id = id
            };
            int result = await imk.Del(cc);

            if (result > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/config_public_char/Ggsx'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/config_public_char/Ggsx'</script>"));
            }
        }
示例#11
0
        //职场设置页面查询
        public async Task <List <config_public_char> > CMKSelect(Expression <Func <Econfig_public_char, bool> > where)
        {
            List <Econfig_public_char> mk = await GetWhere(where);

            List <config_public_char> mk2 = new List <config_public_char>();

            foreach (var item in mk)
            {
                config_public_char ck = new config_public_char()
                {
                    pbc_id         = item.pbc_id,
                    attribute_name = item.attribute_name,
                    attribute_kind = item.attribute_kind
                };
                mk2.Add(ck);
            }
            return(mk2);
        }
示例#12
0
        //公共属性查询
        public async Task <List <config_public_char> > SelectSX()
        {
            List <Econfig_public_char> cp = await GetAll();

            List <config_public_char> cp2 = new List <config_public_char>();

            foreach (var pc in cp)
            {
                config_public_char cc = new config_public_char()
                {
                    pbc_id         = pc.pbc_id,
                    attribute_name = pc.attribute_name,
                    attribute_kind = pc.attribute_kind
                };
                cp2.Add(cc);
            }
            return(cp2);
        }
示例#13
0
        //薪酬查询
        public async Task <List <config_public_char> > SelectXC(Expression <Func <Econfig_public_char, bool> > where)
        {
            List <Econfig_public_char> pc = await GetWhere(where);

            List <config_public_char> pc2 = new List <config_public_char>();

            foreach (var item in pc)
            {
                config_public_char cc = new config_public_char()
                {
                    pbc_id         = item.pbc_id,
                    attribute_name = item.attribute_name,
                    attribute_kind = item.attribute_kind
                };
                pc2.Add(cc);
            }
            return(pc2);
        }
示例#14
0
        //公共属性添加
        public async Task <ActionResult> Create(config_public_char pc)
        {
            try
            {
                int result = await imk.AddSX(pc);

                if (result > 0)
                {
                    return(RedirectToAction("Ggsx"));
                }
                else
                {
                    return(View(pc));
                }
            }
            catch (Exception)
            {
                return(View(pc));
            }
        }
示例#15
0
        public async Task <ActionResult> Create2(config_public_char pc)
        {
            try
            {
                pc.attribute_kind = "薪酬设置";
                int result = await imk.AddXC(pc);

                if (result > 0)
                {
                    return(RedirectToAction("XinChou"));
                }
                else
                {
                    return(View(pc));
                }
            }
            catch (Exception)
            {
                return(View(pc));
            }
        }
示例#16
0
 public config_public_char SelectOne(config_public_char us)
 {
     return(ist.SelectBy(e => e.pbc_id == us.pbc_id)[0]);
 }
示例#17
0
 public int Change(config_public_char t)
 {
     return(dao.Change(t));
 }
示例#18
0
 public int Del(config_public_char t)
 {
     return(dao.Del(t));
 }
示例#19
0
        //薪酬添加
        public Task <int> AddXC(config_public_char pc)
        {
            Econfig_public_char cc = GetCph(pc);

            return(Add(cc));
        }
示例#20
0
 public int Add(config_public_char t)
 {
     return(dao.Add(t));
 }
示例#21
0
 public bool Del(config_public_char us)
 {
     return(ist.Del(us));
 }
示例#22
0
 public ActionResult public_char(config_public_char cpc)
 {
     cps.Add(cpc);
     ViewData.Model = cps.Select();
     return(View());
 }
示例#23
0
 public bool Add(config_public_char us)
 {
     return(ist.Add(us));
 }
示例#24
0
        //公共属性添加
        public Task <int> AddSX(config_public_char pc)
        {
            Econfig_public_char cph = GetCph(pc);

            return(Add(cph));
        }
示例#25
0
 public bool Upd(config_public_char us)
 {
     return(ist.Upd(us));
 }
示例#26
0
 //薪酬删除
 public Task <int> Del(config_public_char pc)
 {
     return(imk.Del(pc));
 }
示例#27
0
 public int config_public_charInsert(config_public_char pc)
 {
     return(dao.config_public_charInsert(pc));
 }
示例#28
0
 public int config_public_charDel(config_public_char pc, object keyValue)
 {
     return(dao.config_public_charDel(pc, keyValue));
 }
示例#29
0
 //薪酬添加
 public Task <int> AddXC(config_public_char pc)
 {
     return(imk.AddXC(pc));
 }