Пример #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));
 }