コード例 #1
0
        public int ConfigPublicCharDelete(ConfigPublicCharModel ck)
        {
            ConfigPublicChar cmj = new ConfigPublicChar()
            {
                Attributekind = ck.Attributekind,
                Attributename = ck.Attributename,
                Id            = ck.Id
            };

            return(Delete(cmj));
        }
コード例 #2
0
        /// <summary>
        /// 删除职称
        /// </summary>
        /// <param name="cm"></param>
        /// <returns></returns>
        public ActionResult Del(ConfigPublicCharModel cm)
        {
            ConfigPublicCharModel ck = new ConfigPublicCharModel();

            ck.Id = cm.Id;

            if (isb.ConfigPublicCharDelete(ck) > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
コード例 #3
0
        public List <ConfigPublicCharModel> ConfigMajorKindSelect()
        {
            List <ConfigPublicChar>      list  = Select();
            List <ConfigPublicCharModel> list2 = new List <ConfigPublicCharModel>();

            foreach (ConfigPublicChar item in list)
            {
                ConfigPublicCharModel ckm = new ConfigPublicCharModel()
                {
                    Id            = item.Id,
                    Attributekind = item.Attributekind,
                    Attributename = item.Attributename
                };
                list2.Add(ckm);
            }
            return(list2);
        }
コード例 #4
0
        public List <ConfigPublicCharModel> ConfigMajorKindStudentBy(string lx)
        {
            MyDbContext             db   = CreateContext();
            List <ConfigPublicChar> list = db.ConfigPublicChar.AsNoTracking()
                                           .Where(e => e.Attributekind == lx)
                                           .Select(e => e)
                                           .ToList();
            List <ConfigPublicCharModel> list2 = new List <ConfigPublicCharModel>();

            foreach (ConfigPublicChar item in list)
            {
                ConfigPublicCharModel sm = new ConfigPublicCharModel()
                {
                    Id            = item.Id,
                    Attributename = item.Attributename
                };
                list2.Add(sm);
            }
            return(list2);
        }
コード例 #5
0
 public int ConfigPublicCharDelete(ConfigPublicCharModel ck)
 {
     return(icd.ConfigPublicCharDelete(ck));
 }