/// <summary>
        ///  修改
        /// </summary>
        /// <param name="majorgrouping"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Update(Majorgrouping majorgrouping, int id)
        {
            db.Entry(majorgrouping).State = EntityState.Modified;
            int i = db.SaveChanges();

            return(i);
        }
        public JsonResult Adds(Majorgrouping majorgrouping)
        {
            string jsonm  = Newtonsoft.Json.JsonConvert.SerializeObject(majorgrouping);
            var    result = HelperHttpClient.GetAll("post", "/api/majorgroup", jsonm);

            return(Json(result));
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="majorgrouping"></param>
        /// <returns></returns>
        public int Add(Majorgrouping majorgrouping)
        {
            db.Majorgrouping.Add(majorgrouping);
            int i = db.SaveChanges();

            return(i);
        }
Example #4
0
        public int Add(Majorgrouping majorgrouping)
        {
            int i = _majorgroupServerce.Add(majorgrouping);

            return(i);
        }